function valida(form){

//NOME
if (form.nome.value == ""){
alert("O campo 'Nome' está vazio!");
form.nome.focus();
return (false);
}

//EMAIL 1
if (form.email.value == ""){
alert("O campo 'E-mail' está vazio!");
form.email.focus();
return (false);
}
if (form.email.value.indexOf('@', 0) == -1){
alert("O E-mail digitado no campo 'E-mail' é inválido!");
form.email.focus();
return (false);
}

//EMAIL2
if (form.email2.value == ""){
alert("O campo 'Confirmar E-mail' está vazio!");
form.email2.focus();
return (false);
}
if (form.email2.value.indexOf('@', 0) == -1){
alert("O E-mail digitado no campo 'Confirmar E-mail' é inválido!");
form.email2.focus();
return (false);
}
//COMPARA EMAIL1 com EMAIL2
if (form.email2.value != form.email.value){
alert("Os e-mails estão diferentes!");
form.email2.focus();
return (false);
}

//DIA DO NASCIMENTO
if (form.dianascimento.value.length < 2){
alert("O 'Dia do Nascimento' deve possuir no mínimo 2 digitos!")
form.dianascimento.focus();
return (false);
}
if (form.dianascimento.value > 31){
alert("O 'Dia do Nascimento' está incorreto!")
form.dianascimento.focus();
return (false);
}
var ver_numero = "1234567890";
var sk15 = form.dianascimento.value;
var invalido = true;
for (i = 0;  i < sk15.length;  i++){
ch = sk15.charAt(i);
for (j = 0;  j < ver_numero.length;  j++)
if (ch == ver_numero.charAt(j))
break;
if (j == ver_numero.length){
invalido = false;
break;
}}
if (!invalido){
alert("O 'Dia do Nascimento' não deve conter letras!");
form.dianascimento.focus();
return (false);
}

//MÊS DO NASCIMENTO
if (form.mesnascimento.value.length < 2){
alert("O 'Mês do Nascimento' deve possuir no mínimo 2 digitos!")
form.mesnascimento.focus();
return (false);
}
if (form.mesnascimento.value > 12){
alert("O 'Mês do Nascimento' está incorreto!")
form.mesnascimento.focus();
return (false);
}
var ver_numero = "1234567890";
var sk15 = form.mesnascimento.value;
var invalido = true;
for (i = 0;  i < sk15.length;  i++){
ch = sk15.charAt(i);
for (j = 0;  j < ver_numero.length;  j++)
if (ch == ver_numero.charAt(j))
break;
if (j == ver_numero.length){
invalido = false;
break;
}}
if (!invalido){
alert("O 'Mês do Nascimento' não deve conter letras!");
form.mesnascimento.focus();
return (false);
}

//ANO DO NASCIMENTO
if (form.anonascimento.value.length < 2){
alert("O 'Ano do Nascimento' deve possuir no mínimo 2 digitos!")
form.anonascimento.focus();
return (false);
}
var ver_numero = "1234567890";
var sk15 = form.anonascimento.value;
var invalido = true;
for (i = 0;  i < sk15.length;  i++){
ch = sk15.charAt(i);
for (j = 0;  j < ver_numero.length;  j++)
if (ch == ver_numero.charAt(j))
break;
if (j == ver_numero.length){
invalido = false;
break;
}}
if (!invalido){
alert("O 'Ano do Nascimento' não deve conter letras!");
form.anonascimento.focus();
return (false);
}

//ASSUNTO
if (form.assunto.value == ""){
alert("Selecione o Assunto!");
form.assunto.focus();
return (false);
}

//MENSAGEM
if (form.mensagem.value == ""){
alert("O campo 'Mensagem' está vazio!");
form.mensagem.focus();
return (false);
}
return (true);
}

