Index: trunk/expressoMail1_2/js/main.js
===================================================================
--- trunk/expressoMail1_2/js/main.js	(revision 2422)
+++ trunk/expressoMail1_2/js/main.js	(revision 2425)
@@ -14,5 +14,5 @@
 		if (preferences.use_local_messages == 1 && window.google && google.gears) 
 			if (expresso_local_messages.is_offline_installed()) 
-				expresso_local_messages.capt_url('controller.php?action=$this.db_functions.get_dropdown_contacts_to_cache');
+				expresso_local_messages.capt_url('controller.php?action=expressoMail1_2.db_functions.get_dropdown_contacts_to_cache');
 
 	}
@@ -20,5 +20,5 @@
 		
 		preferences = data;
-		 cExecute ("$this.imap_functions.get_range_msgs2&folder=INBOX&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type=SORTARRIVAL&search_box_type=ALL&sort_box_reverse=1", handler_draw_box);
+		 cExecute ("expressoMail1_2.imap_functions.get_range_msgs2&folder=INBOX&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type=SORTARRIVAL&search_box_type=ALL&sort_box_reverse=1", handler_draw_box);
 
 		if(preferences.hide_folders == "1")
@@ -26,5 +26,5 @@
 		
 		if (preferences.delete_trash_messages_after_n_days != 0)
-			cExecute ("$this.imap_functions.automatic_trash_cleanness&before_date="+preferences.delete_trash_messages_after_n_days+"&cyrus_delimiter="+cyrus_delimiter, handler_automatic_trash_cleanness);
+			cExecute ("expressoMail1_2.imap_functions.automatic_trash_cleanness&before_date="+preferences.delete_trash_messages_after_n_days+"&cyrus_delimiter="+cyrus_delimiter, handler_automatic_trash_cleanness);
 		
 		if(preferences.outoffice == "1")
@@ -60,6 +60,6 @@
         // Fim da inserção da applet
 
-		cExecute ("$this.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences.
-		cExecute ("$this.imap_functions.get_folders_list&onload=true", update_menu);
+		cExecute ("expressoMail1_2.db_functions.get_dropdown_contacts", save_contacts); //Save contacts needs preferences.
+		cExecute ("expressoMail1_2.imap_functions.get_folders_list&onload=true", update_menu);
 		
 	}
@@ -76,5 +76,5 @@
 	cyrus_delimiter = Element('cyrus_delimiter').value;
 
-	cExecute ("$this.functions.get_preferences", save_preferences);
+	cExecute ("expressoMail1_2.functions.get_preferences", save_preferences);
 	setTimeout('auto_refresh()', time_refresh);
 
@@ -106,6 +106,6 @@
 	cyrus_delimiter = Element('cyrus_delimiter').value;
 	
-	cExecute ("$this.db_functions.get_dropdown_contacts_to_cache", function(data) {contacts = data;});
-	//cExecute ("$this.functions.get_preferences", save_preferences);
+	cExecute ("expressoMail1_2.db_functions.get_dropdown_contacts_to_cache", function(data) {contacts = data;});
+	//cExecute ("expressoMail1_2.functions.get_preferences", save_preferences);
 	}
 }
@@ -203,5 +203,5 @@
 	};
 	if (confirm(get_lang("delete all attachments confirmation")))
-		cExecute ("$this.imap_functions.remove_attachments&folder="
+		cExecute ("expressoMail1_2.imap_functions.remove_attachments&folder="
 				+folder+"&msg_num="+msg_num, call_back);
 }
@@ -287,5 +287,5 @@
             /*	var confNotification = confirm(get_lang("The sender waits your notification of reading. Do you want to confirm this?"), "");
                 if (confNotification)*/
-            //        cExecute ("$this.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification);
+            //        cExecute ("expressoMail1_2.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification);
            // }
 
@@ -363,5 +363,5 @@
 
 			if (confNotification)
-				cExecute ("$this.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification);
+				cExecute ("expressoMail1_2.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&subject="+url_encode(msg_info.subject), handler_sendNotification);
 		}
 		//Change msg class to read.
@@ -460,5 +460,5 @@
 	string_msgs_in_main = tmp.substring(0,(tmp.length-1));
 	if(!expresso_offline)
-		cExecute ("$this.imap_functions.refresh&folder="+current_folder+"&msgs_existent="+string_msgs_in_main+"&msg_range_begin="+msg_range_begin+"&msg_range_end="+msg_range_end+"&sort_box_type="+sort_box_type+"&search_box_type="+search_box_type+"&sort_box_reverse="+sort_box_reverse, handler_refresh);
+		cExecute ("expressoMail1_2.imap_functions.refresh&folder="+current_folder+"&msgs_existent="+string_msgs_in_main+"&msg_range_begin="+msg_range_begin+"&msg_range_end="+msg_range_end+"&sort_box_type="+sort_box_type+"&search_box_type="+search_box_type+"&sort_box_reverse="+sort_box_reverse, handler_refresh);
 }
 
@@ -516,5 +516,5 @@
  	            	var previous_msg = msg_to_delete.previousSibling.id;
 			expresso.connector.cacheNextRequest();
- 	            	cExecute("$this.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(current_folder), show_msg);
+ 	            	cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(current_folder), show_msg);
  	            } 	            
 				else
@@ -539,5 +539,5 @@
 	{
 		expresso.connector.purgeCache();
-		cExecute ("$this.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);
+		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);
 	}
 	else
@@ -628,5 +628,5 @@
 			params += "&new_folder_name="+url_encode(new_folder_name);
 		}
-		cExecute ("$this.imap_functions.move_search_messages", handler_move_search_msgs, params);
+		cExecute ("expressoMail1_2.imap_functions.move_search_messages", handler_move_search_msgs, params);
 	}
 	else
@@ -673,7 +673,7 @@
 				if (msg_to_delete.previousSibling){
 					var previous_msg = msg_to_delete.previousSibling.id;
-					//cExecute("$this.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + current_folder, show_msg);
+					//cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + current_folder, show_msg);
 					expresso.connector.cacheNextRequest();
-					cExecute("$this.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(folder), show_msg);
+					cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+previous_msg+"&msg_folder=" + url_encode(folder), show_msg);
 				}
 				else
@@ -770,5 +770,5 @@
 	{
 		expresso.connector.purgeCache();
-		cExecute ("$this.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);
+		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);
 	}
 	else
@@ -795,5 +795,5 @@
 	if (parseInt(id_msgs) > 0 || id_msgs.length > 0)
 		expresso_mail_sync.archive_msgs(folder,folder_dest,id_msgs); 
-		//cExecute("$this.imap_functions.get_info_msgs&folder=" + folder + "&msgs_number=" + id_msgs , handler_arquivar_mensagens);
+		//cExecute("expressoMail1_2.imap_functions.get_info_msgs&folder=" + folder + "&msgs_number=" + id_msgs , handler_arquivar_mensagens);
 	else 
 		write_msg(get_lang('No selected message.'));
@@ -848,5 +848,5 @@
 		id_msgs = get_selected_messages();
 	if (parseInt(id_msgs) > 0 || id_msgs.length > 0) 
-		cExecute("$this.imap_functions.get_info_msgs&folder=" + folder + "&msgs_number=" + id_msgs , handler_arquivar_mensagens);
+		cExecute("expressoMail1_2.imap_functions.get_info_msgs&folder=" + folder + "&msgs_number=" + id_msgs , handler_arquivar_mensagens);
 	else 
 		write_msg(get_lang('No selected message.'));*/
@@ -1512,5 +1512,5 @@
 		{
 			expresso.connector.purgeCache();
-			cExecute ("$this.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
@@ -1561,5 +1561,5 @@
 		}
 		para="&source="+smime+"&ID="+ID+"&folder="+folder;
-		cExecute ("$this.imap_functions.show_decript&", handler, para);
+		cExecute ("expressoMail1_2.imap_functions.show_decript&", handler, para);
 	}else
 	{
@@ -1594,5 +1594,5 @@
         form.appendChild(textArea);
 
-        cExecuteForm ("$this.imap_functions.send_mail", form, handler_send_smime, ID);
+        cExecuteForm ("expressoMail1_2.imap_functions.send_mail", form, handler_send_smime, ID);
     }
 }
@@ -1690,5 +1690,5 @@
 	}
 	else 
-		cExecuteForm("$this.imap_functions.send_mail", form, handler_send_message, ID);
+		cExecuteForm("expressoMail1_2.imap_functions.send_mail", form, handler_send_message, ID);
 }
 function change_tr_properties(tr_element, newUid, newSubject){
@@ -1701,5 +1701,5 @@
 	var openNewMessage = function () {
 		expresso.connector.cacheNextRequest();
-		cExecute("$this.imap_functions.get_info_msg&msg_number="+newUid
+		cExecute("expressoMail1_2.imap_functions.get_info_msg&msg_number="+newUid
 				+"&msg_folder="+url_encode(current_folder),show_msg);
 	};
@@ -1837,5 +1837,5 @@
 		if (message_id)
 		{
-			cExecute ("$this.imap_functions.delete_msgs&folder="+openTab.imapBox[border_id]+"&msgs_number="+message_id,handler_delete_msg);
+			cExecute ("expressoMail1_2.imap_functions.delete_msgs&folder="+openTab.imapBox[border_id]+"&msgs_number="+message_id,handler_delete_msg);
 			if (openTab.imapBox[0] == "INBOX/"+draftsfolder)
 			{
@@ -1921,5 +1921,5 @@
 	form.appendChild(input_insertImg);
 
-	cExecuteForm ("$this.imap_functions.save_msg", form, handler_save_msg,border_id);	
+	cExecuteForm ("expressoMail1_2.imap_functions.save_msg", form, handler_save_msg,border_id);	
 }
 
@@ -1964,5 +1964,5 @@
 	form.appendChild(input_folder);
 	
-	cExecuteForm ("$this.imap_functions.save_msg", form, handler_save_msg,border_id);
+	cExecuteForm ("expressoMail1_2.imap_functions.save_msg", form, handler_save_msg,border_id);
 }
 
@@ -2022,5 +2022,5 @@
 	{
 		expresso.connector.purgeCache();
-		cExecute ("$this.imap_functions.set_messages_flag&folder="+folder+"&msgs_to_set="+msgs_to_set+"&flag="+flag, handler_set_messages_flag);
+		cExecute ("expressoMail1_2.imap_functions.set_messages_flag&folder="+folder+"&msgs_to_set="+msgs_to_set+"&flag="+flag, handler_set_messages_flag);
 	}
 	else
@@ -2039,5 +2039,5 @@
 		}
 	}
-	cExecute ("$this.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);
+	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);
 }
 
@@ -2191,5 +2191,5 @@
 	if (realyEmptyTrash){
 		expresso.connector.purgeCache();
-		cExecute ("$this.imap_functions.empty_folder&clean_folder="+"imapDefaultTrashFolder", handler_empty_trash);
+		cExecute ("expressoMail1_2.imap_functions.empty_folder&clean_folder="+"imapDefaultTrashFolder", handler_empty_trash);
 	}
 }
@@ -2212,5 +2212,5 @@
 	var realyEmptySpam=confirm(get_lang('Do you really want to empty your spam folder?'));
 	if (realyEmptySpam)
-		cExecute ("$this.imap_functions.empty_folder&clean_folder="+"imapDefaultSpamFolder", handler_empty_spam);
+		cExecute ("expressoMail1_2.imap_functions.empty_folder&clean_folder="+"imapDefaultSpamFolder", handler_empty_spam);
 }
 
@@ -2233,5 +2233,5 @@
 	
 	if (msgs_to_export) {
-		cExecute ("$this.exporteml.makeAll", handler_export_all_selected_msgs, "folder="+get_current_folder()+"&msgs_to_export="+msgs_to_export);
+		cExecute ("expressoMail1_2.exporteml.makeAll", handler_export_all_selected_msgs, "folder="+get_current_folder()+"&msgs_to_export="+msgs_to_export);
 		write_msg(get_lang('You must wait while the messages will be exported...'));
 	}
@@ -2285,5 +2285,5 @@
        
 	if (parseInt(msgs_number) > 0 || msgs_number.length > 0)
-		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);
+		cExecute ("expressoMail1_2.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.'));
@@ -2303,5 +2303,5 @@
 		msgs_number = get_selected_messages();
 	if(parseInt(msgs_number) > 0 || msgs_number.length > 0)
-		cExecute ("$this.imap_functions.spam&folder="+folder+"&spam=true"+"&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);
+		cExecute ("expressoMail1_2.imap_functions.spam&folder="+folder+"&spam=true"+"&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.'));
@@ -2379,5 +2379,5 @@
 	write_msg(get_lang('You must wait while the messages will be imported...'));
 	
-	cExecuteForm('$this.imap_functions.import_msgs', document.form_import, handler);
+	cExecuteForm('expressoMail1_2.imap_functions.import_msgs', document.form_import, handler);
 }
 function return_import_msgs(data, wfolders_tree){
@@ -2398,5 +2398,5 @@
 			{
 				archive_msgs('INBOX/Lixeira/tmpMoveToLocal',wfolders_tree._selected.id,data);
-				cExecute('$this.imap_functions.delete_mailbox',function(){},'del_past=INBOX/Lixeira/tmpMoveToLocal');
+				cExecute('expressoMail1_2.imap_functions.delete_mailbox',function(){},'del_past=INBOX/Lixeira/tmpMoveToLocal');
 			}
                          else{
@@ -2447,5 +2447,5 @@
 	}
 	if(confirm(get_lang("Do you confirm this import to your Calendar?"))){
-			cExecute('$this.db_functions.import_vcard&msg_folder='+data,handler_import_calendar);
+			cExecute('expressoMail1_2.db_functions.import_vcard&msg_folder='+data,handler_import_calendar);
 	}
 }
@@ -2491,5 +2491,5 @@
 	}
 
-	cExecuteForm("$this.imap_functions.send_mail", msg_to_send, handler_send_queue_message,"queue_"+ID_tmp);
+	cExecuteForm("expressoMail1_2.imap_functions.send_mail", msg_to_send, handler_send_queue_message,"queue_"+ID_tmp);
 }
 
