Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/mail_archiver.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/mail_archiver.js	(revision 4856)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/mail_archiver.js	(revision 4871)
@@ -151,5 +151,12 @@
     this.drawdata = null;
     this.onprocess = false;
-    this.queryconfig = new MAQueryConfig();
+    this.specialfolders = {
+                            "inbox":"local_inbox", 
+                            "sent":"local_sent", 
+                            "drafts":"local_drafts", 
+                            "outbox":"local_outbox", 
+                            "trash":"local_trash"
+                          };
+    //this.queryconfig = new MAQueryConfig();
 }
 
@@ -380,4 +387,120 @@
     window.setTimeout("eval('document.getElementById(\"main_title\").innerHTML =\"Expresso Mail\"')",3000);
 }
+
+/**
+ *Archieve Delete Message
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ *@param msg_number Unique identification of the message
+ */
+MailArchiver.prototype.deleteMessages = function(msgs_number){
+    try{
+        expresso_mail_archive.CreateMessageList(msgs_number);
+        if((expresso_mail_archive.message_list.length > 0) && (expresso_mail_archive.message_list[0] != '')) {
+            ArchiveServices.deleteMessages(expresso_mail_archive.deleteMessagesOperationOK, 
+                                           expresso_mail_archive.deleteMessagesOperationFailure, 
+                                           sessid, 
+                                           expresso_mail_archive.message_list);
+        }
+    }
+    catch (e){
+        return (e);
+    }
+}
+
+/**
+ *Archieve Delete Message Ok
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ */
+MailArchiver.prototype.deleteMessagesOperationOK = function(){
+    var drawinginfo = {treeObject: tree_folders, treeName: 'tree_folders'};
+    expresso_mail_archive.drawdata = drawinginfo;
+    expresso_mail_archive.drawFolderTree();
+    expresso_mail_archive.listMessages();
+    if(expresso_mail_archive.message_list.length > 1){
+        write_msg(get_lang("The messages were deleted."));
+    }else{
+        write_msg(get_lang("The message was deleted."));
+    } 
+}
+
+/**
+ *Archieve Delete Message Operation Failure
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ */
+MailArchiver.prototype.deleteMessagesOperationFailure = function(error_message){
+    if(expresso_mail_archive.message_list.length > 1){
+        write_msg(get_lang("Error deleting messages.") + ' ' + error_message.getReturn());
+    }else{
+        write_msg(get_lang("Error deleting message.") + ' ' + error_message.getReturn());
+    } 
+}
+
+/**
+ *Move message
+ *
+ *@param folder Folder where the message will be moved
+ *@param msgs_number Unique Id of the message
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ */
+MailArchiver.prototype.moveMessages = function(folder, msgs_number){
+    try{
+        expresso_mail_archive.CreateMessageList(msgs_number);
+        if((expresso_mail_archive.message_list.length > 0) && (expresso_mail_archive.message_list[0] != '')) {
+            ArchiveServices.moveMessages(expresso_mail_archive.moveMessagesOperationOK, 
+                                           expresso_mail_archive.moveMessagesOperationFailure,
+                                           sessid, 
+                                           expresso_mail_archive.message_list,
+                                           folder
+                                       );
+        }
+        else {
+            throw "Error moving the messages!";
+        }
+    }
+    catch (e){
+        return (e);
+    }
+}
+
+/**
+ *Move Message Ok
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ */
+MailArchiver.prototype.moveMessagesOperationOK = function(){
+    var drawinginfo = {treeObject: tree_folders, treeName: 'tree_folders'};
+    expresso_mail_archive.drawdata = drawinginfo;
+    expresso_mail_archive.drawFolderTree();
+    expresso_mail_archive.listMessages();
+    if(expresso_mail_archive.message_list.length > 1){
+        write_msg(get_lang("The messages were moved."));
+    }else{
+        write_msg(get_lang("The message was moved."));
+    } 
+}
+
+/**
+ *Move Message Failure
+ *
+ *@author Cassiano Dal Pizzol [cassiano.dalpizzol@serpro.gov.br]
+ *
+ */
+MailArchiver.prototype.moveMessagesOperationFailure = function(error_message){
+    if(expresso_mail_archive.message_list.length > 1){
+        write_msg(get_lang("Error deleting messages.") + ' ' + error_message.getReturn());
+    }else{
+        write_msg(get_lang("Error deleting message.") + ' ' + error_message.getReturn());
+    } 
+}
+
 
 //getFolderList Operation
@@ -666,6 +789,6 @@
     //window.alert('em toExpressoFrom com data = \n' + data + '[' + typeof(data) + ']('+data.length+')');
     var Fromdata = eval("(" + data + ")");
-    var dataName = Fromdata.mailbox.name.$;
-    var dataEmail = Fromdata.mailbox.localPart.$ + '@' + Fromdata.mailbox.domain.$;
+    var dataName = Fromdata.mailbox["@name"];
+    var dataEmail = Fromdata.mailbox["@localPart"] + '@' + Fromdata.mailbox["@domain"];
     //window.alert('name = ' + Fromdata.mailbox.name.$ + '\nlocal part = ' + Fromdata.mailbox.localPart.$ + '\ndomain = ' + Fromdata.mailbox.domain.$);
        
