function valida_campos(frm){
var nome = frm.nome;
var  email = frm.email;
var  tel = frm.tel;
var  assunto = frm.assunto;
var mensagem = frm.mensagem;

if(nome.value==""){
alert("Por favor, preencha o campo nome");
nome.focus();
return false;
}
 
if(email.value==""){
alert("Por favor, preencha o campo email");
email.focus();
return false;
}else if(email.value.indexOf("@")==-1 || email.value.indexOf(".")==-1){
alert("Email inválido");
email.focus();
return false;
}

if(tel.value==""){
alert("Por favor, preencha o campo telefone");
tel.focus();
return false;
}
				   
if(assunto.value==""){
alert("Por favor, preencha o campo assunto");
assunto.focus();
return false;
}

if(mensagem.value==""){
alert("Por favor, preencha o campo mensagem");
mensagem.focus();
return false;
}

return true;
}

