Index: trunk/expressoMail1_2/js/jscode/draw_api_folders.js
===================================================================
--- trunk/expressoMail1_2/js/jscode/draw_api_folders.js	(revision 2747)
+++ trunk/expressoMail1_2/js/jscode/draw_api_folders.js	(revision 2752)
@@ -923,5 +923,4 @@
 		tr_element.msg_sample = headers_msgs.msg_sample.body.substr(0,120) + "..."; //trecho do body que sera exibido com o assunto;
 	}
-
 	tr_element.tip = "";
 	if(headers_msgs.msg_sample && preferences.preview_msg_tip == "1")
@@ -946,12 +945,7 @@
 		add_className(tr_element,'flagged_msg');
 
-	td_element1 = document.createElement("TD");
-	td_element1.className = "td_msg";
-	td_element1.setAttribute("width", "1%");
-	chk_box_element = document.createElement("INPUT");
-	chk_box_element.setAttribute("type", "checkbox");
-	chk_box_element.className = "checkbox";
-	chk_box_element.setAttribute("id", "check_box_message_"+headers_msgs.msg_number);
-	chk_box_element.onclick = function(e){
+	td_element1 = createAndSet("TD",['class','width'],['td_msg','1%']);
+	_chkbox = createAndSet("INPUT", ['type','class','id'], ['checkbox','checkbox',"check_box_message_"+headers_msgs.msg_number]);
+	_chkbox.onclick = function(e){
 		if (is_ie)
 			changeBgColor(window.event,headers_msgs.msg_number);
@@ -959,5 +953,5 @@
 			changeBgColor(e,headers_msgs.msg_number);
 	};
-	td_element1.appendChild(chk_box_element);
+	td_element1.appendChild(_chkbox);
 
 	td_element2 = document.createElement("TD");
@@ -974,5 +968,5 @@
 	if (headers_msgs.attachment && headers_msgs.attachment.number_attachments > 0) {
 		attach_name = headers_msgs.attachment.names.split(", ");
-		for(var item in attach_name)
+		for(var item=0; item < attach_name.length; item++)
 		{
 			if (url_decode(attach_name[item]) != 'smime.p7s' && url_decode(attach_name[item]) != 'smime.p7m'){
@@ -987,5 +981,4 @@
 		headers_msgs.Draft = '';
 		headers_msgs.Answered = '';
-		headers_msgs.Forwarded = 'F';
 	}
 	else if (headers_msgs.Draft == 'X')
@@ -1001,7 +994,4 @@
 	td_element22.id = "td_message_signed_"+headers_msgs.msg_number;
 
-	//td_element23 = document.createElement("TD");
-	//td_element23.setAttribute("width", "1%");
-	//td_element23.id = "td_message_signed_"+headers_msgs.msg_number;
 	switch(headers_msgs.ContentType)
 	{
@@ -1027,5 +1017,5 @@
 	td_element23.id = "td_message_important_"+headers_msgs.msg_number;
 
-	if (headers_msgs.Flagged == 'F' || (headers_msgs.Importance.toLowerCase().indexOf("high") != -1 && parseInt(preferences.use_important_flag)))
+	if (headers_msgs.Flagged == 'F' || (parseInt(preferences.use_important_flag) && headers_msgs.Importance.toLowerCase().indexOf("high") != -1))
 	{
 		td_element23.innerHTML = '<img src ="' + URL_SERVER + 'expressoMail1_2/templates/'+template+'/images/important.gif" title="'+get_lang('Important')+'">';
@@ -1143,22 +1133,11 @@
 	td_element6.className = "td_msg";
 	td_element6.setAttribute("width", "14%");
-	td_element6.onclick = _onclick;
 	td_element6.setAttribute("noWrap","true");
 	td_element6.setAttribute("align", "center");
+	td_element6.onclick = _onclick;
 
 	td_element6.innerHTML = borkb(headers_msgs.Size);
 
-	tr_element.appendChild(td_element1);
-	tr_element.appendChild(td_element2);
-	tr_element.appendChild(td_element21);
-	tr_element.appendChild(td_element22);
-	tr_element.appendChild(td_element23);
-	tr_element.appendChild(td_element24);
-	tr_element.appendChild(td_element25);
-	tr_element.appendChild(td_element3);
-	tr_element.appendChild(td_element4);
-	tr_element.appendChild(td_element5);
-	tr_element.appendChild(td_element6);
-	return tr_element;
+	return appendChilds(tr_element,td_element1,td_element2,td_element21,td_element22,td_element23,td_element24,td_element25,td_element3,td_element4,td_element5,td_element6);
 }
 function draw_folder(){
@@ -1190,12 +1169,12 @@
 		tr_element = createAndSet("TR",['class'],['message_header']);
 		td_element1 = createAndSet("TD",['width'],['1%']);
-		chk_box_element = createAndSet("INPUT",['id','type','class'],["chk_box_select_all_messages","checkbox","checkbox"]);
-		chk_box_element.onclick = function(){
+		_chkbox_element = createAndSet("INPUT",['id','type','class'],["chk_box_select_all_messages","checkbox","checkbox"]);
+		_chkbox_element.onclick = function(){
 			select_all_messages(this.checked);
 		};
-		chk_box_element.onmouseover = function () {
+		_chkbox_element.onmouseover = function () {
 			this.title=get_lang('Select all messages.');
 		};
-		chk_box_element.onkeydown = function (e){
+		_chkbox_element.onkeydown = function (e){
 			if (is_ie)
 			{
@@ -1210,5 +1189,5 @@
 		};
 
-		td_element1.appendChild(chk_box_element);
+		td_element1.appendChild(_chkbox_element);
 
 		td_element2 = document.createElement("TD");
Index: trunk/expressoMail1_2/js/jscode/common_functions.js
===================================================================
--- trunk/expressoMail1_2/js/jscode/common_functions.js	(revision 2747)
+++ trunk/expressoMail1_2/js/jscode/common_functions.js	(revision 2752)
@@ -80,5 +80,4 @@
 	remove_className(tr_message, 'selected_msg');
 	Element("td_message_unseen_"+msg_number).innerHTML = "<img src ='"+URL_SERVER+"expressoMail1_2/templates/"+template+"/images/seen.gif' title='"+get_lang('Seen')+"'>";
-	expresso.connector.purgeCache();
 	return true;
 }
Index: trunk/expressoMail1_2/js/jscode/main.js
===================================================================
--- trunk/expressoMail1_2/js/jscode/main.js	(revision 2743)
+++ trunk/expressoMail1_2/js/jscode/main.js	(revision 2752)
@@ -356,6 +356,5 @@
 		else{
 			/* No tab avaliable, the draw_message_header hasn't finished?! */
-			expresso.connector.cacheNextRequest();
-			setTimeout('cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number='+ id_msg_read +'&msg_folder=' + current_folder+'", show_msg)',3000);
+			setTimeout('expresso.connector.cacheNextRequest(); cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number='+ ID +'&msg_folder=' + current_folder+'", show_msg)',100);
 		}
 
@@ -457,6 +456,4 @@
 				update_quota(get_current_folder());
 			}						
-			 //if(data.new_msgs > 0 || data.msgs_to_delete.length > 0)
-			//	purgeCache();						
 		};
 		// Update Box BgColor
@@ -465,5 +462,4 @@
 			updateBoxBgColor(box.childNodes);
 		}
-		expresso.connector.purgeCache();
 		update_menu();
 	};
@@ -567,5 +563,4 @@
 	if (msgs_number.length > 0 || parseInt(msgs_number) > 0)
 	{
-		expresso.connector.purgeCache();
 		cExecute ("expressoMail1_2.imap_functions.delete_msgs&folder="+folder+"&msgs_number="+msgs_number+"&border_ID="+border_ID+"&sort_box_type="+sort_box_type+"&search_box_type="+search_box_type+"&sort_box_reverse="+sort_box_reverse, handler_delete_msgs);
 	}
@@ -615,5 +610,4 @@
 			updateBoxBgColor(box);
 		}
-		expresso.connector.purgeCache();
 	};
 
@@ -798,5 +792,4 @@
 	if (parseInt(msgs_number) > 0 || msgs_number.length > 0)
 	{
-		expresso.connector.purgeCache();
 		cExecute ("expressoMail1_2.imap_functions.move_messages&folder="+folder+"&msgs_number="+msgs_number+"&border_ID="+border_ID+"&sort_box_type="+sort_box_type+"&search_box_type="+search_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, handler_move_msgs);
 	}
@@ -1537,5 +1530,4 @@
 		if ((! openTab.toPreserve[ID]) && (openTab.imapUid[ID] != 0))
 		{
-			expresso.connector.purgeCache();
 			cExecute ("expressoMail1_2.imap_functions.delete_msgs&folder="+openTab.imapBox[ID]+"&msgs_number="+openTab.imapUid[ID],function(data){ return; });
 		}
@@ -2048,5 +2040,4 @@
 	if (msgs_to_set)
 	{
-		expresso.connector.purgeCache();
 		cExecute ("expressoMail1_2.imap_functions.set_messages_flag&folder="+folder+"&msgs_to_set="+msgs_to_set+"&flag="+flag, handler_set_messages_flag);
 	}
@@ -2217,5 +2208,4 @@
 	var realyEmptyTrash=confirm(get_lang('Do you really want to empty your trash folder?'));
 	if (realyEmptyTrash){
-		expresso.connector.purgeCache();
 		cExecute ("expressoMail1_2.imap_functions.empty_folder&clean_folder="+"imapDefaultTrashFolder", handler_empty_trash);
 	}
Index: trunk/expressoMail1_2/js/jscode/TreeShow.js
===================================================================
--- trunk/expressoMail1_2/js/jscode/TreeShow.js	(revision 2519)
+++ trunk/expressoMail1_2/js/jscode/TreeShow.js	(revision 2752)
@@ -35,5 +35,4 @@
 		if(!expresso_offline)
 		{
-			expresso.connector.cacheNextRequest(1);
 			cExecute ("expressoMail1_2.imap_functions.get_folders_list&folder="+current_folder, handler_update_folders);		
 		}
@@ -179,5 +178,4 @@
 					ttreeBox.name_folder = "root"; //or use var newpast
 					this.name_func = "newpast";
-					expresso.connector.purgeCache();
 					ttreeBox.update_folder();
 				}
