Index: /trunk/expressoMail1_2/js/jscode/main.js
===================================================================
--- /trunk/expressoMail1_2/js/jscode/main.js	(revision 2525)
+++ /trunk/expressoMail1_2/js/jscode/main.js	(revision 2556)
@@ -17,5 +17,5 @@
 				expresso_local_messages.capt_url('controller.php?action=expressoMail1_2.db_functions.get_dropdown_contacts_to_cache');
 
-	}
+	};
 	var save_preferences = function(data){
 		
@@ -64,10 +64,10 @@
 		cExecute ("expressoMail1_2.imap_functions.get_folders_list&onload=true", update_menu);
 		
-	}
+	};
 	var handler_automatic_trash_cleanness = function(data){
 		if (data != false){
 			write_msg(data.length +' '+ Element('txt_clear_trash').value);
 		}
-	}
+	};
 	
 	// Versão
@@ -102,5 +102,5 @@
 		proxy_mensagens.messages_list('local_Inbox', 1, preferences.max_email_per_page, 'SORTARRIVAL', null, 1,1,1, function handler(data){
 			draw_box(data, 'local_Inbox');
-		})
+		});
 		
 		// Get cyrus delimiter
@@ -148,5 +148,5 @@
                 'commons-logging-1.1.1.jar'
             //debug:'true'
-        }
+        };
 
         //for (var attribute in attributes){
@@ -249,5 +249,5 @@
        }
        show_msg(data);
-    }
+    };
 
     proxy_mensagens.msg_img(msg_number,folder,call_back);
@@ -270,5 +270,5 @@
 		else
 			write_msg(get_lang("Error in SMTP sending read confirmation."));
-	}
+	};
     
 	if(msg_info.source)
@@ -408,5 +408,5 @@
 
 		if (data.length > 0){
-			var msg_info = document.getElementById('msg_info')
+			var msg_info = document.getElementById('msg_info');
 			if (msg_info != null)
 				main.removeChild(msg_info);
@@ -443,5 +443,5 @@
 			 //if(data.new_msgs > 0 || data.msgs_to_delete.length > 0)
 			//	purgeCache();						
-		}
+		};
 		// Update Box BgColor
 		var box = Element("tbody_box");
@@ -451,5 +451,5 @@
 		expresso.connector.purgeCache();
 		update_menu();
-	}
+	};
 
 	msg_range_end = (current_page*preferences.max_email_per_page);
@@ -527,8 +527,8 @@
 			if (parseInt(preferences.delete_and_show_previous_message) && msg_to_delete) {
 				if (msg_to_delete.previousSibling){
- 	            	var previous_msg = msg_to_delete.previousSibling.id;
-			expresso.connector.cacheNextRequest();
- 	            	cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(current_folder), show_msg);
- 	            } 	            
+ 	         		   	var previous_msg = msg_to_delete.previousSibling.id;
+					expresso.connector.cacheNextRequest();
+ 	         		   	cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(current_folder), show_msg);
+ 		 	           } 	            
 				else
 					delete_border(currentTab,'false');
@@ -543,7 +543,7 @@
                 }
         }
-		Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) - data.msgs_number.length;
-		refresh();	
-	}
+	Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) - data.msgs_number.length;
+	refresh();	
+	};
 
 	if (msgs_number == 'selected')
@@ -600,5 +600,5 @@
 		}
 		expresso.connector.purgeCache();
-	}
+	};
 
 	if (selected_messages){
@@ -761,5 +761,5 @@
 		
 		refresh();
-	}
+	};
 
 	if (folder == new_folder){
@@ -1431,5 +1431,6 @@
 				optAttachments.innerHTML = get_lang("Original attachments: remove")+"</br>";
 			}
-			return false;};
+				return false;
+			};
 			var attachments = document.getElementById("attachments_" + old_id_border).childNodes;
 			for (var i = (attachments.length > 1 ? 1 : 0); i < attachments.length; i++){
@@ -1445,5 +1446,5 @@
 				divOriginalAttachments.appendChild(link_attachment);
 			}
-	}
+	};
 }
 
@@ -1453,5 +1454,5 @@
 	var crypt = false;
     if ((preferences.use_assinar_criptografar != '0') && (preferences.use_signature_digital_cripto != '0')){
-		var checkSign = document.getElementById('return_digital_'+ID)
+		var checkSign = document.getElementById('return_digital_'+ID);
 		if (checkSign.checked){
 			sign = true;
@@ -1525,5 +1526,5 @@
 		{
 			expresso.connector.purgeCache();
-			cExecute ("expressoMail1_2.imap_functions.delete_msgs&folder="+openTab.imapBox[ID]+"&msgs_number="+openTab.imapUid[ID],function(data){ return });
+			cExecute ("expressoMail1_2.imap_functions.delete_msgs&folder="+openTab.imapBox[ID]+"&msgs_number="+openTab.imapUid[ID],function(data){ return; });
 		}
 		delete_border(ID,'true'); // Becarefull: email saved automatically should be deleted. delete_border erase information about openTab
@@ -1572,5 +1573,5 @@
 			}
 			this.show_msg(data);
-		}
+		};
 		para="&source="+smime+"&ID="+ID+"&folder="+folder;
 		cExecute ("expressoMail1_2.imap_functions.show_decript&", handler, para);
@@ -1599,5 +1600,5 @@
         if (is_ie){
             var i = 0;
-            while (document.forms(i).name != "form_message_"+ID){i++}
+            while (document.forms(i).name != "form_message_"+ID) { i++; }
             form = document.forms(i);
         }
@@ -1655,5 +1656,5 @@
 	if (is_ie){
 		var i = 0;
-		while (document.forms(i).name != "form_message_"+ID){i++}
+		while (document.forms(i).name != "form_message_"+ID) { i++; }
 		form = document.forms(i);
 	}
@@ -1827,5 +1828,5 @@
 			var link_attachment = document.createElement("A");
 			var fileName = attach_files[att_index].substr(0,attach_files[att_index].indexOf('_SIZE_'));
-			var fileSize = parseInt(attach_files[att_index].substr(attach_files[att_index].indexOf('_SIZE_')+6))/1024
+			var fileSize = parseInt(attach_files[att_index].substr(attach_files[att_index].indexOf('_SIZE_')+6))/1024;
 			link_attachment.innerHTML = fileName + " ("+borkb((parseInt(fileSize)*1024))+")";
 
@@ -1899,5 +1900,5 @@
 	tmp_folder_id=folder_id;
 	message_id = openTab.imapUid[border_id];
-	var handler_save_msg = function(data){ return_save(data,this.tmp_border_id,this.tmp_folder_name,this.tmp_folder_id,this.message_id); }
+	var handler_save_msg = function(data){ return_save(data,this.tmp_border_id,this.tmp_folder_name,this.tmp_folder_id,this.message_id); };
 
 	var textArea = document.createElement("TEXTAREA");
@@ -1926,5 +1927,5 @@
 	if (is_ie){
 		var i = 0;
-		while (document.forms(i).name != "form_message_"+border_id){i++}
+		while (document.forms(i).name != "form_message_"+border_id) { i++; }
 		form = document.forms(i);
 	}
@@ -1950,10 +1951,9 @@
 }
 
-
 function save_as_msg(border_id, folder_id, folder_name){
 	// hack to avoid form connector bug,  escapes quotation. Please see #179
 	tmp_border_id=border_id;
 	tmp_folder_name=folder_name;
-	var handler_save_msg = function(data){ return_saveas(data,this.tmp_border_id,this.tmp_folder_name); }	
+	var handler_save_msg = function(data){ return_saveas(data,this.tmp_border_id,this.tmp_folder_name); };
 	var textArea = document.createElement("TEXTAREA");
 	textArea.style.display='none';
@@ -2026,5 +2026,5 @@
 		}
 		Element('chk_box_select_all_messages').checked = false;
-	}
+	};
 	
 	var folder = get_current_folder();
@@ -2053,5 +2053,5 @@
 				Element("td_message_answered_"+msg_number).innerHTML = '<img src="'+URL_SERVER+'/expressoMail1_2/templates/'+template+'/images/forwarded.gif" title="Encaminhada">';
 		}
-	}
+	};
 	cExecute ("expressoMail1_2.imap_functions.set_messages_flag&folder="+( msg_number_folder ?  msg_number_folder.value : get_current_folder() )+"&msgs_to_set="+msg_number+"&flag="+flag, handler_set_messages_flag);
 }
@@ -2202,5 +2202,5 @@
 		else 
 			write_msg(get_lang('ERROR emptying your Trash folder.'));
-	}
+	};
 	var realyEmptyTrash=confirm(get_lang('Do you really want to empty your trash folder?'));
 	if (realyEmptyTrash){
@@ -2224,5 +2224,5 @@
 		else
 			write_msg(get_lang('ERROR emptying your Spam folder.'));
-	}
+	};
 	var realyEmptySpam=confirm(get_lang('Do you really want to empty your spam folder?'));
 	if (realyEmptySpam)
@@ -2245,5 +2245,5 @@
 		else
 			download_attachments(null, null, data, null,null,'mensagens.zip');
-	}
+	};
 	
 	if (msgs_to_export) {
@@ -2273,5 +2273,5 @@
 	thumb.oncontextmenu = function(e) {
 		return false;
-	}
+	};
 	var _button = is_ie ? window.event.button : e.which;
 	var	_target = is_ie ? event.srcElement : e.target;
@@ -2294,5 +2294,5 @@
 			proxy_mensagens.proxy_set_message_flag(msgs_number, "unseen");
    	    proxy_mensagens.proxy_move_messages(folder, msgs_number, border_ID, new_folder, new_folder_name);
-	}
+	};
 
     if (msgs_number == 'selected')
@@ -2314,5 +2314,5 @@
 		// alert(data);
 		proxy_mensagens.proxy_move_messages(folder, msgs_number, border_ID, new_folder, new_folder_name);
-	}
+	};
     if(msgs_number == 'selected')
 		msgs_number = get_selected_messages();
@@ -2493,5 +2493,5 @@
 	var handler_send_queue_message = function(data,rowid_message) {
 		hack_sent_queue(data,this.ID_tmp);
-	}
+	};
 	var msg_to_send = expresso_local_messages.get_form_msg_to_send();
 	if(!is_ie)
