Index: sandbox/2.2.0.2/expressoMail1_2/index.php
===================================================================
--- sandbox/2.2.0.2/expressoMail1_2/index.php	(revision 4339)
+++ sandbox/2.2.0.2/expressoMail1_2/index.php	(revision 4493)
@@ -28,4 +28,21 @@
 
 
+	/*
+	 * TODO: implementar o controle como preferência do usuário
+	 *
+	 */
+	$jcarousel = false;
+	if ($jcarousel) {
+		//jquery
+		echo "\n".'<script src="../library/jquery/jquery-1.6.1.min.js" type="text/javascript"></script>';
+		//jcarousel
+		echo "\n".'<script src="../library/jcarousel/lib/jquery.jcarousel.min.js" type="text/javascript"></script>';
+		echo "\n".'<link rel="stylesheet" type="text/css" href="../library/jcarousel/skins/default/skin.css" />';
+		//fancybox
+		echo "\n".'<script src="../library/fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>';
+		echo "\n".'<script src="../library/fancybox/jquery.easing-1.4.pack.js" type="text/javascript"></script>';
+		echo "\n".'<script src="../library/fancybox/jquery.mousewheel-3.0.4.pack.js" type="text/javascript"></script>';	
+		echo "\n".'<link rel="stylesheet" type="text/css" href="../library/fancybox/jquery.fancybox-1.3.4.css" />';		
+	}
 
 	
Index: sandbox/2.2.0.2/expressoMail1_2/templates/default/main.css
===================================================================
--- sandbox/2.2.0.2/expressoMail1_2/templates/default/main.css	(revision 4230)
+++ sandbox/2.2.0.2/expressoMail1_2/templates/default/main.css	(revision 4493)
@@ -1,2 +1,4 @@
+@import url("expressomail.css");
+
 pre{
 	white-space: pre-wrap !important; /* css-3 */
@@ -98,5 +100,5 @@
 	width : 100%;
 	color: black;
-        font-weight: bold;
+	font-weight: bold;
 	background-color: #ffc;
 	border-bottom:1px solid #cfcfcf;
@@ -154,12 +156,10 @@
 	table-layout: fixed;
 }
-.font-menu
-{
-    color: #000;
-}
-
-.font-menu-sel
-{
-       	color:#0000FF;
+.font-menu {
+	color:#000;
+}
+
+.font-menu-sel {
+	color:#0000FF;
 }
 
@@ -175,6 +175,5 @@
 }
 
-.menu-sel
-{
+.menu-sel{
     text-decoration: none;
     text-align: center;
@@ -191,6 +190,5 @@
     cursor: pointer;	
 }
-.menu
-{
+.menu{
     text-decoration: none;
     text-align: center;
@@ -207,22 +205,9 @@
 }
 
-.last_menu
-{
+.last_menu{
 	border-bottom: 1px solid #4a79b1;
 	-moz-border-radius: 0px 0px 0px 0px;
 }
 
-
-.table_message{
-	background-image: url(../../../phpgwapi/templates/default/images/fundo_msg.png);
-	padding: 1px;
-	cursor: default;
-	border-width: 1px 1px 1px 1px;
-	border-spacing: 0px 0px;
-	border-style: outset outset outset outset;
-	border-color: gray gray gray gray;
-	border-collapse: separate;
-	-moz-border-radius: 3px 3px 3px 3px;
-}
 .table_top{
 	background-color: #FFFFFF;
@@ -259,6 +244,5 @@
 }
 
-.suggestion_list
-{
+.suggestion_list{
 background: white;
 border: 1px solid;
@@ -266,6 +250,5 @@
 }
         
-.suggestion_list ul
-{
+.suggestion_list ul{
 padding: 0;
 margin: 0;
@@ -273,12 +256,10 @@
 }
 
-.suggestion_list a
-{
+.suggestion_list a{
 text-decoration: none;
 color: navy;
 }
 
-.suggestion_list .selected
-{
+.suggestion_list .selected{
 background: navy;
 color: white;
@@ -286,11 +267,9 @@
         
         
-.suggestion_list .selected a
-{
+.suggestion_list .selected a{
 color: white;
 }
 
-#autosuggest
-{
+#autosuggest{
 display: none;
 } 
@@ -356,6 +335,5 @@
 }
 
-.menu-folders
-{
+.menu-folders{
 	text-align: center;
 	text-decoration: none;
@@ -557,13 +535,11 @@
 .sl {
 	background-image: url(../../../phpgwapi/templates/default/images/foldertree_folderopen.png);
-
-}
-.dsused
-{
-        background-image: url(../../../expressoMail1_2/templates/default/images/dsused.gif);
-}
-
-.divAppboxHeader
-{	font-style:italic;	
+}
+.dsused {
+	background-image: url(../../../expressoMail1_2/templates/default/images/dsused.gif);
+}
+
+.divAppboxHeader{
+	font-style:italic;	
 	font-weight:normal;
 	font-variant: small-caps;	
@@ -578,5 +554,5 @@
 	input[type="file"]
 	{
-		      width:500px;
+		width:500px;
 	}
 }
Index: sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 4468)
+++ sandbox/2.2.0.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 4493)
@@ -1677,7 +1677,8 @@
                     continue;
                  
-                 $img = "<IMG id='".$msg_folder.";;".$msg_number.";;".$i.";;".$image['pid'].";;".$image['encoding']."' style='border:2px solid #fde7bc;padding:5px' title='".$this->functions->getLang("Click here do view (+)")."'src=./inc/show_thumbs.php?&msg_num=".$msg_number."&msg_folder=".$msg_folder."&msg_part=".$image['pid'].">";
-                 $href = "<a onMouseDown='save_image(event,this,\"".$image['type']."\")' href='#".$msg_folder.";;".$msg_number.";;".$i.";;".$image['pid'].";;".$image['encoding']."' onClick=\"window.open('./inc/show_img.php?msg_num=".$msg_number."&msg_folder=".$msg_folder."&msg_part=".$image['pid']."','mywindow','width=700,height=600,scrollbars=yes');\">". $img ."</a>";
-                 $thumbs_array[] = $href;
+                 $img = "<img id='".$msg_folder.";;".$msg_number.";;".$i.";;".$image['pid'].";;".$image['encoding']."' title='".$this->functions->getLang("Click here do view (+)")."'src=./inc/show_thumbs.php?&msg_num=".$msg_number."&msg_folder=".$msg_folder."&msg_part=".$image['pid']." />";
+                 $href = "./inc/show_img.php?msg_num=".$msg_number."&msg_folder=".$msg_folder."&msg_part=".$image['pid'];
+				 $anchor = "<a class=\"expressomail-thumbs-link\" onMouseDown='save_image(event,this,\"".$image['type']."\")' href=\"".$href."\" onclick=\"window.open('".$href."','mywindow','width=700,height=600,scrollbars=yes');return false;\">". $img ."</a>";
+                 $thumbs_array[] = $anchor; 
                  $i++;
                
Index: sandbox/2.2.0.2/expressoMail1_2/js/draw_api.js
===================================================================
--- sandbox/2.2.0.2/expressoMail1_2/js/draw_api.js	(revision 4461)
+++ sandbox/2.2.0.2/expressoMail1_2/js/draw_api.js	(revision 4493)
@@ -668,6 +668,5 @@
 }
 
-function getStyle(el,styleProp)
-{
+function getStyle(el,styleProp) {
 	var x = document.getElementById(el);
 	if (x.currentStyle)
@@ -919,4 +918,5 @@
 	}
 }
+
 function setColSizesCookie() {
 	var str = "maillist_colsizes=" + colSizes[0].join() + ":" + colSizes[1].join();
@@ -926,4 +926,5 @@
 	document.cookie = str;
 }
+
 function getColSizesCookie() {
 	var search = "maillist_colsizes=";
@@ -943,6 +944,5 @@
 // Draw the inbox and another folders
 function draw_box(headers_msgs, msg_folder, alternate){
-
-        /*
+	/*
 	 * When the paging response is not in the correct folder you need to change folder
 	 * This occurs when the Ajax response is not fast enough and the user click in outher
@@ -1244,9 +1244,9 @@
 // Passar o parâmetro offset para esta função
 function make_tr_message(headers_msgs, msg_folder, offsetToGMT){
-                if (typeof offsetToGMT == 'undefined')
-                {
-                    // In older local messages headers_msgs.offsetToGMT is undefined.
-                    offsetToGMT = typeof headers_msgs.offsetToGMT != 'undefined'?headers_msgs.offsetToGMT:0;
-                }
+		if (typeof offsetToGMT == 'undefined')
+		{
+			// In older local messages headers_msgs.offsetToGMT is undefined.
+			offsetToGMT = typeof headers_msgs.offsetToGMT != 'undefined'?headers_msgs.offsetToGMT:0;
+		}
 		var tr_element = document.createElement('tr');
 		if(typeof(preferences.line_height) != 'undefined')
@@ -1547,4 +1547,5 @@
 	//update_menu();
 }
+
 function draw_header_box(){
 	switch(sort_box_type){
@@ -1571,4 +1572,5 @@
 	document.getElementById("message_header_"+(sort_box_type.lastIndexOf("SORT") != "-1" ? sort_box_type : "SORTARRIVAL")+"_"+numBox ).innerHTML = "<B>"+type_name+"</B><img src ='templates/"+template+"/images/arrow_"+(sort_box_reverse == 1 ? 'desc' : 'asc')+"endant.gif'>";
 }
+
 function draw_message(info_msg, ID){
 	var content = document.getElementById('content_id_' + ID);
@@ -1588,16 +1590,17 @@
 	img_next_msg.style.cursor = 'pointer';
 
-        var folder_id = ID.match(/\d+/)[0];
-        var folder;
-
-        //Correção para fazer funcionar e-mails assinados no formato encapsulado.
-       // folder_id = info_msg.original_ID ? info_msg.original_ID: info_msg.msg_number;
-        if ((folder = document.getElementById(info_msg.original_ID)) == null)
-        //if ((folder = document.getElementById(info_msg.msg_number)) == null)
-            folder = document.getElementById(info_msg.msg_number);
+	var folder_id = ID.match(/\d+/)[0];
+	var folder;
+
+	//Correção para fazer funcionar e-mails assinados no formato encapsulado.
+   // folder_id = info_msg.original_ID ? info_msg.original_ID: info_msg.msg_number;
+	//if ((folder = document.getElementById(info_msg.msg_number)) == null)
+	if ((folder = Element(info_msg.original_ID)) == null)
+		folder = Element(info_msg.msg_number);
+		
 	if (!folder){
 		delete_border(ID);
 		return;
-		}
+	}
 	if (folder){ // mensagem local criptografada nao tem ID da pasta local
 		if (folder.nextSibling){
@@ -1687,6 +1690,8 @@
 	var tbody_message = document.createElement("TBODY");
 	table_message.border = "0";
-	table_message.width = "100%";
-
+	//table_message.width = "100%";
+	//k!
+	table_message.setAttribute("class", "expressomail-message-body");
+	table_message.setAttribute("className", "expressomail-message-body");
 	//////////////////////////////////////////////////////////////////////////////////////////////////////
 	//Make the options message.
@@ -1716,4 +1721,5 @@
 
 	td.innerHTML = _name.bold() + ', ' + info_msg.smalldate;
+	//k!
 	if (info_msg.attachments && info_msg.attachments.length > 0)
 		td.innerHTML += "&nbsp<img style='cursor:pointer' onclick='javascript:Element(\"option_hide_more_"+ID+"\").onclick()' src ='templates/"+template+"/images/clip.gif' title='"+info_msg.attachments[0].name+"'>";
@@ -1816,5 +1822,5 @@
 	option_forward.onclick = function(){new_message('forward', ID);};
 	option_forward.onmouseover=function () { this.className='message_options_active'; };
-        option_forward.onmouseout=function () { this.className='message_options' };
+	option_forward.onmouseout=function () { this.className='message_options' };
 	option_forward.innerHTML = get_lang('Forward');
 	options.appendChild(space1);
@@ -1964,5 +1970,4 @@
             }
             else{
-                //this.innerHTML += "Mais Informaï¿œï¿œes";
                 this.value = 'more_cert';
                 Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";
@@ -2281,43 +2286,59 @@
 	tr5.appendChild(subject);
 	tbody_message_others_options.appendChild(tr5);
-	if ( info_msg.attachments && info_msg.attachments.length > 0 ){
-	var tr6 = document.createElement("TR");
-		tr6.className = "tr_message_header";
-		var td6 = document.createElement("TD");
-		td6.innerHTML = get_lang("Attachments: ");
-
-		var attachments = document.createElement("TD");
-		td6.vAlign = "top";
-		attachments.align='left';
-		if(info_msg.attachments.length >= 1) {
-			if(info_msg.attachments.length > 1) {
-				var link_attachment	 = document.createElement("A");
-				 if(proxy_mensagens.is_local_folder(current_folder))
-					link_attachment.setAttribute("href", "javascript:expresso_local_messages.download_all_local_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
-				else
-					link_attachment.setAttribute("href", "javascript:download_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
-				link_attachment.innerHTML = " "+info_msg.attachments.length+' '+get_lang('files')+' :: '+get_lang('Download all atachments');
-				attachments.appendChild(link_attachment);
-			}
-			if(parseInt(preferences.remove_attachments_function))
-			{
-                                attachments.appendChild(document.createTextNode('  '));
-				var del_attachments = document.createElement("A");
-				del_attachments.setAttribute("href", "javascript:remove_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
-				del_attachments.innerHTML = get_lang('remove all attachments');
-                                attachments.appendChild(del_attachments);
-			}
-                        attachments.appendChild(document.createElement('BR'));
-		}
-
-		attachments.id = "attachments_" + ID;
-		for (var i=0; i<info_msg.attachments.length; i++){
+	//k!
+	if ( info_msg.attachments && info_msg.attachments.length > 0 )
+	{
+		var div_attach = document.createElement("DIV");
+		div_attach.setAttribute("class", "expressomail-attachments");
+		div_attach.setAttribute("className", "expressomail-attachments"); //for IE
+		
+		var div_attach_lbl = document.createElement("span");
+		div_attach_lbl.setAttribute("class", "expressomail-attachments-label");
+		div_attach_lbl.setAttribute("className", "expressomail-attachments-label"); //for IE
+		div_attach_lbl.innerHTML = get_lang("Attachments: ");
+		
+		var div_attach_list = document.createElement("UL");
+		div_attach_list.setAttribute("id", "attachments_" + ID);
+		div_attach_list.setAttribute("class", "expressomail-attachments-list");
+		div_attach_list.setAttribute("className", "expressomail-attachments-list"); //for IE
+		
+		if(info_msg.attachments.length > 1) {
+			var li_link_attachment = document.createElement("LI");
+			var link_attachment	= document.createElement("A");
+			link_attachment.setAttribute("class", "expressomail-attachments-link");
+			link_attachment.setAttribute("className", "expressomail-attachments-link"); //for IE
+	
+			if(proxy_mensagens.is_local_folder(current_folder))
+				link_attachment.setAttribute("href", "javascript:expresso_local_messages.download_all_local_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
+			else
+				link_attachment.setAttribute("href", "javascript:download_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
+			link_attachment.innerHTML = " "+info_msg.attachments.length+' '+get_lang('files')+' :: '+get_lang('Download all atachments');
+			li_link_attachment.appendChild(link_attachment);
+			div_attach_list.appendChild(li_link_attachment);
+		}
+		
+		if(parseInt(preferences.remove_attachments_function))
+		{
+			var li_link_attachment = document.createElement("LI");
+			var link_attachment	= document.createElement("A");
+			link_attachment.setAttribute("class", "expressomail-attachments-link");
+			link_attachment.setAttribute("className", "expressomail-attachments-link"); //for IE
+			link_attachment.setAttribute("href", "javascript:remove_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
+			link_attachment.innerHTML = get_lang('remove all attachments');
+
+			li_link_attachment.appendChild(link_attachment);
+			div_attach_list.appendChild(li_link_attachment);
+		}
+		
+		for (var i=0; i<info_msg.attachments.length; i++)
+		{
+			var li_link_attachment = document.createElement("LI");
 			var link_attachment = document.createElement("A");
 			link_attachment.setAttribute("href", proxy_mensagens.link_anexo(info_msg,i));
-			link_attachment.innerHTML = url_decode(info_msg.attachments[i].name);
-			link_attachment.innerHTML += " ("+borkb(info_msg.attachments[i].fsize)+")";
-
-			if((url_decode(info_msg.attachments[i].name).indexOf(".ics")!=-1) ||
-					(url_decode(info_msg.attachments[i].name).indexOf(".vcard")!=-1))
+			link_attachment.innerHTML = url_decode(info_msg.attachments[i].name) + " ("+borkb(info_msg.attachments[i].fsize)+")";
+			link_attachment.setAttribute("name", url_decode(info_msg.attachments[i].name));
+
+			//k trocar por match???
+			if((url_decode(info_msg.attachments[i].name).indexOf(".ics")!=-1) || (url_decode(info_msg.attachments[i].name).indexOf(".vcard")!=-1))
 			{
 				//Link para importar calendário
@@ -2331,19 +2352,25 @@
 				link_attachment.appendChild(link_import_attachment);
 			}
-
-			link_attachment.innerHTML += '<br/>';
-			attachments.appendChild(link_attachment);
-		}
+		
+			li_link_attachment.appendChild(link_attachment);
+			div_attach_list.appendChild(li_link_attachment);
+		}
+		div_attach.appendChild(div_attach_lbl);
+		div_attach.appendChild(div_attach_list);
+		
+		var tr6 = document.createElement("TR");
+		tr6.className = "tr_message_header";
+		var td6 = document.createElement("TD");
+		td6.setAttribute("colspan", "2");
+		td6.vAlign = "top";
+		td6.appendChild(div_attach);
 		tr6.appendChild(td6);
-		tr6.appendChild(attachments);
 		tbody_message_others_options.appendChild(tr6);
-	}
-
-
+	}	
+	//k!!
 	var div = document.createElement("DIV");
 	div.id = "div_message_scroll_"+ID;
-	div.style.background = 'WHITE';
-	div.style.overflow = "auto";
-	div.style.width = "100%";
+	div.setAttribute('class', 'div_message_scroll');
+	div.setAttribute('className', 'div_message_scroll'); //for IE
 	table_message_others_options.appendChild(tbody_message_others_options);
 	var tr = document.createElement("TR");
@@ -2449,45 +2476,59 @@
 	//Make the thumbs of the message.
 	//////////////////////////////////////////////////////////////////////////////////////////////////////
-	if ((info_msg.thumbs)&&(info_msg.thumbs.length > 0)){
-		var table_message_thumbs = document.createElement("TABLE");
-		table_message_thumbs.width = "80%";
-		table_message_thumbs.style.borderTop = "2px solid rgb(170, 170, 170)";
-		var tbody_message_thumbs = document.createElement("TBODY");
-		var tr = document.createElement("TR");
-		tr.className = "tr_message_body";
-		var td = document.createElement("TD");
-		td.setAttribute("colSpan","2");
-		td.id = "body_thumbs_"+ID;
-		td.innerHTML += "&nbsp;<font color='DARKBLUE' size='2'><b>"+info_msg.attachments.length+" "+get_lang("attachment")+(info_msg.attachments.length > 1 ? "s" : "")+" "+get_lang("in this message")+"</font></b>";
-		var _link_attachments = '';
-		if(info_msg.thumbs.length > 1){
-			_link_attachments 	= document.createElement("A");
-			_link_attachments.className = "message_options";
-			 if(proxy_mensagens.is_local_folder(current_folder))
-				_link_attachments.setAttribute("href", "javascript:expresso_local_messages.download_all_local_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
+	//k
+	
+	if ( (info_msg.thumbs) && (info_msg.thumbs.length > 0) ){
+		var div_thumbs = document.createElement("DIV");
+		div_thumbs.setAttribute("class", "expressomail-thumbs");
+		div_thumbs.setAttribute("className", "expressomail-thumbs"); //for IE
+		
+		var div_thumbs_lbl = document.createElement("DIV");
+		div_thumbs_lbl.setAttribute("class", "expressomail-thumbs-label");
+		div_thumbs_lbl.setAttribute("className", "expressomail-thumbs-label"); //for IE
+		
+		var div_thumbs_lbl_sp = document.createElement("SPAN");
+		div_thumbs_lbl_sp.setAttribute("class", "message_options");
+		div_thumbs_lbl_sp.setAttribute("className", "message_options"); //for IE
+		var div_thumbs_lbl_st = document.createElement("STRONG");
+		div_thumbs_lbl_st.innerHTML = info_msg.attachments.length+" "+get_lang("attachment")+(info_msg.attachments.length > 1 ? "s" : "")+" "+get_lang("in this message");
+		var div_thumbs_lbl_a  = document.createElement("A");
+
+		if(info_msg.thumbs.length > 1){				
+			if(proxy_mensagens.is_local_folder(current_folder))
+				div_thumbs_lbl_a.setAttribute("href", "javascript:expresso_local_messages.download_all_local_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
 			else
-				_link_attachments.setAttribute("href", "javascript:download_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
-			_link_attachments.innerHTML = get_lang('Download all atachments');
-		}
-
-		if(_link_attachments){
-			td.innerHTML +=	" :: ";
-			td.appendChild(_link_attachments);
-		}
-
-		td.innerHTML +=	"<BR><img src='templates/"+template+"/images/menu/ktip.png'>"+get_lang("<b>Tip:</b> For faster save, click over the image with <u>right button</u>.");
-		td.innerHTML += "<BR>";
+				div_thumbs_lbl_a.setAttribute("href", "javascript:download_all_attachments('"+info_msg.msg_folder+"','"+info_msg.msg_number+"')");
+			div_thumbs_lbl_a.innerHTML = get_lang('Download all atachments');
+		} else {
+			div_thumbs_lbl_a.setAttribute("style", "display:none; visibility:hidden;");
+		}
+
+		div_thumbs_lbl_sp.appendChild(div_thumbs_lbl_st);
+		div_thumbs_lbl_sp.appendChild(document.createTextNode(' :: '));
+		div_thumbs_lbl_sp.appendChild(div_thumbs_lbl_a);
+		div_thumbs_lbl.appendChild(div_thumbs_lbl_sp);
+		
+		var div_thumbs_lbl_sp2   = document.createElement("SPAN");
+		div_thumbs_lbl_sp2.setAttribute("class", "message_tips");
+		div_thumbs_lbl_sp2.setAttribute("className", "message_tips"); //for IE
+		div_thumbs_lbl_sp2.innerHTML = get_lang("<strong>Tip:</strong> <span>For faster save, click over the image with <em>right button</em>.</span>");
+		
+		var ul_thumbs_list = document.createElement("UL");
+		ul_thumbs_list.setAttribute("class", "expressomail-thumbs-list");
+		ul_thumbs_list.setAttribute("className", "expressomail-thumbs-list"); //for IE
 
 		for (var i=0; i<info_msg.thumbs.length; i++){
-			if ((i % 4) == 0)
-				td.innerHTML += "<BR>";
-			td.innerHTML += info_msg.thumbs[i];
-			td.innerHTML += "&nbsp;&nbsp;";
-		}
-		tr.appendChild(td);
-		tbody_message_thumbs.appendChild(tr);
-		table_message_thumbs.appendChild(tbody_message_thumbs);
-		div.appendChild(table_message_thumbs);
-	}
+			var li = document.createElement("LI");
+			li.innerHTML += info_msg.thumbs[i];
+			ul_thumbs_list.appendChild(li);
+		}
+		
+		div_thumbs.appendChild(div_thumbs_lbl);
+		div_thumbs.appendChild(div_thumbs_lbl_sp2);
+		div_thumbs.appendChild(ul_thumbs_list);
+		
+		div.appendChild(div_thumbs);
+	}
+	//k!!
 	//////////////////////////////////////////////////////////////////////////////////////////////////////
 	table_message.appendChild(tbody_message);
@@ -2510,6 +2551,33 @@
 			show_div_address_full(ID,'cc');
 	}
-
-}
+	
+	//k!
+	/*
+	 * TODO: implementar o controle como preferência do usuário
+	 *
+	 */
+	var jcarousel = false;
+	
+	if (jcarousel) {
+		jQuery(document).ready(function() {
+			jQuery('.expressomail-thumbs-list').attr('id', 'expressomail-thumbs-list'+ID);
+			jQuery('.expressomail-thumbs-list').addClass('jcarousel-skin-default');
+			jQuery('#expressomail-thumbs-list'+ID).jcarousel({
+				// Configuration
+			});
+		});
+		
+		//fancybox
+		jQuery(document).ready(function() {
+			jQuery(".expressomail-thumbs-list li a").attr('onclick', 'return true;');
+			jQuery(".expressomail-thumbs-list li a").fancybox({
+				'hideOnContentClick': true,
+				'type': 'image'
+			});
+		});
+	}
+	//k!!
+}
+ 
 function changeLinkState(el,state){
 	el.innerHTML = get_lang(state);
@@ -2551,4 +2619,5 @@
 	}
 }
+
 function draw_new_message(border_ID){
 	connector.loadScript("color_palette");
@@ -2646,5 +2715,5 @@
 	sel_from.id = "from_"+ID;
 	sel_from.name = "input_from";
-	sel_from.style.width = "70%";
+	sel_from.style.width = "100%";
 	sel_from.setAttribute("wrap","soft");
 	td_from.appendChild(sel_from);
@@ -2657,19 +2726,19 @@
 	var td1_2 = document.createElement("TD");
 	tr1_2.style.display = 'none';
-        td1_2.innerHTML = get_lang("Reply to")+":";
+	td1_2.innerHTML = get_lang("Reply to")+":";
 	td1_2.setAttribute("noWrap","true");
 	td1_2.style.width = "1%";
 
 	var td_replyto = document.createElement("TD");
-        td_replyto.setAttribute("noWrap","true");
+	td_replyto.setAttribute("noWrap","true");
 	td_replyto.style.width = "100%";
 
-        var input_replyto = document.createElement('INPUT');
+	var input_replyto = document.createElement('INPUT');
 	input_replyto.id = "replyto_"+ID;
-        input_replyto.name = "input_replyto";
+	input_replyto.name = "input_replyto";
 	input_replyto.setAttribute("tabIndex","1");
-        input_replyto.style.width = "100%";
+	input_replyto.style.width = "100%";
 	input_replyto.setAttribute("wrap","soft");
-        input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus', this.id);};
+	input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus', this.id);};
 	input_replyto.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
 
@@ -3045,5 +3114,5 @@
 	input_subject.name = "input_subject";
 	input_subject.setAttribute("tabIndex","1");
-	input_subject.style.width = "90%";
+	input_subject.style.width = "100%";
 	input_subject.setAttribute("autocomplete","off");
 	td_subject.appendChild(input_subject);
@@ -3351,4 +3420,5 @@
 	}
 }
+
 function updateBoxBgColor(box){
 	// Set first TR Class
@@ -3641,7 +3711,7 @@
 	content_id_0.appendChild(table);
 }
-	var idx_cc = 0;
-function draw_plugin_cc(ID, addrs)
-{
+var idx_cc = 0;
+
+function draw_plugin_cc(ID, addrs){
 	connector.loadScript("ccQuickAdd");
 
@@ -3681,4 +3751,5 @@
 	return to_addybook_add;
 }
+
 function deny_email(email){
 	connector.loadScript("filter");
@@ -3693,4 +3764,5 @@
 
 }
+
 function show_div_address_full(id, type) {
 	var div_address_full = Element("div_"+type+"address_full_"+id);
@@ -3716,4 +3788,5 @@
 	div_address_full.style.display='';
 }
+
 function draw_footer_box(num_msgs){
 	folder = get_current_folder();
