Index: /branches/2.0/expressoMail1_2/js/main.js
===================================================================
--- /branches/2.0/expressoMail1_2/js/main.js	(revision 3146)
+++ /branches/2.0/expressoMail1_2/js/main.js	(revision 3522)
@@ -1148,5 +1148,5 @@
 			var campo_arquivo
 			if (Element("attachments_" + border_ID)){
-				var attachments = document.getElementById("attachments_" + border_ID).childNodes;
+				var attachments = document.getElementById("attachments_" + border_ID).getElementsByTagName("a");
 				for (var i = (attachments.length > 1 ? 1 : 0); i < attachments.length; i++){
 					if((attachments[i].tagName=="SPAN") || (attachments[i].tagName=="IMG") ||
@@ -1155,5 +1155,5 @@
 					var link_attachment = document.createElement("A");
 					link_attachment.setAttribute("href", attachments[i].href);
-					link_attachment.innerHTML = attachments[i].innerHTML;
+					link_attachment.innerHTML = attachments[i].firstChild.nodeValue + '<br/>';
 					if (data.is_local_message) {//Local messages
 						document.getElementById("is_local_forward"+new_border_ID).value = "1";
@@ -1386,9 +1386,11 @@
 			}
 			return false;};
-			var attachments = document.getElementById("attachments_" + old_id_border).childNodes;
+			//var attachments = document.getElementById("attachments_" + old_id_border).childNodes;
+			var attachments = document.getElementById("attachments_" + old_id_border).getElementsByTagName("a");
 			for (var i = (attachments.length > 1 ? 1 : 0); i < attachments.length; i++){
 				var link_attachment = document.createElement("A");
 				link_attachment.setAttribute("href", attachments[i].href);
-				link_attachment.innerHTML = attachments[i].innerHTML;
+				//link_attachment.innerHTML = attachments[i].innerHTML;
+				link_attachment.innerHTML = attachments[i].firstChild.nodeValue + '<br/>';
 				var tmp = link_attachment.href.replace("javascript:download_attachments(", "").replace(")", "");
 				var a_tmp = tmp.split(',');
Index: /branches/2.0/expressoMail1_2/js/draw_api.js
===================================================================
--- /branches/2.0/expressoMail1_2/js/draw_api.js	(revision 3142)
+++ /branches/2.0/expressoMail1_2/js/draw_api.js	(revision 3522)
@@ -1674,22 +1674,19 @@
 			else
 				link_attachment.innerHTML += ' (' + msg_size + ' bytes)';
-			if((url_decode(info_msg.attachments[i].name).indexOf(".ics")!=-1) || (url_decode(info_msg.attachments[i].name).indexOf(".vcard")!=-1)){
+			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
 				var link_import_attachment = new Image();
 				link_import_attachment.src = "templates/"+template+"/images/new.png";
-				link_import_attachment.setAttribute("onclick","javascript:import_calendar('"+info_msg.msg_folder+"&msg_number="+info_msg.msg_number+"&msg_part="+info_msg.attachments[i].pid+"&idx_file="+i+"&encoding="+info_msg.attachments[i].encoding+"');");
+				link_import_attachment.setAttribute("onclick","javascript:import_calendar('"+info_msg.msg_folder+"&msg_number="+info_msg.msg_number+"&msg_part="+info_msg.attachments[i].pid+"&idx_file="+i+"&encoding="+info_msg.attachments[i].encoding+"'); return false;");
 				link_import_attachment.title = get_lang("Import to calendar");
-				link_import_attachment.align = "top";				
+				link_import_attachment.align = "top";
+				link_import_attachment.style.marginLeft = "5px";
 				link_import_attachment.style.cursor = "pointer";
-				var space = document.createElement("span");
-				space.innerHTML = "&nbsp;";
-				attachments.appendChild(link_attachment);
-				attachments.appendChild(space);
-				attachments.appendChild(link_import_attachment);
-			}
-			else {
-				link_attachment.innerHTML += '<BR>';
-				attachments.appendChild(link_attachment);
-			}
+				link_attachment.appendChild(link_import_attachment);
+			}
+			
+			link_attachment.innerHTML += '<br/>';
+			attachments.appendChild(link_attachment);
 		}
 		tr6.appendChild(td6);
