Index: trunk/expressoMail1_2/js/main.js
===================================================================
--- trunk/expressoMail1_2/js/main.js	(revision 5949)
+++ trunk/expressoMail1_2/js/main.js	(revision 5962)
@@ -1639,8 +1639,9 @@
 			block_quoted_body = make_body_reply(data.body, data.to, data.date_day, data.date_hour);
 			// Insert the signature automaticaly at message body if use_signature preference is set
-			if (preferences.use_signature == "1")  
-				RichTextEditor.setInitData(new_border_ID, '<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>' + block_quoted_body,true); 
-			else
+			if (preferences.use_signature == "1"){  
+				RichTextEditor.setInitData(new_border_ID, '<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>' + block_quoted_body,true); 				
+			}else{
 				RichTextEditor.setInitData(new_border_ID,'<div><br type="_moz"></div>'+ block_quoted_body,true);
+			}
 			break;
 		case "reply_to_all_without_history":
@@ -1681,6 +1682,7 @@
                         
 			useOriginalAttachments(new_border_ID,border_ID);  
-			if (preferences.use_signature == "1")  
+			if (preferences.use_signature == "1"){  
 				RichTextEditor.setInitData(new_border_ID,'<div><br type="_moz"></div>' + signature,true);
+			}
 				
 			break;
@@ -1723,8 +1725,9 @@
 			block_quoted_body = make_body_reply(data.body, data.to, data.date_day, data.date_hour);
 			
-			if (preferences.use_signature == "1")  
+			if (preferences.use_signature == "1"){  
 				RichTextEditor.setInitData(new_border_ID,'<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>'+ block_quoted_body,true); 
-			else                   
+			}else{                
 				RichTextEditor.setInitData(new_border_ID,block_quoted_body,true); 
+			}
 				
 			break;
@@ -1739,8 +1742,14 @@
 			
 			// Insert the signature automaticaly at message body if use_signature preference is set
-			if (preferences.use_signature == "1")  
- 		                            RichTextEditor.setInitData(new_border_ID,'<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>'+ make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc)); 
- 		                        else   
- 		                            RichTextEditor.setInitData(new_border_ID,make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc));   
+			if (preferences.use_signature == "1"){ 
+				$("#body_"+new_border_ID).val('<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>'+ make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc));
+ 		        RichTextEditor.setInitData(new_border_ID,'<div><br type="_moz"></div>' + signature + '<div><br type="_moz"></div>'+ make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc)); 
+				content.find(".to").focus();
+			}
+			else{   
+				$("#body_"+new_border_ID).val(make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc));
+				RichTextEditor.setInitData(new_border_ID,make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc));   
+				content.find(".to").focus();
+			}
 
 			break;
@@ -1765,6 +1774,9 @@
 			
 			// Insert the signature automaticaly at message body if use_signature preference is set
-			 if (preferences.use_signature == "1") 
+			 if (preferences.use_signature == "1"){ 
+				$("#body_"+new_border_ID).val('<div><br type="_moz"></div>' + signature);
 				RichTextEditor.setInitData(new_border_ID, '<div><br type="_moz"></div>' + signature);
+				content.find(".to").focus();
+			 }
 			 else
 			   content.find('[name="input_to"]').focus(); 
@@ -1823,7 +1835,5 @@
 			if (Element("attachments_" + border_ID))
 				addOriginalAttachments(new_border_ID,border_ID);
-                         
 			RichTextEditor.setInitData(new_border_ID, data.body, 'edit');
-      
 			break;
 		default:
Index: trunk/expressoMail1_2/js/rich_text_editor.js
===================================================================
--- trunk/expressoMail1_2/js/rich_text_editor.js	(revision 5924)
+++ trunk/expressoMail1_2/js/rich_text_editor.js	(revision 5962)
@@ -241,70 +241,59 @@
 }
 cRichTextEditor.prototype.setInitData = function (id,data,reply,recursion){
-    
-    if(recursion === undefined) recursion = 1;
-    else recursion++;    
-    
-     if(this.plain[id] === true)
-     {               
-                data =  data.replace( new RegExp('<pre>((.\n*)*)</pre>'),'$1');
-                
-                if($('#'+id) !== undefined){
+	var content = $("#content_id_"+id);
+	if(recursion === undefined){
+		recursion = 1;
+	}else{
+		recursion++;    
+	}
+	if(this.plain[id] === true){               
+		data =  data.replace( new RegExp('<pre>((.\n*)*)</pre>'),'$1');
+		if($('#'+id) !== undefined){
 			$('#'+id).val(data);
-		 if (reply === undefined)	
-			$('#to_'+id).focus();
-         }
-         else
-			  setTimeout(function() {RichTextEditor.setInitData(id,data,reply,recursion); }, 500);
-	 }  
-     else
-     {
-       if( RichTextEditor.editorReady === true && CKEDITOR.instances['body_'+id] !== undefined )    
-       {
-           var editor =   CKEDITOR.instances['body_'+id];   
-           editor.insertHtml('');
-           var selection = editor.getSelection();
-           if(selection !== undefined && selection !== null) var selectionRanges = selection.getRanges(); 
-
-           var fontSize = '';
-           var fontFamily = '';
-           
-           if(typeof(preferences.font_size_editor) !== 'undefined')
-               fontSize = 'font-size:' + preferences.font_size_editor;
-               
-           if(fontSize != '') 
-               fontFamily = ';'
-           
-           if(typeof(preferences.font_family_editor) !== 'undefined')
-               fontFamily += 'font-family:' + preferences.font_family_editor + ';'; 
-            
-           var divBr = '<div style="'+fontSize+fontFamily+'"><br type="_moz"></div>';
-          
-		    if(reply === undefined){
-				editor.on('insertHtml',function setFocus(e){
-							setTimeout("$('#to_"+id+"').focus()",100);
-							editor.removeListener('insertHtml', setFocus);
-						}
-				);
-				editor.insertHtml(divBr+divBr+data);
+			if (reply === undefined){	
+				$('#to_'+id).focus();
 			}
-			else if(reply == 'edit')
-				editor.insertHtml(data);
-			else
-				editor.insertHtml(divBr+data);
-           
-           if(selection !== null) selection.selectRanges(selectionRanges); 
-		   
-		   //Coloca o scroll do editor no inicio
-		   if (is_webkit){
+		}
+		else{
+			setTimeout(function() {RichTextEditor.setInitData(id,data,reply,recursion); }, 500);
+		}
+	}  
+	else{
+		if( RichTextEditor.editorReady === true && CKEDITOR.instances['body_'+id] !== undefined ){
+			var editor =   CKEDITOR.instances['body_'+id]; 
+			var selection = editor.getSelection();
+			var fontSize = '';
+			var fontFamily = '';
+			if(typeof(preferences.font_size_editor) !== 'undefined')
+				fontSize = 'font-size:' + preferences.font_size_editor;
+			if(fontSize != '') 
+				fontFamily = ';'
+			if(typeof(preferences.font_family_editor) !== 'undefined')
+				fontFamily += 'font-family:' + preferences.font_family_editor + ';'; 
+			var divBr = '<div style="'+fontSize+fontFamily+'"><br type="_moz"></div>';
+			
+			if(selection !== undefined && selection !== null){
+				var selectionRanges = selection.getRanges(); 
+			}
+			if(reply !== undefined){
+				if(reply == 'edit')
+					editor.insertHtml(data);
+				else
+					editor.insertHtml(divBr+data);
+				editor.focus();
+			}			
+			
+			if(selection !== null){
+				selection.selectRanges(selectionRanges); 
+			}
+			if (is_webkit){
 				$('#cke_contents_body_'+id+'>iframe').scrollTo(':first');
-		   }
-          //Caso não for uma resposta votla o foco para o input to
-          //if(reply === undefined)    
-            //      setTimeout("$('#to_"+id+"').focus()",100);
-  
-       }
-       else if(recursion < 20)
-           setTimeout(function() {RichTextEditor.setInitData(id,data,reply,recursion); }, 500);
-     } 
+			}
+
+		}
+		else if(recursion < 20){
+			setTimeout(function() {RichTextEditor.setInitData(id,data,reply,recursion); }, 500);
+		}
+	} 
 }
 
