Index: trunk/expressoMail1_2/js/abas.js
===================================================================
--- trunk/expressoMail1_2/js/abas.js	(revision 7414)
+++ trunk/expressoMail1_2/js/abas.js	(revision 7520)
@@ -452,4 +452,5 @@
                                         delete(openTab.type[ID]);
                                         close_delete(ID, msg_sent);
+                                       
                                     }
                                     else if(clicked == 'Salvar e fechar' || clicked == 'Salvar estado atual fechar')
@@ -457,4 +458,5 @@
                                         save_msg(ID);
                                         openTab.toPreserve[ID] = false;
+                                    
                                         close_delete(ID, msg_sent);
                                         delete(openTab.type[ID]);
@@ -507,6 +509,6 @@
 function delete_border(ID, msg_sent)
 {
-	
-	if($("#border_id_"+ID).attr("title") == get_lang("New Message")){
+
+	/*if($("#border_id_"+ID).attr("title") == get_lang("New Message")){
 		var to = $("#content_id_"+ID).find(".to").parent(".email-area").find("div").length || $("#content_id_"+ID).find(".email-area").find(".to").val();
 		var cc = $("#content_id_"+ID).find(".cc").parent(".email-area").find("div").length || $("#content_id_"+ID).find(".email-area").find(".cc").val();
@@ -528,5 +530,16 @@
 		}
 	}
-        var bolExecuteClose = true;
+    */
+    if($("#content_id_"+currentTab+" textarea[name=input_to]").length ){
+        if($("#content_id_"+currentTab+" .save").is(':disabled') ) {
+             close_delete(ID, msg_sent);
+        } else if( $("#content_id_"+currentTab+" .save").is(':enabled') ) {
+             return(draftTests(ID, msg_sent));
+        }
+    } else {
+        close_delete(ID, msg_sent);
+    }
+     
+    /*var bolExecuteClose = true;
 	var borderElem = Element("border_id_" + ID);
 	if (borderElem){
@@ -543,4 +556,6 @@
             }
 	}
+    
+        
         if (bolExecuteClose)
         {
@@ -548,4 +563,6 @@
 		}
 		delete(openTab.type[ID]);
+        return true;*/
+         delete(openTab.type[ID]);
         return true;
 }
Index: trunk/expressoMail1_2/js/main.js
===================================================================
--- trunk/expressoMail1_2/js/main.js	(revision 7514)
+++ trunk/expressoMail1_2/js/main.js	(revision 7520)
@@ -463,4 +463,5 @@
 function watch_changes_in_msg(border_id)
 {
+    console.log("oi");
 	if (document.getElementById('border_id_'+border_id))
 	{
@@ -2246,6 +2247,23 @@
 	var content = $("#content_id_"+new_border_ID);
 
+//It is verifying if the message was modified or not.
+var btnSaveVerify = function(){
+    $("#content_id_"+currentTab+" .save").button("disable")
+
+
+    $("#content_id_"+currentTab+" .to").keydown(function() {  
+        $("#content_id_"+currentTab+" .save").button("enable");
+     } );
+    $("#content_id_"+currentTab+" input[name=input_subject]").keydown(function() {  
+        $("#content_id_"+currentTab+" .save").button("enable");
+     } );
+
+    RichTextEditor.keydown(new_border_ID);
+}
+
 switch(type){
 		case "reply_without_history":
+            btnSaveVerify();
+
 			RichTextEditor.replyController = true; //Seta o editor como modo reply
 			content.find('[name="input_to"]').val(data.to);			
@@ -2264,4 +2282,6 @@
 			break;
 		case "reply_with_history":
+            btnSaveVerify();
+
 			RichTextEditor.replyController = true; //Seta o editor como modo reply 
 			title = "Re: " + html_entities(data.subject);
@@ -2283,4 +2303,6 @@
 			break;
 		case "reply_to_all_without_history":
+            btnSaveVerify();
+
 			RichTextEditor.replyController = true; //Seta o editor como modo reply
 			// delete user email from to_all array.
@@ -2329,4 +2351,6 @@
 			break;
 		case "reply_to_all_with_history":
+            btnSaveVerify(); 
+
 			RichTextEditor.replyController = true; //Seta o editor como modo reply 
 			//delete user email from to_all array.
@@ -2383,4 +2407,6 @@
 			break;
 		case "forward":
+            btnSaveVerify();
+
 			title = "Fw: " + html_entities(data.subject);
 			content.find(".subject").val("Fw: " + data.subject);
@@ -2406,4 +2432,7 @@
 			break;
 		case "new":
+        
+        btnSaveVerify();
+
 			title = get_lang("New Message");
 			if(Element('msg_number').value) {
@@ -2435,5 +2464,6 @@
 			break;
 		case "edit":
-		
+		btnSaveVerify();
+
 			if(flagged == 'F')
 				$(".important").addClass("expressomail-button-icon-ative");
@@ -3359,4 +3389,6 @@
 function autoSave( ID )
 {
+    $(".save").addClass("clicked");
+
 	saveButtonDisabled = $("#content_id_"+ID).find(".save").button('option','disabled');
     if(autoSaveControl.status[ID] === false && !saveButtonDisabled)
@@ -3366,4 +3398,9 @@
 function save_msg(border_id){
     
+    if(!$("content_id_"+border_id+" .save").hasClass("clicked")){
+        $("content_id_"+border_id+" .save").addClass("clicked");
+    }
+
+
     //seta o status do auto_save = true
    if (preferences.auto_save_draft == 1)
Index: trunk/expressoMail1_2/js/rich_text_editor.js
===================================================================
--- trunk/expressoMail1_2/js/rich_text_editor.js	(revision 6699)
+++ trunk/expressoMail1_2/js/rich_text_editor.js	(revision 7520)
@@ -176,4 +176,5 @@
 		save_link.unbind("click").click(function(){
 			openTab.toPreserve[id] = true;save_msg(id);
+            $(".save").addClass("clicked");
 		});
 		save_link.button({ disabled: false });
@@ -363,4 +364,19 @@
         element.setAttribute('contentEditable','true'); 
 } 
+cRichTextEditor.prototype.keydown = function (id,rec){
+    if (rec === undefined) rec = 1;
+    rec++;
+    if( CKEDITOR.instances['body_'+ id] === undefined ) return;    
+    var element = CKEDITOR.instances['body_'+ id];  
+    
+    if(element.document){
+        element.document.on('keydown',function(){
+            $("#content_id_"+currentTab+" .save").button("enable");
+        });
+    } else {
+        if (rec <= 20)
+                setTimeout(function(){RichTextEditor.keydown(id,rec)},500);
+    }
+}
 //Build the Object
 RichTextEditor = new cRichTextEditor();
