Index: branches/2.2/expressoMail1_2/setup/phpgw_en.lang
===================================================================
--- branches/2.2/expressoMail1_2/setup/phpgw_en.lang	(revision 1747)
+++ branches/2.2/expressoMail1_2/setup/phpgw_en.lang	(revision 3352)
@@ -211,6 +211,8 @@
 Message Header	expressoMail1_2	en	Message Header
 Message marked as 	expressoMail1_2	en	Message marked as 
-Message signed by: 	expressoMail1_2	pt-br	Message signed by:
-Message untouched	expressoMail1_2	pt-br	Message untouched
+Message signed by: 	expressoMail1_2	en	Message signed by:
+Message untouched	expressoMail1_2	en	Message untouched
+Message untouched and authentic	expressoMail1_2	en	Message untouched and authentic
+Message untouched with signer different from sender	expressoMail1_2	en	Message untouched with signer different from sender
 message(s) deleted from your trash folder.	expressoMail1_2	en	message(s) deleted from your trash folder.
 messages	expressoMail1_2	en	messages
@@ -422,2 +424,15 @@
 Rows	expressoMail1_2	en	Rows
 Cols	expressoMail1_2	en	Cols
+Certificate Owner	expressoMail1_2	en	Certificate Owner
+Common Name (CN)	expressoMail1_2	en	Common Name (CN)
+Organization (O)	expressoMail1_2	en	Organization (O)
+Organizational Unit (OU)	expressoMail1_2	en	Organizational Unit (OU)
+Personal Data	expressoMail1_2	en	Personal Data
+Birthday	expressoMail1_2	en	Birthday
+Fiscal Id	expressoMail1_2	en	Fiscal Id
+Identification	expressoMail1_2	en	Identification
+Certificate Issuer	expressoMail1_2	en	Certificate Issuer
+Validity	expressoMail1_2	en	Validity
+Valid From	expressoMail1_2	en	Valid From
+Valid Until	expressoMail1_2	en	Valid Until
+Serial Number	expressoMail1_2	en	Serial Number
Index: branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang
===================================================================
--- branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 3298)
+++ branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 3352)
@@ -297,4 +297,6 @@
 Messages saved in %1 folder.	expressoMail1_2	pt-br	Mensagens salvas na pasta %1.
 Message untouched	expressoMail1_2	pt-br	Mensagem Íntegra
+Message untouched and authentic	expressoMail1_2	pt-br	Mensagem íntegra e autêntica
+Message untouched with signer different from sender	expressoMail1_2	pt-br	Mensagem Íntegra, com e-mail do signatário diferente do remetente
 message without receiver	expressoMail1_2	pt-br	Você deve fornecer pelo menos um endereço de destinatário de email.
 Message with read notification	expressoMail1_2	pt-br	Mensagem com confirmação de leitura.
@@ -593,2 +595,15 @@
 zip mails to import	expressoMail1_2	pt-br	Arquivo .zip ou .eml:
 Show TO: in place of FROM: only in Automatic SEND folder	expressoMail1_2	pt-br	Trocar remetente pelo destinatário na coluna QUEM somente na pasta Enviado
+Certificate Owner	expressoMail1_2	en	Expedido para
+Common Name (CN)	expressoMail1_2	en	Nome Comum (CN)
+Organization (O)	expressoMail1_2	en	Empresa (O)
+Organizational Unit (OU)	expressoMail1_2	en	Unidade Organizacional (OU)
+Personal Data	expressoMail1_2	en	Dados Pessoais
+Birthday	expressoMail1_2	en	Data de nascimento
+Fiscal Id	expressoMail1_2	en	CPF
+Identification	expressoMail1_2	en	Documento identidade
+Certificate Issuer	expressoMail1_2	en	Expedido por
+Validity	expressoMail1_2	en	Validade
+Valid From	expressoMail1_2	en	Expedido em
+Valid Until	expressoMail1_2	en	Valido ate
+Serial Number	expressoMail1_2	en	Numero de serie
Index: branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3298)
+++ branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 3352)
@@ -1258,139 +1258,103 @@
 	function get_signature($msg, $msg_number, $msg_folder)
 	{
-        include_once(dirname( __FILE__ ) ."/../../security/classes/CertificadoB.php");
-		include_once("class.db_functions.inc.php");
-		foreach ($msg->file_type[$msg_number] as $index => $file_type)
-		{
-            $sign = array();
-			$temp = $this->get_info_head_msg($msg_number);
-			if($temp['ContentType'] =='normal') return $sign;
-			$file_type = strtolower($file_type);
-			if(strtolower($msg->encoding[$msg_number][$index]) == 'base64')
+            include_once(dirname( __FILE__ ) ."/../../security/classes/CertificadoB.php");
+            include_once("class.db_functions.inc.php");
+            foreach ($msg->file_type[$msg_number] as $index => $file_type)
+	    {
+                $sign = array();
+                $temp = $this->get_info_head_msg($msg_number);
+                if($temp['ContentType'] =='normal') return $sign;
+                $file_type = strtolower($file_type);
+                if(strtolower($msg->encoding[$msg_number][$index]) == 'base64')
+		{
+                    if ($file_type == 'application/x-pkcs7-signature' || $file_type == 'application/pkcs7-signature')
+                    {
+			if(!$this->mbox || !is_resource($this->mbox))
+                            $this->mbox = $this->open_mbox($msg_folder);
+
+                        $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255);
+
+                        $imap_msg	 	= @imap_fetchheader($this->mbox, $msg_number, FT_UID);
+                        $imap_msg		.= @imap_body($this->mbox, $msg_number, FT_UID);
+
+                        $certificado = new certificadoB();
+                        $validade = $certificado->verificar($imap_msg);
+
+                        if ($certificado->apresentado)
 			{
-				if ($file_type == 'application/x-pkcs7-signature' || $file_type == 'application/pkcs7-signature')
-				{
-					if(!$this->mbox || !is_resource($this->mbox))
-					$this->mbox = $this->open_mbox($msg_folder);
-
-					$header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $msg_number), 80, 255);
-
-					$imap_msg	 	= @imap_fetchheader($this->mbox, $msg_number, FT_UID);
-					$imap_msg		.= @imap_body($this->mbox, $msg_number, FT_UID);
-
-					$certificado = new certificadoB();
-					$validade = $certificado->verificar($imap_msg);
-
-					if ($certificado->apresentado)
-					{
-						$from = $header->from;
-						foreach ($from as $id => $object) {
-							$fromname = $object->personal;
-						    $fromaddress = $object->mailbox . "@" . $object->host;
-					}
-						$sign_alert = '';
-						foreach ($certificado->erros_ssl as $item)
-						{
-							$check_error_msg = $this->functions->getLang($item);
-							/*
-							 * Desabilite o teste abaixo para mostrar todas as mensagem
-							 * de erro.
-							 */
-							//if (!strpos($check_error_msg,'*',strlen($check_error_msg-1)))
-							//{
-							$sign[] = "<span style=color:red>" . $check_error_msg . " </span>";
-							//}
-						}
-						if (count($certificado->erros_ssl) < 1)
-						{
-							$check_msg = $this->functions->getLang('Message untouched') . " ";
-							if(strtoupper($fromaddress) != strtoupper($certificado->dados['EMAIL']))
-							{
-								$check_msg .= $this->functions->getLang('and') . " ";
-								$check_msg .= $this->functions->getLang('authentic');
-							}
-							$sign[] = "<strong>".$check_msg."</strong>";
-						}
-						if(strtoupper($fromaddress) != strtoupper($certificado->dados['EMAIL']))
-						{
-							$sign[] = 	"<span style=color:red>" .
-										$this->functions->getLang('message') . " " .
-							        	$this->functions->getLang('with signer different from sender') .
-							        	" </span>";
-						}
-						$sign[] = "<strong>" . $this->functions->getLang('Message signed by: ') . "</strong>" . $certificado->dados['NOME'];
-						$sign[] = "<strong>" . $this->functions->getLang('Certificate email: ') . "</strong>" . $certificado->dados['EMAIL'];
-						$sign[] = "<strong>" . $this->functions->getLang('Mail from: ') . "</strong>" . $fromaddress;
-						$sign[] = "<strong>" . $this->functions->getLang('Certificate Authority: ') . "</strong>" . $certificado->dados['EMISSOR'];
-						$sign[] = "<strong>" . $this->functions->getLang('Validity of certificate: ') . "</strong>" . gmdate('r',openssl_to_timestamp($certificado->dados['FIM_VALIDADE']));
-						$sign[] = "<strong>" . $this->functions->getLang('Message date: ') . "</strong>" . $header->Date;
-
-					    $cert = openssl_x509_parse($certificado->cert_assinante);
-						/*
-						$sign[] = '<table>';
-						$sign[] = '<tr><td colspan=1><b>Expedido para:</b></td></tr>';
-						$sign[] = '<tr><td>Nome Comum (CN) </td><td>' . $cert[subject]['CN'] .  '</td></tr>';
-						$X = substr($certificado->dados['NASCIMENTO'] ,0,2) . '-' . substr($certificado->dados['NASCIMENTO'] ,2,2) . '-'  . substr($certificado->dados['NASCIMENTO'] ,4,4);
-						$sign[] = '<tr><td>Data de nascimento </td><td>' . $certificado->dados['NASCIMENTO'] .  '</td></tr>';
-						$sign[] = '<tr><td>CPF </td><td>' . $certificado->dados['CPF'] .  '</td></tr>';
-						$sign[] = '<tr><td>Documento identidade </td><td>' . $certificado->dados['RG'] .  '</td></tr>';
-						$sign[] = '<tr><td>Empresa (O) </td><td>' . $cert[subject]['O'] .  '</td></tr>';
-						$sign[] = '<tr><td>Unidade Organizacional (OU) </td><td>' . $cert[subject]['OU'][0] .  '</td></tr>';
-						//$sign[] = '<tr><td>Numero de serie </td><td>' . $cert['serialNumber'] .  '</td></tr>';
-						$sign[] = '<tr><td colspan=1> </td></tr>';
-						$sign[] = '<tr><td colspan=1><b>Expedido por:</b></td></tr>';
-						$sign[] = '<tr><td>Nome Comum (CN) </td><td>' . $cert[issuer]['CN'] .  '</td></tr>';
-						$sign[] = '<tr><td>Empresa (O) </td><td>' . $cert[issuer]['O'] .  '</td></tr>';
-						$sign[] = '<tr><td>Unidade Organizacional (OU) </td><td>' . $cert[issuer]['OU'][0] .  '</td></tr>';
-						$sign[] = '<tr><td colspan=1> </td></tr>';
-						$sign[] = '<tr><td colspan=1><b>Validade:</b></td></tr>';
-						$H = data_hora($cert[validFrom]);
-						$X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
-						$sign[] = '<tr><td>Expedido em </td><td>' . $X .  '</td></tr>';
-						$H = data_hora($cert[validTo]);
-						$X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
-						$sign[] = '<tr><td>Valido ate </td><td>' . $X .  '</td></tr>';
-						$sign[] = '<tr><td colspan=1> </td></tr>';
-						$sign[] = '</table>';
-						*/
-						$sign_alert .= 'Expedido para:\n';
-						$sign_alert .= 'Nome Comum (CN)  ' . $cert[subject]['CN'] .  '\n';
-						$X = substr($certificado->dados['NASCIMENTO'] ,0,2) . '-' . substr($certificado->dados['NASCIMENTO'] ,2,2) . '-'  . substr($certificado->dados['NASCIMENTO'] ,4,4);
-						$sign_alert .= 'Data de nascimento ' . $X .  '\n';
-						$sign_alert .= 'CPF ' . $certificado->dados['CPF'] .  '\n';
-						$sign_alert .= 'Documento identidade ' . $certificado->dados['RG'] .  '\n';
-						$sign_alert .= 'Empresa (O)  ' . $cert[subject]['O'] .  '\n';
-						$sign_alert .= 'Unidade Organizacional (OU) ' . $cert[subject]['OU'][0] .  '\n';
-						//$sign_alert[] = '<tr><td>Numero de serie </td><td>' . $cert['serialNumber'] .  '</td></tr>';
-						$sign_alert .= '\n';
-						$sign_alert .= 'Expedido por:\n';
-						$sign_alert .= 'Nome Comum (CN) ' . $cert[issuer]['CN'] . '\n';
-						$sign_alert .= 'Empresa (O)  ' . $cert[issuer]['O'] .  '\n';
-						$sign_alert .= 'Unidade Organizacional (OU) ' . $cert[issuer]['OU'][0] .  '\n';
-						$sign_alert .= '\n';
-						$sign_alert .= 'Validade:\n';
-						$H = data_hora($cert[validFrom]);
-						$X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
-						$sign_alert .= 'Expedido em ' . $X .  '\n';
-						$H = data_hora($cert[validTo]);
-						$X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
-						$sign_alert .= 'Valido ate ' . $X .  '\n';
-
-						$sign[] = "<a onclick=\"javascript:alert('" . $sign_alert . "')\"><b><font color=\"#0000FF\">".$this->functions->getLang("More")."...</font></b></a>";
-						$this->db = new db_functions();
-
-						// TODO: testar se existe um certificado no banco e verificar qual ï¿œ o mais atual.
-                        if(!$certificado->dados['EXPIRADO'] && !$certificado->dados['REVOGADO'] && count($certificado->erros_ssl) < 1)
-                            $this->db->insert_certificate(strtolower($certificado->dados['EMAIL']), $certificado->cert_assinante, $certificado->dados['SERIALNUMBER'], $certificado->dados['AUTHORITYKEYIDENTIFIER']);
-					}
-				     else
-				    {
-				    	$sign[] = "<span style=color:red>" . $this->functions->getLang('Invalid signature') . "</span>";
-				    	foreach($certificado->erros_ssl as $item)
-				    	$sign[] = "<span style=color:red>" . $this->functions->getLang($item) . "</span>";
+                            $from = $header->from;
+                            foreach ($from as $id => $object)
+                            {
+				$fromname = $object->personal;
+				$fromaddress = $object->mailbox . "@" . $object->host;
+                            }
+                            foreach ($certificado->erros_ssl as $item)
+                            {
+                                $sign[] = $item . "#@#";
+                            }
+
+                            if (count($certificado->erros_ssl) < 1)
+                            {
+                                $check_msg = 'Message untouched';
+                                if(strtoupper($fromaddress) == strtoupper($certificado->dados['EMAIL']))
+                                {
+                                    $check_msg .= ' and authentic###';
+                                }
+                                else
+                                {
+                                    $check_msg .= ' with signer different from sender#@#';
+                                }
+                                $sign[] = $check_msg;
+                            }
+                                                
+                            $sign[] = 'Message signed by: ###' . $certificado->dados['NOME'];
+                            $sign[] = 'Certificate email: ###' . $certificado->dados['EMAIL'];
+                            $sign[] = 'Mail from: ###' . $fromaddress;
+                            $sign[] = 'Certificate Authority: ###' . $certificado->dados['EMISSOR'];
+                            $sign[] = 'Validity of certificate: ###' . gmdate('r',openssl_to_timestamp($certificado->dados['FIM_VALIDADE']));
+                            $sign[] = 'Message date: ###' . $header->Date;
+
+                            $cert = openssl_x509_parse($certificado->cert_assinante);
+
+                            $sign_alert = array();
+                            $sign_alert[] = 'Certificate Owner###:\n';
+                            $sign_alert[] = 'Common Name (CN)###  ' . $cert[subject]['CN'] .  '\n';
+                            $X = substr($certificado->dados['NASCIMENTO'] ,0,2) . '-' . substr($certificado->dados['NASCIMENTO'] ,2,2) . '-'  . substr($certificado->dados['NASCIMENTO'] ,4,4);
+                            $sign_alert[]= 'Organization (O)###  ' . $cert[subject]['O'] .  '\n';
+                            $sign_alert[]= 'Organizational Unit (OU)### ' . $cert[subject]['OU'][0] .  '\n';
+                            //$sign_alert[] = 'Serial Number### ' . $cert['serialNumber'] . '\n';
+                            $sign_alert[] = 'Personal Data###:' . '\n';
+                            $sign_alert[] = 'Birthday### ' . $X .  '\n';
+                            $sign_alert[]= 'Fiscal Id### ' . $certificado->dados['CPF'] .  '\n';
+                            $sign_alert[]= 'Identification### ' . $certificado->dados['RG'] .  '\n\n';
+                            $sign_alert[]= 'Certificate Issuer###:\n';
+                            $sign_alert[]= 'Common Name (CN)###  ' . $cert[issuer]['CN'] . '\n';
+                            $sign_alert[]= 'Organization (O)###  ' . $cert[issuer]['O'] .  '\n';
+                            $sign_alert[]= 'Organizational Unit (OU)### ' . $cert[issuer]['OU'][0] .  '\n\n';
+                            $sign_alert[]= 'Validity###:\n';
+                            $H = data_hora($cert[validFrom]);
+                            $X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
+                            $sign_alert[]= 'Valid From### ' . $X .  '\n';
+                            $H = data_hora($cert[validTo]);
+                            $X = substr($H,6,2) . '-' . substr($H,4,2) . '-'  . substr($H,0,4);
+                            $sign_alert[]= 'Valid Until### ' . $X;
+                            $sign[] = $sign_alert;
+
+                            $this->db = new db_functions();
+                            
+                            // TODO: testar se existe um certificado no banco e verificar qual ï¿œ o mais atual.
+                            if(!$certificado->dados['EXPIRADO'] && !$certificado->dados['REVOGADO'] && count($certificado->erros_ssl) < 1)
+                                $this->db->insert_certificate(strtolower($certificado->dados['EMAIL']), $certificado->cert_assinante, $certificado->dados['SERIALNUMBER'], $certificado->dados['AUTHORITYKEYIDENTIFIER']);
+			}
+                        else
+                        {
+                            $sign[] = "<span style=color:red>" . $this->functions->getLang('Invalid signature') . "</span>";
+                            foreach($certificado->erros_ssl as $item)
+                                $sign[] = "<span style=color:red>" . $this->functions->getLang($item) . "</span>";
+                        }
                     }
-				}
-			}
-		}
-   		return $sign;
+		}
+            }
+            return $sign;
 	}
 
@@ -1502,4 +1466,5 @@
 			* não preciso reimplementar o método utilizando o fetchheader.
 			*/
+                    
 	                $tempHeader = @imap_fetchheader($this->mbox, imap_msgno($this->mbox, $msg_number));
 			$flag = preg_match('/importance *: *(.*)\r/i', $tempHeader, $importance);
Index: branches/2.2/expressoMail1_2/js/draw_api.js
===================================================================
--- branches/2.2/expressoMail1_2/js/draw_api.js	(revision 3287)
+++ branches/2.2/expressoMail1_2/js/draw_api.js	(revision 3352)
@@ -18,5 +18,4 @@
 	}
 var currentTab,numBox = 0; // Open Tab and num of mailboxes opened at context
-
 // Objeto Map, talvez o ideal fosse adicionar este objeto à Api do egroupware, e carregá-lo
 // aqui no expressoMail.
@@ -1478,48 +1477,71 @@
 	if (info_msg.signature && info_msg.signature.length > 0)
 	{
-		var tr_signature = document.createElement("TR");
-		var td_signature = document.createElement("TD");
-		td_signature.className = 'tr_message_header';
-		tr_signature.id = 'tr_signature_'+ID;
-		td_signature.colSpan = "5";
-		tr_signature.style.display = 'none';
-
-		for (i in info_msg.signature)
-			td_signature.innerHTML += '<span>'+info_msg.signature[i]+'</span> <br /> ';
-		//var signature_status_pos = info_msg.signature[0].indexOf(get_lang('Message untouched'));
-                var signature_status_pos = info_msg.signature[0].indexOf('Message untouched');
-		td_signature.id = "td_signature_"+ID;
-		if(signature_status_pos < 0 )
-		{
-		td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'">';
-		tr_signature.style.display = '';
-		}
-		else
-		{
-		td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'">';
-		}
-		td.onclick = function(){
-		var _height = Element("div_message_scroll_"+ID).style.height;
-		_height = parseInt(_height.replace("px",""));
-		var _offset = 130;
-		if (this.value == 'more_cert'){
-			//this.innerHTML += "<b><u>Mais Informaï¿œï¿œes</u></b>";
-			this.value = 'hide_cert';
-			Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px";
-			Element('tr_signature_'+ID).style.display = 'none';
-			Element('td_signature_'+ID).style.display = 'none';
-
-		}
-		else{
-			//this.innerHTML += "Mais Informaï¿œï¿œes";
-			this.value = 'more_cert';
-			Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";
-			Element('tr_signature_'+ID).style.display = '';
-			Element('td_signature_'+ID).style.display = '';
-		}
+            var tr_signature = document.createElement("TR");
+            var td_signature = document.createElement("TD");
+            td_signature.className = 'tr_message_header';
+            tr_signature.id = 'tr_signature_'+ID;
+            td_signature.colSpan = "5";
+            tr_signature.style.display = 'none';
+            for (i in info_msg.signature)
+                {
+                    if(typeof(info_msg.signature[i]) == 'object')
+                        {
+                            var aux = '';
+                            for (ii in info_msg.signature[i])
+                                {
+                                    if(info_msg.signature[i][ii].indexOf("###") > -1)
+                                        {
+                                         aux += get_lang(info_msg.signature[i][ii].substring(0,info_msg.signature[i][ii].indexOf("###"))) + info_msg.signature[i][ii].substring(info_msg.signature[i][ii].indexOf("###")+3);
+                                        }
+                                    else
+                                        {
+                                         aux += info_msg.signature[i][ii];
+                                        }
+                                }
+                            td_signature.innerHTML += "<a onclick=\"javascript:alert('" + aux + "')\"><b><font color=\"#0000FF\">" + get_lang("More") + "...</font></b></a>";
+                            continue;
+                        }
+                    if(info_msg.signature[i].indexOf("#@#") > -1)
+                        {
+                         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)
+                        {
+                         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 /> ';
+                        }
+                }
+            var signature_status_pos = info_msg.signature[0].indexOf('Message untouched');
+            td_signature.id = "td_signature_"+ID;
+            if(signature_status_pos < 0 )
+                {
+                    td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_error.gif" title="'+get_lang("Details")+'">';
+                    tr_signature.style.display = '';
+                }
+            else
+                {
+                    td.innerHTML += '&nbsp;<img style="cursor:pointer" src="templates/'+template+'/images/signed_table.gif" title="'+get_lang("Details")+'">';
+                }
+            td.onclick = function(){
+            var _height = Element("div_message_scroll_"+ID).style.height;
+            _height = parseInt(_height.replace("px",""));
+            var _offset = 130;
+            if (this.value == 'more_cert'){
+                this.value = 'hide_cert';
+                Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px";
+                Element('tr_signature_'+ID).style.display = 'none';
+                Element('td_signature_'+ID).style.display = 'none';
+
+            }
+            else{
+                //this.innerHTML += "Mais Informaï¿œï¿œes";
+                this.value = 'more_cert';
+                Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";
+                Element('tr_signature_'+ID).style.display = '';
+                Element('td_signature_'+ID).style.display = '';
+            }
 	};
 
-		tr_signature.appendChild(td_signature);
-		tbody_message_options.appendChild(tr_signature);
+            tr_signature.appendChild(td_signature);
+            tbody_message_options.appendChild(tr_signature);
 	}
 	//////////// END SIGNATURE ////////////////
