//Verificação de todos os campos do cadastro do trabalhador.
function VerificaDados(cadastro){
   nome           = cadastro.nome.value;
   nomemae        = cadastro.nomemae.value;
   email          = cadastro.email.value;
   confirmarEmail = cadastro.confirmarEmail.value;
   cpf            = cadastro.cpf.value;
//   titulo_eleitor = cadastro.titulo_eleitor.value;
   zona           = cadastro.zona.value;
   secao          = cadastro.secao.value;
   nascimento     = cadastro.nascimento.value;
   ddd            = cadastro.ddd.value;
   fone           = cadastro.fone.value;
   senha          = cadastro.senha.value;
   confirmarSenha = cadastro.confirmarSenha.value;
   if(nome == ""){
      alert ("NOME não pode ser vazio!");
      document.cadastro.nome.focus();
      return false;
   }
   if(nome.length < 3){
      alert("Preencha seu NOME completo");
      document.cadastro.nome.focus();
      return false;

   }
   if(nomemae == "") {
      alert ("NOME DA MÃE não pode ser vazio!");
      document.cadastro.nomemae.focus();
      return false;
   }
   if(email == "") {
      alert ("E-MAIL não pode ser vazio!");
      document.cadastro.email.focus();
      return false;
   }
   if(confirmarEmail == "") {
      alert("CONFIRMAÇÃO DE E-MAIL não pode ser vazio!");
      document.cadastro.confirmarEmail.focus();
      return false;
   }
   if(email != confirmarEmail) {
      alert ("\Os \"E-MAILS\" informados são diferentes!");
      document.cadastro.confirmarEmail.focus();
      return false;
   }
   if(document.cadastro.masculino.checked == false) {
      if(document.cadastro.feminino.checked == false){
	     alert("Marque uma opção para o SEXO!")
		 document.cadastro.masculino.focus();
 		 return false;
      }
   }
   if(cpf == "") {
      alert("CPF não pode ser vazio!");
      document.cadastro.cpf.focus();
      return false;
   }
/*   if(titulo_eleitor == "") {
      alert("TÍTULO DE ELEITOR não pode ser vazio!");
      document.cadastro.titulo_eleitor.focus();
      document.cadastro.titulo_eleitor.select();
      return false;
   }*/
   if(zona == "") {
      alert("ZONA não pode ser vazio!");
      document.cadastro.zona.focus();
      return false;
   }
   if(secao == "") {
      alert("SEÇÃO não pode ser vazio!");
      document.cadastro.secao.focus();
      return false;
   }

   if(nascimento == "") {
      alert("Data do seu nascimento não pode ser vazia!");
      document.cadastro.nascimento.focus();
      return false;
   }
   
   if(ddd == "") {
      alert ("DDD não pode ser vazio!");
      document.cadastro.ddd.focus();
      return false;
   }
   if(ddd.length < 2){
      alert("DDD deve conter no mínimo 2 algarismo!");
      document.cadastro.ddd.focus();
      return false;
   }
   if(fone == "") {
      alert ("TELEFONE não pode ser vazio!");
      document.cadastro.fone.focus();
      return false;
   }
   if(fone.length < 9 ) {
      alert ("TELEFONE incompleto!");
      document.cadastro.fone.focus();
      return false;
   }
   if(senha == "") {
      alert ("SENHA não pode ser vazio!");
      document.cadastro.senha.focus();
      return false;
   }
   if(confirmarSenha == "") {
      alert ("CONFIRMAÇÃO DE SENHA não pode ser vazio!");
      document.cadastro.confirmarSenha.focus();
      return false;
   }
   if(senha != confirmarSenha) {
      alert ("As \"SENHAS\" informadas são diferentes!");
      document.cadastro.confirmarSenha.focus();
      return false;
   }
   else
      //alert ("CADASTRO EFETUADO COM SUCESSO!");
      return true;
}

