Index: trunk/expressoMail1_2/js/shortcut.js
===================================================================
--- trunk/expressoMail1_2/js/shortcut.js	(revision 3683)
+++ trunk/expressoMail1_2/js/shortcut.js	(revision 4761)
@@ -131,8 +131,8 @@
 	
 			var modifiers = { 
-				shift: { wanted:false, pressed:false},
-				ctrl : { wanted:false, pressed:false},
-				alt  : { wanted:false, pressed:false},
-				meta : { wanted:false, pressed:false}	//Meta is Mac specific
+				shift: {wanted:false, pressed:false},
+				ctrl : {wanted:false, pressed:false},
+				alt  : {wanted:false, pressed:false},
+				meta : {wanted:false, pressed:false}	//Meta is Mac specific
 			};
                         
@@ -246,17 +246,20 @@
 		if (arrayJSWin[window].visible)
 		{
-			arrayJSWin[window].close();
+                        arrayJSWin[window].close();
+			var search_win = document.getElementById( 'window_QuickCatalogSearch' );
+                        search_win.style.visibility = 'hidden';
 			window_closed = true;
 		}
 	}
+    
 	if (!window_closed)
 		delete_border(get_msg_id(), 'false');
 },{'disable_in_input':false});
 
-shortcut.add("I",function(){ print_all(); },{'disable_in_input':true}); 
-shortcut.add("E",function(){ exec_msg_action('forward'); },{'disable_in_input':true});
-shortcut.add("R",function(){ exec_msg_action('reply'); },{'disable_in_input':true});
-shortcut.add("O",function(){ show_head_option(); },{'disable_in_input':true});
-shortcut.add("M",function(){ show_address_full(); },{'disable_in_input':true});
+shortcut.add("I",function(){print_all();},{'disable_in_input':true});
+shortcut.add("E",function(){exec_msg_action('forward');},{'disable_in_input':true});
+shortcut.add("R",function(){exec_msg_action('reply');},{'disable_in_input':true});
+shortcut.add("O",function(){show_head_option();},{'disable_in_input':true});
+shortcut.add("M",function(){show_address_full();},{'disable_in_input':true});
 
 shortcut.add("Delete",function(){
@@ -296,12 +299,39 @@
 ,{'disable_in_input':true});
 
-shortcut.add("Ctrl+Up",function(){ exec_msg_action('previous'); select_msg('null', 'up', true);},{'disable_in_input':true});
-shortcut.add("Ctrl+Down",function(){ exec_msg_action('next'); select_msg('null', 'down', true);},{'disable_in_input':true});
+shortcut.add("Ctrl+Up",function(){exec_msg_action('previous');select_msg('null', 'up', true);},{'disable_in_input':true});
+shortcut.add("Ctrl+Down",function(){exec_msg_action('next');select_msg('null', 'down', true);},{'disable_in_input':true});
 
 if (is_ie)
 {
-	shortcut.add("down",function(){ select_msg('null', 'down'); },{'disable_in_input':false});
-	shortcut.add("up",function(){ select_msg('null', 'up'); },{'disable_in_input':false});	
-	
+//**********************
+shortcut.add('up', function()
+        {
+                var search_in_focus = false;
+                var search_win = document.getElementById( 'window_QuickCatalogSearch' );
+                if ( search_win && search_win.style.visibility == 'visible' )
+                        search_in_focus = true;
+
+                if ( !search_in_focus )
+                    select_msg('null', 'up');
+                else
+                    shortcut.remove('up');
+        },{'disable_in_input':false});
+
+
+        shortcut.add('down', function()
+        {
+                var search_in_focus = false;
+                var search_win = document.getElementById( 'window_QuickCatalogSearch' );
+                if ( search_win && search_win.style.visibility == 'visible' )
+                        search_in_focus = true;
+
+                if ( !search_in_focus )
+                    select_msg('null', 'down');
+                else
+                    shortcut.remove('down');
+        },{'disable_in_input':false});
+
+//****************
+
 	shortcut.add("Shift+down",function(){
 		if ( Element('border_id_0').className==='menu-sel' )
@@ -326,6 +356,6 @@
 else
 {
-	shortcut.add("down",function(){ select_msg('null', 'down');},{'type':'keypress', 'disable_in_input':false});
-	shortcut.add("up",function(){ select_msg('null', 'up');},{'type':'keypress', 'disable_in_input':false});
+	shortcut.add("down",function(){select_msg('null', 'down');},{'type':'keypress', 'disable_in_input':false});
+	shortcut.add("up",function(){select_msg('null', 'up');},{'type':'keypress', 'disable_in_input':false});
 	
 	shortcut.add("Shift+down",function(){
@@ -363,6 +393,5 @@
 		}
 	}
-}
-,{'disable_in_input':true});
+},{'disable_in_input':true});
 
 shortcut.add("f9",function(){
Index: trunk/expressoMail1_2/js/QuickCatalogSearch.js
===================================================================
--- trunk/expressoMail1_2/js/QuickCatalogSearch.js	(revision 4457)
+++ trunk/expressoMail1_2/js/QuickCatalogSearch.js	(revision 4761)
@@ -217,5 +217,6 @@
 				title_text_color: 'white',
 				button_x_img: '../phpgwapi/images/winclose.gif',
-				border: true });
+				border: true,
+                                onclose: 'QuickCatalogSearch.restoreShortcuts("'+ div.id +'")' });
 			
 			this.arrayWin[div.id] = win;
@@ -228,4 +229,10 @@
 		win.open();
 		document.getElementById('select_QuickCatalogSearch').focus();
+
+                if(is_ie){
+                    shortcut.remove('down');
+                    shortcut.remove('up');
+                    shortcut.remove('return');
+                }
 	}
 	
@@ -248,10 +255,52 @@
 		this.arrayWin['window_QuickCatalogSearch_A'].close();
                 document.getElementById("window_QuickCatalogSearch").style.visibility = "hidden";
-	}
+                shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false});
+                shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false});
+                shortcut.add("return",function(){
+                    if ( Element('border_id_0').className==='menu-sel' )
+                    {
+                            all_messages = Element('tbody_box').childNodes;
+                            for (var i=0; i < all_messages.length; i++)
+                            {
+                                    if ( exist_className(all_messages[i], 'selected_shortcut_msg') )
+                                    {
+                                            Element("td_who_" + all_messages[i].id).onclick();
+                                            return;
+                                    }
+                            }
+                    }
+                },{'disable_in_input':true});
+	}
+
+        emQuickCatalogSearch.prototype.restoreShortcuts = function(id) {
+
+            var search_win = document.getElementById(id);
+            if (search_win.style.visibility == 'visible')
+            {
+                shortcut.add("down",function(){select_msg('null', 'down');},{'disable_in_input':false});
+                shortcut.add("up",function(){select_msg('null', 'up');},{'disable_in_input':false});
+                shortcut.add("return",function(){
+                    if ( Element('border_id_0').className==='menu-sel' )
+                    {
+                            all_messages = Element('tbody_box').childNodes;
+                            for (var i=0; i < all_messages.length; i++)
+                            {
+                                    if ( exist_className(all_messages[i], 'selected_shortcut_msg') )
+                                    {
+                                            Element("td_who_" + all_messages[i].id).onclick();
+                                            return;
+                                    }
+                            }
+                    }
+                },{'disable_in_input':true});
+            }
+            search_win.style.visibility = 'hidden';
+
+        }
 
 	emQuickCatalogSearch.prototype.close_window = function(id) {
-		this.arrayWin[id].close();
+                this.arrayWin[id].close();
 		var group_values = Element('list_values');
-		var user_values = Element('user_values');	
+		var user_values = Element('user_values');
 	}
 	emQuickCatalogSearch.prototype.showCatalogList = function (border_id){
@@ -586,4 +635,4 @@
 	
 /* Build the Object */
-	var QuickCatalogSearch;
+	//QuickCatalogSearch;
 	QuickCatalogSearch = new emQuickCatalogSearch();
