function validar()
{
 var texto, msgaux, erro, atPos; 
 msgaux = 'Volte ao campo descrito abaixo e complete a informação:' 
 erro=false;


// campo nome DA PESSOA
 texto = document.formulario.remetente.value; 
 if (texto.length < 2)  
 { 
     msgaux+='\n- Campo REMETENTE não está Completo';      
     erro=true;
 } 

// campo EMAIL
texto = document.formulario.rem_email.value;
    if (texto.length < 5) { 
        msgaux+='\n- Campo EMAIL DO REMETENTE não está Completo';         
        erro=true;
    } 
	else {
		atPos= document.formulario.rem_email.value.indexOf('@');
        if (atPos < 1 || atPos == (document.formulario.rem_email.value.length - 1)) {
			msgaux+='\n- Campo EMAIL DO REMETENTE não está Completo';         
	        erro=true;
		}
	}
	
	
// campo nome DA PESSOA
 texto = document.formulario.destinatario.value; 
 if (texto.length < 2){ 
     msgaux+='\n- Campo DESTINATÁRIO não está Completo';      
     erro=true;
 } 
 
 

// campo EMAIL
texto = document.formulario.des_email.value;
    if (texto.length < 5) { 
        msgaux+='\n- Campo EMAIL DO DESTINATÁRIO não está Completo';         
        erro=true;
    } 
	else {
		atPos= document.formulario.des_email.value.indexOf('@');
        if (atPos < 1 || atPos == (document.formulario.des_email.value.length - 1)) {
			msgaux+='\n- Campo EMAIL DO DESTINATÁRIO não está Completo';         
	        erro=true;
		}
	}


// campo nome DA PESSOA
 texto = document.formulario.mensagem.value; 
 if (texto.length < 2){ 
     msgaux+='\n- Campo MENSAGEM não está Completo';      
     erro=true;
 }
 
// campo nome DA PESSOA
 texto = document.formulario.security_code.value; 
 if (texto.length < 5){ 
     msgaux+='\n- Campo CODIGO não está Completo';      
     erro=true;
 } 


  if (erro) alert(msgaux);
return !(erro);
}


