function checkMail(mail){
    var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
    if(typeof(mail) == "string"){
        if(er.test(mail)){ return true; }
    }else if(typeof(mail) == "object"){
        if(er.test(mail.value)){
                    return true;
                }
    }else{
        return false;
        }
}
function validaForm(){
var nome = document.form1.nome;
var dia = document.form1.dia;
var mes = document.form1.mes;
var ano = document.form1.ano;
var estadocivil = document.form1.estadocivil;
var escolaridade = document.form1.escolaridade;
var email = document.form1.email;
var dddResidencial = document.form1.dddResidencial;
var telresidencial = document.form1.telresidencial;
var dddCelular = document.form1.dddCelular;
var telCelular = document.form1.telCelular;
var dddComercial = document.form1.dddComercial;
var telcomercial = document.form1.telcomercial;
var capinvest = document.form1.capinvest;
var cidadeinteresse = document.form1.cidadeinteresse;
var ufinteresse = document.form1.ufinteresse;
var comoconheceu = document.form1.comoconheceu;

if(nome.value ==""){alert("Preencha o campo Nome!"); nome.focus(); return false;}
if(dia.value ==""){alert("Preencha o campo Dia de Nascimento!"); dia.focus(); return false;}
if(dia.value<1||dia.value>31){alert("Preencha o Dia de nascimento corretamente!"); dia.focus(); return false;}
if(isNaN(dia.value)== true){alert("Preencha o campo Dia de nascimento corretamente!"); dia.focus(); return false;}

if(mes.value ==""){alert("Selecione o Męs de nascimento!"); mes.focus(); return false;}

if(ano.value ==""){alert("Selecione o Ano de nascimento!"); ano.focus(); return false;}
if(isNaN(ano.value)== true){alert("Preencha o campo Ano de nascimento corretamente!"); ano.focus(); return false;}

if(estadocivil.value ==""){alert("Preencha o campo Estado Civil!"); estadocivil.focus(); return false;}

if(escolaridade.value ==""){alert("Selecione o campo Escolaridade!"); escolaridade.focus(); return false;}

if (email.value == ""){alert("Preencha o campo E-mail"); email.focus(); return false; }
else if (!checkMail(email.value)){alert("Preencher o campo E-mail corretamente!"); email.focus(); return false;}

if(dddResidencial.value ==""){alert("Digite o DDD do telefone residencial!"); dddResidencial.focus(); return false;}
if(isNaN(dddResidencial.value)== true){alert("Preencha o campo DDD Residencial corretamente!"); dddResidencial.focus(); return false;}

if(telresidencial.value ==""){alert("Digite o Telefone residencial!"); telresidencial.focus(); return false;}
if(isNaN(telresidencial.value)== true){alert("Preencha o campo Telefone Residencial corretamente!"); telresidencial.focus(); return false;}

if(dddCelular.value ==""){alert("Digite o DDD do telefone celular!"); dddCelular.focus(); return false;}
if(isNaN(dddCelular.value)== true){alert("Preencha o campo DDD Celular corretamente!"); dddCelular.focus(); return false;}

if(telCelular.value ==""){alert("Digite o Telefone celular!"); telCelular.focus(); return false;}
if(isNaN(telCelular.value)== true){alert("Preencha o campo Telefone Celular corretamente!"); telCelular.focus(); return false;}

if(dddComercial.value ==""){alert("Digite o DDD do telefone comercial!"); dddComercial.focus(); return false;}
if(isNaN(dddComercial.value)== true){alert("Preencha o campo DDD comercial corretamente!"); dddComercial.focus(); return false;}

if(telcomercial.value ==""){alert("Digite o DDD do telefone comercial!"); telcomercial.focus(); return false;}
if(isNaN(telcomercial.value)== true){alert("Preencha o campo DDD comercial corretamente!"); telcomercial.focus(); return false;}

if(capinvest.value ==""){alert("Selecione o campo Capital de Investimento!"); capinvest.focus(); return false;}

if(cidadeinteresse.value ==""){alert("Preencha o campo Cidade de Interesse!"); cidadeinteresse.focus(); return false;}

if(ufinteresse.value ==""){alert("Preencha o campo UF de Interesse!"); ufinteresse.focus(); return false;}

if(comoconheceu.value ==""){alert("Selecione o campo Como conheceu o negócio!"); comoconheceu.focus(); return false;}
}