Index: trunk/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 69)
+++ trunk/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 75)
@@ -1838,5 +1838,5 @@
 				
 				if($criteria[0] == "ALL ") {					
-					$all_criterias = array ("TO","SUBJECT","FROM","CC","BODY");								
+					$all_criterias = array ("TO","SUBJECT","FROM","CC");								
 					foreach($all_criterias as $criteria_fixed){						
 						$search_criteria = imap_search($mbox_stream,$criteria_fixed." \"".$criteria[1]."\"", SE_UID);
@@ -1851,5 +1851,5 @@
 							return "many results";						
 					}
-				}
+				}				
 				else {
 					$search_criteria = imap_search($mbox_stream,$criteria[0]."\"".$criteria[1]."\"", SE_UID);						
Index: trunk/expressoMail1_2/js/search.js
===================================================================
--- trunk/expressoMail1_2/js/search.js	(revision 73)
+++ trunk/expressoMail1_2/js/search.js	(revision 75)
@@ -455,6 +455,5 @@
 
 	    EsearchE.all_boxes.splice(0,(EsearchE.all_boxes.length));
-	  	EsearchE.del_mailboxes()
-		cl.parentNode.removeChild(cl);
+	  	EsearchE.del_mailboxes();
 	}
 
Index: trunk/expressoMail1_2/js/main.js
===================================================================
--- trunk/expressoMail1_2/js/main.js	(revision 72)
+++ trunk/expressoMail1_2/js/main.js	(revision 75)
@@ -869,12 +869,14 @@
 }
 
-function nospam(msgs_number, border_ID){
-	var folder 		= 'INBOX'+cyrus_delimiter+'Spam';	
+function nospam(msgs_number, border_ID, folder){
+	if (folder == 'null')
+		folder = get_current_folder();
 	var new_folder 	= 'INBOX';
 	var new_folder_name = get_lang('INBOX');
 	var handler_move_msgs = function(data){
-		// debug
-		// alert(data);
-		set_messages_flag("unseen", "get_selected_messages");
+		if (msgs_number == 'selected')	
+			set_messages_flag("unseen", "get_selected_messages");
+		else
+			set_message_flag(msgs_number, "unseen");
    	    move_msgs(folder, msgs_number, border_ID, new_folder, new_folder_name);
 	}
@@ -886,5 +888,5 @@
 		cExecute ("$this.imap_functions.spam&folder="+folder+"&spam=false"+"&msgs_number="+msgs_number+"&border_ID="+border_ID+"&sort_box_type="+sort_box_type+"&sort_box_reverse="+sort_box_reverse+"&reuse_border="+border_ID+"&new_folder="+new_folder+"&new_folder_name="+new_folder_name+"&get_previous_msg="+preferences.delete_and_show_previous_message+"&cyrus_delimiter="+cyrus_delimiter, handler_move_msgs);
 	else
-    	write_msg(get_lang('No selected message.'));
+		write_msg(get_lang('No selected message.'));
 }
 
Index: trunk/expressoMail1_2/js/draw_api.js
===================================================================
--- trunk/expressoMail1_2/js/draw_api.js	(revision 72)
+++ trunk/expressoMail1_2/js/draw_api.js	(revision 75)
@@ -820,8 +820,8 @@
 	div_other_options.innerHTML = option_mark_as + option_mark_as_unseen + option_mark_as_important + option_mark_as_normal + option_move + option_reply_to_all + option_reply_without_history + option_reply_to_all_without_history + option_source_msg;
 	if (use_spam_filter) {
-		if(get_current_folder() == 'INBOX'+cyrus_delimiter+'Spam')
-			div_other_options.innerHTML += ' | <span class="message_options" onclick="nospam(\'selected\',\'null\')";>'+get_lang("Not Spam")+'</span>';	
+		if(info_msg.msg_folder == 'INBOX'+cyrus_delimiter+'Spam')
+			div_other_options.innerHTML += ' | <span class="message_options" onclick="nospam('+info_msg.msg_number+',\'null\', \''+info_msg.msg_folder+'\')";>'+get_lang("Not Spam")+'</span>';	
 		else
-			div_other_options.innerHTML += ' | <span class="message_options" onclick="spam(\'null\', \'selected\',\'null\')";>'+get_lang("Spam")+'</span>';	
+			div_other_options.innerHTML += ' | <span class="message_options" onclick="spam(\''+info_msg.msg_folder+'\', '+info_msg.msg_number+',\'null\')";>'+get_lang("Spam")+'</span>';	
 	}
 	td_other_options.appendChild(div_other_options);
@@ -2134,5 +2134,5 @@
 	if (use_spam_filter) {
 		if ( get_current_folder() == 'INBOX'+cyrus_delimiter+'Spam' )	{
-			span_options.innerHTML += ' | <span title="'+get_lang("Not Spam")+'" class="message_options" onclick="nospam(\'selected\',\'null\')">'+get_lang("Not Spam")+'</span>';
+			span_options.innerHTML += ' | <span title="'+get_lang("Not Spam")+'" class="message_options" onclick="nospam(\'selected\',\'null\',\'null\')">'+get_lang("Not Spam")+'</span>';
 		}
 		else {
