function dataMask(campo) 
{
  var atualiza = campo.value;
  if (event.keyCode > 47 && event.keyCode < 58) {
     if ((atualiza.length == 2) || (atualiza.length == 5)) {
        campo.value = campo.value + '/';
     }
  }
  else {
    event.keyCode = 0;
  }
}

function soNumero(campo) 
{
  var atualiza = campo.value;
  if (event.keyCode > 47 && event.keyCode < 58) {
     campo.value = atualiza;
  }
  else {
    event.keyCode = 0;
  }
}

function validaContato()
{
	if (document.frmContato.Assunto.value.length < 3)
	{
		alert("Por favor, selecione o ASSUNTO");
		document.frmContato.Assunto.focus();
		return false;
	}
	if (document.frmContato.Nome.value.length < 3)
	{
		alert("Por favor, informe seu NOME");
		document.frmContato.Nome.focus();
		return false;
	}
		
	if (document.frmContato.ddd.value.length < 2)
	{
		alert("Informe o DDD de seu telefone");
		document.frmContato.ddd.focus();
		return false;
	}
	if (document.frmContato.Telefone.value.length < 7)
	{
		alert("Informe o número do seu TELEFONE");
		document.frmContato.Telefone.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(frmContato.Email.value))) 
   	{
	alert("Por favor, informe um E-MAIL válido");
		document.frmContato.Email.focus();
		return false;
	}
	if (document.frmContato.Comentarios.value.length < 10)
	{
		alert("Sua mensagem deve ter pelo menos 10 caracteres");
		document.frmContato.Comentarios.focus();
		return false;
	}
}

function validaCurriculo()
{
	if (document.frmTrabalhe.Area.value=="")
	{
		alert("Por favor, selecione o ÁREA DE INTERESSE");
		document.frmTrabalhe.Area.focus();
		return false;
	}
	if (document.frmTrabalhe.Pretensao.value.length < 3)
	{
		alert("Por favor, informe a PRETENSÃO SALARIAL");
		document.frmTrabalhe.Pretensao.focus();
		return false;
	}
	if (document.frmTrabalhe.Nome.value.length < 3)
	{
		alert("Informe SEU NOME COMPLETO");
		document.frmTrabalhe.Nome.focus();
		return false;
	}
	if (document.frmTrabalhe.Nascimento.value.length < 8)
	{
		alert("Informe SUA DATA DE NASCIMENTO");
		document.frmTrabalhe.Nascimento.focus();
		return false;
	}
	if (document.frmTrabalhe.Cidade.value.length < 2)
	{
		alert("Informe A CIDADE ONDE VOCÊ MORA");
		document.frmTrabalhe.Cidade.focus();
		return false;
	}
	if (document.frmTrabalhe.dddTel.value.length < 2)
	{
		alert("Informe o DDD do seu TELEFONE");
		document.frmTrabalhe.dddTel.focus();
		return false;
	}
	if (document.frmTrabalhe.Telefone.value.length < 8)
	{
		alert("Informe corretamente seu TELEFONE");
		document.frmTrabalhe.Telefone.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(frmTrabalhe.Email.value))) 
   	{
	alert("Por favor, informe um E-MAIL válido");
		document.frmTrabalhe.Email.focus();
		return false;
	}
	if (document.frmTrabalhe.Experiencia.value.length < 8)
	{
		alert("Resuma de forma objetiva sua EXPERIÊNCIA PROFISSIONAL ");
		document.frmTrabalhe.Experiencia.focus();
		return false;
	}
	if (document.frmTrabalhe.Informatica.value.length < 8)
	{
		alert("Descreva sobre seus CONHECIMENTOS EM INFORMÁTICA");
		document.frmTrabalhe.Informatica.focus();
		return false;
	}
}

function validaAssocie()
{
	if (document.frmAssocie.Nome.value.length < 3)
	{
		alert("Por favor, informe seu NOME corretamente");
		document.frmAssocie.Nome.focus();
		return false;
	}
	if (document.frmAssocie.Cidade.value.length < 2)
	{
		alert("Por favor, informe sua CIDADE.");
		document.frmAssocie.Cidade.focus();
		return false;
	}
		
		if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(frmAssocie.Email.value))) 
   	{
	alert("Por favor, informe um E-MAIL válido");
		document.frmAssocie.Email.focus();
		return false;
	}
	if (document.frmAssocie.dddTel.value.length < 2)
	{
		alert("É necessário informar o DDD do TELEFONE de CONTATO");
		document.frmAssocie.dddTel.focus();
		return false;
	}
	if (document.frmAssocie.Telefone.value.length < 8)
	{
		alert("É necessário informar SEU TELEFONE de CONTATO");
		document.frmAssocie.Telefone.focus();
		return false;
	}

		if (frmAssocie.Horario[0].checked == false && frmAssocie.Horario[1].checked == false && frmAssocie.Horario[2].checked == false)
	{
		alert("Por favor, informe o MELHOR HORÁRIO para que possamos lhe contatar.");
		return false;
	}
}
function validaCredenciamento()
{
	if (document.frmCredenciado.Tipo.value=="")
	{
		alert("Por favor, informe se o cadastramento é para Pessoa Física ou Jurídica");
		document.frmCredenciado.Tipo.focus();
		return false;
	}
	if (document.frmCredenciado.Cnpj.value.length < 6)
	{
		alert("Por favor, informe o CRM ou CNPJ corretamente");
		document.frmCredenciado.Cnpj.focus();
		return false;
	}
		
	if (document.frmCredenciado.Razao.value.length < 2)
	{
		alert("Informe corretamente a RAZÃO SOCIAL ou seu NOME");
		document.frmCredenciado.Razao.focus();
		return false;
	}
	if (document.frmCredenciado.dddTel.value.length < 2)
	{
		alert("Informe o DDD do seu TELEFONE");
		document.frmCredenciado.dddTel.focus();
		return false;
	}
	if (document.frmCredenciado.Telefone.value.length < 7)
	{
		alert("Informe o número do seu TELEFONE");
		document.frmCredenciado.Telefone.focus();
		return false;
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(frmCredenciado.Email.value))) 
   	{
	alert("Por favor, informe um E-MAIL válido");
		document.frmCredenciado.Email.focus();
		return false;
	}
	if (document.frmCredenciado.Especialidades.value.length < 5)
	{
		alert("Descreva as ESPECIALIDADES atendidas");
		document.frmCredenciado.Especialidades.focus();
		return false;
	}
}