Index: /trunk/expressoMail1_2/js/draw_api.js
===================================================================
--- /trunk/expressoMail1_2/js/draw_api.js	(revision 4843)
+++ /trunk/expressoMail1_2/js/draw_api.js	(revision 4934)
@@ -438,5 +438,5 @@
 		}
 
-		draw_tree_folders(data);                
+		draw_tree_folders(data);
 		if(data) {
 
@@ -1218,5 +1218,5 @@
 	document.getElementById("table_message_header_box_"+numBox).emptyBody = true;
         var div_pasta = document.getElementById("div_msg_info");
-        if (!div_pasta){       
+        if (!div_pasta){
             div_info = document.createElement("div");
             div_info.setAttribute("id", "div_msg_info");
@@ -1342,5 +1342,5 @@
 		td_element23 = createTDElement(0,4,"td_msg",null,"td_message_important_"+headers_msgs.msg_number);
 
-		if (headers_msgs.Flagged == 'F' || (headers_msgs.Importance.toLowerCase().indexOf("high") != -1 )) 
+		if (headers_msgs.Flagged == 'F' || (headers_msgs.Importance.toLowerCase().indexOf("high") != -1 ))
 		{
 			td_element23.innerHTML = "<img src ='templates/"+template+"/images/important.gif' title='"+get_lang('Important')+"'>";
@@ -1939,7 +1939,14 @@
                          td_signature.innerHTML += '<span style=color:red><strong>'+get_lang(info_msg.signature[i].substring(0,info_msg.signature[i].indexOf("#@#")))+'</strong> '+info_msg.signature[i].substring(info_msg.signature[i].indexOf("#@#")+3)+'</span> <br /> ';
                         }
-                    if(info_msg.signature[i].indexOf("###") > -1)
+                    else
                         {
-                         td_signature.innerHTML += '<span><strong>'+get_lang(info_msg.signature[i].substring(0,info_msg.signature[i].indexOf("###")))+'</strong> '+info_msg.signature[i].substring(info_msg.signature[i].indexOf("###")+3)+'</span> <br /> ';
+                            if(info_msg.signature[i].indexOf("###") > -1)
+                                {
+                                    td_signature.innerHTML += '<span><strong>'+get_lang(info_msg.signature[i].substring(0,info_msg.signature[i].indexOf("###")))+'</strong> '+info_msg.signature[i].substring(info_msg.signature[i].indexOf("###")+3)+'</span> <br /> ';
+                                }
+                            else
+                                {
+                                    td_signature.innerHTML += '<span><strong>'+get_lang(info_msg.signature[i])+'</strong></span> <br /> ';
+                                }
                         }
                 }
@@ -2985,86 +2992,86 @@
  		        { 
  		 
- 		            var tr3 = document.createElement("TR"); 
- 		            tr3.id = "tr_cco_"+ID; 
- 		            tr3.style.display = 'none'; 
- 		            var td3 = document.createElement("TD"); 
- 		            td3.setAttribute("noWrap","true"); 
- 		            td3.innerHTML = get_lang("CCo")+":"; 
- 		            td3.style.width = "1%"; 
- 		             
- 		            var td_cco = document.createElement("TD"); 
- 		            td_cco.setAttribute("noWrap","true"); 
- 		            td_cco.style.width = "100%"; 
- 		             
- 		            var input_cco = document.createElement('TEXTAREA'); 
- 		            input_cco.id = "cco_"+ID; 
- 		            input_cco.name = "input_cco"; 
- 		            input_cco.setAttribute("tabIndex","1"); 
- 		            input_cco.style.width = "100%"; 
- 		            input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus',this.id);}; 
- 		            input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 
- 		             
- 		            if (!is_ie) 
- 		            { 
- 		                input_cco.rows = 2; 
+	var tr3 = document.createElement("TR");
+	tr3.id = "tr_cco_"+ID;
+	tr3.style.display = 'none';
+	var td3 = document.createElement("TD");
+	td3.setAttribute("noWrap","true");
+	td3.innerHTML = get_lang("CCo")+":";
+	td3.style.width = "1%";
+
+	var td_cco = document.createElement("TD");
+	td_cco.setAttribute("noWrap","true");
+	td_cco.style.width = "100%";
+
+	var input_cco = document.createElement('TEXTAREA');
+	input_cco.id = "cco_"+ID;
+	input_cco.name = "input_cco";
+	input_cco.setAttribute("tabIndex","1");
+	input_cco.style.width = "100%";
+	input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);};
+	input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
+
+	if (!is_ie)
+	{
+		input_cco.rows = 2;
  		                input_cco.onkeypress = function (e) 
- 		                { 
- 		                    if ((e.keyCode) == 120) //F9 
- 		                    { 
- 		                        emQuickSearch(input_cco.value, 'cco', ID); 
- 		                    } 
- 		                    else  
- 		                    {  
- 		                        if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden')) 
- 		                        { 
- 		                            e.preventDefault(); 
- 		                            search_contacts(e.keyCode,this.id); 
- 		                        } 
- 		                    } 
- 		                } 
- 		                input_cco.onkeyup = function (e) 
- 		                { 
- 	                    if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40)) 
- 		                    { 
- 		                        search_contacts(e.keyCode,this.id); 
- 		                    } 
- 	                } 
- 		            } 
- 		            else if (is_ie) 
- 		            { 
- 		                input_cco.rows = 3; 
- 		                input_cco.onkeyup = function (e) 
- 		                { 
- 		                    if ((window.event.keyCode) == 120) //F9 
- 		                    { 
- 		                        emQuickSearch(input_cco.value, 'cco', ID); 
- 		                    } 
- 		                    else  
- 		                    {  
- 		                        search_contacts(window.event.keyCode,this.id); 
- 		                    }    
- 		                } 
- 		            } 
- 		             
- 		            td_cco.appendChild(input_cco); 
- 		            var img_search = document.createElement("IMG"); 
- 		            img_search.src = "./templates/"+template+"/images/search.gif"; 
- 		            img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.');         
- 		            img_search.onclick = function () {emQuickSearch(document.getElementById('cco_'+ID).value, 'cco', ID);}; 
- 		            var span_search = document.createElement("SPAN"); 
- 		            span_search.innerHTML = get_lang('Search'); 
- 		 
- 		            var td3_img_search = document.createElement("TD"); 
- 		            td3_img_search.setAttribute("noWrap","true"); 
- 		            var td3_span_search = document.createElement("TD"); 
- 		            td3_span_search.setAttribute("noWrap","true");       
- 		             
- 		            td3_img_search.appendChild(img_search); 
- 		            td3_span_search.appendChild(span_search); 
- 		                     
- 		            tr3.appendChild(td3); 
- 		            tr3.appendChild(td_cco); 
- 		            tr3.appendChild(td3_img_search);     
- 		            tbody_message.appendChild(tr3); 
+		{
+			if ((e.keyCode) == 120) //F9
+			{
+				emQuickSearch(input_cco.value, 'cco', ID);
+			}
+			else
+			{
+				if (((e.keyCode == 13) || ((e.keyCode == 38)||(e.keyCode == 40))) && (document.getElementById('tipDiv').style.visibility!='hidden'))
+				{
+					e.preventDefault();
+					search_contacts(e.keyCode,this.id);
+				}
+			}
+		}
+		input_cco.onkeyup = function (e)
+		{
+			if ((e.keyCode != 13) && (e.keyCode != 38) && (e.keyCode != 40))
+			{
+				search_contacts(e.keyCode,this.id);
+			}
+		}
+	}
+	else if (is_ie)
+	{
+		input_cco.rows = 3;
+		input_cco.onkeyup = function (e)
+		{
+			if ((window.event.keyCode) == 120) //F9
+			{
+				emQuickSearch(input_cco.value, 'cco', ID);
+			}
+			else
+			{
+				search_contacts(window.event.keyCode,this.id);
+			}
+		}
+	}
+
+	td_cco.appendChild(input_cco);
+	var img_search = document.createElement("IMG");
+	img_search.src = "./templates/"+template+"/images/search.gif";
+	img_search.title = get_lang('Search') + " | " + get_lang('Use F9 Key as shortcut.');
+	img_search.onclick = function () {emQuickSearch(document.getElementById('cco_'+ID).value, 'cco', ID);};
+	var span_search = document.createElement("SPAN");
+	span_search.innerHTML = get_lang('Search');
+
+	var td3_img_search = document.createElement("TD");
+	td3_img_search.setAttribute("noWrap","true");
+	var td3_span_search = document.createElement("TD");
+	td3_span_search.setAttribute("noWrap","true");
+
+	td3_img_search.appendChild(img_search);
+	td3_span_search.appendChild(span_search);
+
+	tr3.appendChild(td3);
+	tr3.appendChild(td_cco);
+	tr3.appendChild(td3_img_search);
+	tbody_message.appendChild(tr3);
  		        } 
 //////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -3097,6 +3104,6 @@
  		        { 
  		            space.id ="space_link_"+ID; 
- 		            space.innerHTML="&nbsp;|&nbsp;"; 
- 		            td2_link.appendChild(space); 
+	space.innerHTML="&nbsp;|&nbsp;";
+	td2_link.appendChild(space);
  		            var a_cco_link = document.createElement('A'); 
  		            a_cco_link.innerHTML = get_lang('Add BCC'); 
@@ -3236,5 +3243,5 @@
 			document.createTextNode( ' | ' )
 		).parentNode.appendChild(
-			document.createTextNode( get_lang('Send this mail as text plain') + '.')		
+			document.createTextNode( get_lang('Send this mail as text plain') + '.')
                 ).parentNode.appendChild(
                         document.createElement( 'input' )
@@ -3351,5 +3358,5 @@
 		draw_from_field(sel_from,tr1_1);
 	resizeWindow();
-       
+
         if ( ! expresso_offline )
         {
@@ -3550,5 +3557,5 @@
 
         td221.setAttribute("style","width: 100%");
-        
+
 	tr221.appendChild(td221);
 	tbody221.appendChild(tr221);
