function RadioCV(Campo, Valor) {
    var aux = ''

    aux = eval('document.AproxProf.' + Campo)
    aux.value = Valor


}

function AtribuiAcaoCV() {
    var aux = ''
    aux = document.AproxProf.TipoCV.value

    if (document.AproxProf.TxtNome.value == '') {
        alert('Preencha o campo NOME.');
        document.AproxProf.TxtNome.focus();
        return false;
    }

    if (document.AproxProf.LstDiaNasc.value == '') {
        alert('Selecione o dia de seu nascimento');
        document.AproxProf.LstDiaNasc.focus();
        return false;
    }

    if (document.AproxProf.LstMesNasc.value == '') {
        alert('Selecione o mês de seu nascimento');
        document.AproxProf.LstMesNasc.focus();
        return false;
    }

    if (document.AproxProf.LstAnoNasc.value == '') {
        alert('Selecione o ano de seu nascimento');
        document.AproxProf.LstAnoNasc.focus();
        return false;
    }

    if (document.AproxProf.TxtCPF.value == '') {
        alert('Informe o seu CPF.');
        document.AproxProf.TxtCPF.focus();
        return false;
    }


    if ((document.AproxProf.TxtCPF.value).length < 11) {
        alert('CPF incorreto.');
        document.AproxProf.TxtCPF.focus();
        return false;
    }


    if (document.AproxProf.LstEstCivil.value == '') {
        alert('Selecione seu estado civil.');
        document.AproxProf.LstEstCivil.focus();
        return false;
    }

    if (document.AproxProf.TxtSexo.value == '') {
        alert('Selecione o SEXO.');
        return false;
    }

    if (document.AproxProf.TxtCepContato.value == '') {
        alert('Informe o CEP.');
        document.AproxProf.TxtCepContato.focus();
        return false;
    }

    if ((document.AproxProf.TxtCepContato.value).length < 7) {
        alert('O CEP informado é inválido.');
        document.AproxProf.TxtCepContato.focus();
        return false;
    }


    if (document.AproxProf.TxtEnderecoContato.value == '') {
        alert('Informe seu endereço de contato.');
        document.AproxProf.TxtEnderecoContato.focus();
        return false;
    }

    if (document.AproxProf.TxtNumeroContato.value == '') {
        alert('Informe o número de seu endereço.');
        document.AproxProf.TxtNumeroContato.focus();
        return false;
    }


    if (document.AproxProf.TxtCidadeContato.value == '') {
        alert('Informe a cidade onde reside.');
        document.AproxProf.TxtCidadeContato.focus();
        return false;
    }

    if (document.AproxProf.LstEstadoContato.value == '') {
        alert('Selecione o estado onde reside.');
        document.AproxProf.LstEstadoContato.focus();
        return false;
    }


    if (document.AproxProf.TxtDDDResidencialContato.value == '') {
        alert('Informe o DDD do telefone residencial.');
        document.AproxProf.TxtDDDResidencialContato.focus();
        return false;
    }

    if (document.AproxProf.TxtTelResidencialContato.value == '') {
        alert('Informe o telefone residencial.');
        document.AproxProf.TxtTelResidencialContato.focus();
        return false;
    }


    if ((document.AproxProf.TxtTelResidencialContato.value).length < 6) {
        alert('Telefone residencial inválido.');
        document.AproxProf.TxtTelResidencialContato.focus();
        return false;
    }


    if (document.AproxProf.TxtDDDComercialContato.value == '') {
        alert('Informe o DDD do telefone comercial.');
        document.AproxProf.TxtDDDComercialContato.focus();
        return false;
    }

    if (document.AproxProf.TxtTelComercialContato.value == '') {
        alert('Informe o telefone comercial.');
        document.AproxProf.TxtTelComercialContato.focus();
        return false;
    }


    if ((document.AproxProf.TxtTelComercialContato.value).length < 6) {
        alert('Telefone comercial inválido.');
        document.AproxProf.TxtTelComercialContato.focus();
        return false;
    }



    if (document.AproxProf.TxtEmailContato.value == '') {
        alert('Informe um e-mail para contato.');
        document.AproxProf.TxtEmailContato.focus();
        return false;
    }

    if (ValidaEmail(document.AproxProf.TxtEmailContato.value) == false) {
        alert('E-mail inválido')
        document.AproxProf.TxtEmailContato.focus();
        return false;
    }

    if (document.AproxProf.LstEscolaridade.value == '') {
        alert('Indique Grau de Formação');
        document.AproxProf.LstEscolaridade.focus();
        return false;
    }

    if (document.AproxProf.TxtFormacao1.value == '') {
        alert('Grau de formação Completo, Incompleto ou Cursando?');
        return false;
    }


    if (document.AproxProf.LstDropEscolaridade.value == '') {
        alert('Indique Ano Cursado.');
        document.AproxProf.LstDropEscolaridade.focus();
        return false;
    }

    if (document.AproxProf.LstMesEscolaridade.value == '') {
        alert('Indique data de início de sua formação.');
        document.AproxProf.LstMesEscolaridade.focus();
        return false;
    }


    if (document.AproxProf.LstAnoEscolaridade.value == '') {
        alert('Indique data de início de sua formação.');
        document.AproxProf.LstAnoEscolaridade.focus();
        return false;
    }


    if (document.AproxProf.LstMesConclusao.value == '') {
        alert('Selecione o mês previsto para conclusão do curso.');
        document.AproxProf.LstMesConclusao.focus();
        return false;
    }

    if (document.AproxProf.LstAnoConclusao.value == '') {
        alert('Selecione o ano previsto para conclusão do curso.');
        document.AproxProf.LstAnoConclusao.focus();
        return false;
    }


    if (document.AproxProf.TxtNomeCurso.value == '') {
        alert('Informe o nome do curso.');
        document.AproxProf.TxtNomeCurso.focus();
        return false;
    }

    if (document.AproxProf.TxtInstituicao.value == '') {
        alert('Informe o nome da instituição.');
        document.AproxProf.TxtInstituicao.focus();
        return false;
    }


    if (document.AproxProf.LstCargoProf.value == '') {
        alert('Selecione o cargo pretendido.');
        document.AproxProf.LstCargoProf.focus();
        return false;
    }



    if (document.AproxProf.TxtDisponibilidade.value == '') {
        alert('Selecione a disponibilidade de horário.\n(Integral, Diurno ou Vespertino)');
        return false;
    }

    if (document.AproxProf.TxtEstaEmpregado.value == '') {
        alert('Selecione se está empregado ou não');
        return false;
    }


    if (document.AproxProf.LstCargoInteresse.value == '') {
        alert('Selecione a área de interesse.');
        document.AproxProf.LstCargoInteresse.focus();
        return false;
    }


    if (document.AproxProf.LstNivel.value == '') {
        alert('Selecione o nível hierárquico de interesse.');
        document.AproxProf.LstNivel.focus();
        return false;
    }



    else {
        document.AproxProf.acionador.value = 'GRAVACV'
        document.AproxProf.submit();
    }
}


/****************** PARA FORMULÁRIO FULL **********************/
function AtribuiAcaoCVII() {

    var aux = ''
    aux = document.AproxProf.TipoCV.value

    if (document.AproxProf.TxtNome.value == '') {
        alert('Preencha o campo NOME.');
        document.AproxProf.TxtNome.focus();
        return false;
    }

    if (document.AproxProf.LstDiaNasc.value == '') {
        alert('Selecione o dia de seu nascimento');
        document.AproxProf.LstDiaNasc.focus();
        return false;
    }

    if (document.AproxProf.LstMesNasc.value == '') {
        alert('Selecione o mês de seu nascimento');
        document.AproxProf.LstMesNasc.focus();
        return false;
    }

    if (document.AproxProf.LstAnoNasc.value == '') {
        alert('Selecione o ano de seu nascimento');
        document.AproxProf.LstAnoNasc.focus();
        return false;
    }

    if (document.AproxProf.TxtCPF.value == '') {
        alert('Informe o seu CPF.');
        document.AproxProf.TxtCPF.focus();
        return false;
    }

    if ((document.AproxProf.TxtCPF.value).length < 11) {
        alert('O CPF informado é inválido.');
        document.AproxProf.TxtCPF.focus();
        return false;
    }

    if (document.AproxProf.LstEstCivil.value == '') {
        alert('Selecione seu estado civil.');
        document.AproxProf.LstEstCivil.focus();
        return false;
    }

    if (document.AproxProf.TxtSexo.value == '') {
        alert('Selecione o SEXO.');
        return false;
    }


    if (document.AproxProf.TxtCepContato.value == '') {
        alert('Informe o seu CEP.');
        document.AproxProf.TxtCepContato.focus();
        return false;
    }

    if ((document.AproxProf.TxtCepContato.value).length < 8) {
        alert('O CEP informado é inválido.');
        document.AproxProf.TxtCepContato.focus();
        return false;
    }


    if (document.AproxProf.TxtEnderecoContato.value == '') {
        alert('Informe seu endereço de contato.');
        document.AproxProf.TxtEnderecoContato.focus();
        return false;
    }

    if (document.AproxProf.TxtNumeroContato.value == '') {
        alert('Informe o número de seu endereço.');
        document.AproxProf.TxtNumeroContato.focus();
        return false;
    }

    if (document.AproxProf.TxtCidadeContato.value == '') {
        alert('Informe a cidade onde reside.');
        document.AproxProf.TxtCidadeContato.focus();
        return false;
    }

    if (document.AproxProf.LstEstadoContato.value == '') {
        alert('Selecione o estado onde reside.');
        document.AproxProf.LstEstadoContato.focus();
        return false;
    }


    if (document.AproxProf.TxtDDDResidencialContato.value == '') {
        alert('Informe o DDD do telefone residencial.');
        document.AproxProf.TxtDDDResidencialContato.focus();
        return false;
    }

    if (document.AproxProf.TxtTelResidencialContato.value == '') {
        alert('Informe o telefone residencial.');
        document.AproxProf.TxtTelResidencialContato.focus();
        return false;
    }


    if ((document.AproxProf.TxtTelResidencialContato.value).length < 7) {
        alert('Telefone residencial inválido.');
        document.AproxProf.TxtTelResidencialContato.focus();
        return false;
    }



    if (document.AproxProf.TxtDDDComercialContato.value == '') {
        alert('Informe o DDD do telefone comercial.');
        document.AproxProf.TxtDDDComercialContato.focus();
        return false;
    }

    if (document.AproxProf.TxtTelComercialContato.value == '') {
        alert('Informe o telefone comercial.');
        document.AproxProf.TxtTelComercialContato.focus();
        return false;
    }


    if ((document.AproxProf.TxtTelComercialContato.value).length < 7) {
        alert('Telefone comercial inválido.');
        document.AproxProf.TxtTelComercialContato.focus();
        return false;
    }


    if (document.AproxProf.TxtEmailContato.value == '') {
        alert('Informe um e-mail para contato.');
        document.AproxProf.TxtEmailContato.focus();
        return false;
    }

    if (ValidaEmail(document.AproxProf.TxtEmailContato.value) == false) {
        alert('E-mail inválido')
        document.AproxProf.TxtEmailContato.focus();
        return false;
    }

    if (document.AproxProf.LstEscolaridade.value == '') {
        alert('Selecione uma opção em Grau de Formação.');
        document.AproxProf.LstEscolaridade.focus();
        return false;
    }

    if (document.AproxProf.TxtFormacao1.value == '') {
        alert('Selecione uma opção para Grau de Formação.\n(Conpleto, Incompleto ou Cursando)');
        return false;
    }


    if (document.AproxProf.LstDropEscolaridade.value == '') {
        alert('Selecione o ano que está cursando.');
        document.AproxProf.LstDropEscolaridade.focus();
        return false;
    }

    if (document.AproxProf.LstMesEscolaridade.value == '') {
        alert('Selecione o mês de início do curso.');
        document.AproxProf.LstMesEscolaridade.focus();
        return false;
    }


    if (document.AproxProf.LstAnoEscolaridade.value == '') {
        alert('Selecione o ano de início do curso.');
        document.AproxProf.LstAnoEscolaridade.focus();
        return false;
    }


    if (document.AproxProf.LstMesConclusao.value == '') {
        alert('Selecione o mês previsto para conclusão do curso.');
        document.AproxProf.LstMesConclusao.focus();
        return false;
    }


    if (document.AproxProf.LstAnoConclusao.value == '') {
        alert('Selecione o ano previsto para conclusão do curso.');
        document.AproxProf.LstAnoConclusao.focus();
        return false;
    }


    if (document.AproxProf.TxtNomeCurso.value == '') {
        alert('Informe o nome do curso.');
        document.AproxProf.TxtNomeCurso.focus();
        return false;
    }

    if (document.AproxProf.TxtInstituicao.value == '') {
        alert('Informe o nome da instituição.');
        document.AproxProf.TxtInstituicao.focus();
        return false;
    }

    /*
    if (document.AproxProf.LstEscolaridade2.value == '')
    {
    alert('Selecione uma opção em Grau de Formação');
    document.AproxProf.LstEscolaridade2.focus();
    return false;
    } 


	if (document.AproxProf.TxtFormacao2.value == '')
    {
    alert('Selecione uma opção para Grau de Formação.\n(Conpleto, Incompleto ou Cursando)');
    document.AproxProf.TxtFormacao2.focus();
    return false;
    } 
	
	
    if (document.AproxProf.LstDropEscolaridade2.value == '')
    {
    alert('Selecione o ano que está cursando');
    document.AproxProf.LstDropEscolaridade2.focus();
    return false;
    } 
	
	
    if (document.AproxProf.LstMesEscolaridade2.value == '')
    {
    alert('Selecione mês de início do curso.');
    document.AproxProf.LstMesEscolaridade2.focus();
    return false;
    } 

	
    if (document.AproxProf.LstAnoEscolaridade2.value == '')
    {
    alert('Selecione ano de início do curso.');
    document.AproxProf.LstAnoEscolaridade2.focus();
    return false;
    } 
	
	if (document.AproxProf.LstMesConclusao2.value == '')
    {
    alert('Selecione mês previsto para conclusão do curso.');
    document.AproxProf.LstMesConclusao2.focus();
    return false;
    } 
	
	if (document.AproxProf.LstAnoConclusao2.value == '')
    {
    alert('Selecione ano previsto para conclusão do curso.');
    document.AproxProf.LstAnoConclusao2.focus();
    return false;
    } 


	
    if (document.AproxProf.TxtNomeCurso2.value == '')
    {
    alert('Informe nome do curso.');
    document.AproxProf.TxtNomeCurso2.focus();
    return false;
    } 

	
    if (document.AproxProf.TxtNomeInstituicao2.value == '')
    {
    alert('Informe nome da instituição.');
    document.AproxProf.TxtNomeInstituicao2.focus();
    return false;
    } 
    */

    if (document.AproxProf.LstCargoProf.value == '') {
        alert('Selecione o cargo pretendido.');
        document.AproxProf.LstCargoProf.focus();
        return false;
    }



    if (document.AproxProf.TxtDisponibilidade.value == '') {
        alert('Selecione a disponibilidade de horário.\n(Integral, Diurno ou Vespertino)');
        return false;
    }


    if (document.AproxProf.TxtEstaEmpregado.value == '') {
        alert('Selecione se está empregado ou não');
        return false;
    }


    if (document.AproxProf.LstCargoInteresse.value == '') {
        alert('Selecione a área de interesse.');
        document.AproxProf.LstCargoInteresse.focus();
        return false;
    }


    if (document.AproxProf.LstNivel.value == '') {
        alert('Selecione o nível hierárquico de interesse.');
        document.AproxProf.LstNivel.focus();
        return false;
    }



    if (document.AproxProf.TxtUltSalario.value == '') {
        alert('Informe o último salário.');
        document.AproxProf.TxtUltSalario.focus();
        return false;
    }


    if (document.AproxProf.TxtPretensao.value == '') {
        alert('Informe a pretensão salarial.');
        document.AproxProf.TxtPretensao.focus();
        return false;
    }



    else {
        document.AproxProf.acionador.value = 'GRAVACV'
        document.AproxProf.submit();
    }
}

function EditarCargo(numero) {
    if (eval("Cargo1_" + numero + ".style.display") == '') {
        eval("Cargo1_" + numero + ".style.display  = 'none'")
        eval("Status1_" + numero + ".style.display = 'none'")
        eval("Editar1_" + numero + ".style.display = 'none'")
        eval("Tipo1_" + numero + ".style.display   = 'none'")



        eval("Cargo2_" + numero + ".style.display = '';")
        eval("Status2_" + numero + ".style.display = '';")
        eval("Editar2_" + numero + ".style.display = ''")
        eval("Tipo2_" + numero + ".style.display = ''")
    }
    else {
        eval("Cargo1_" + numero + ".style.display = ''")
        eval("Status1_" + numero + ".style.display = ''")
        eval("Editar1_" + numero + ".style.display = ''")
        eval("Tipo1_" + numero + ".style.display = ''")

        eval("Cargo2_" + numero + ".style.display = 'none';")
        eval("Status2_" + numero + ".style.display = 'none';")
        eval("Editar2_" + numero + ".style.display = 'none'")
        eval("Tipo2_" + numero + ".style.display = 'none'")
    }
}

/*******************************************************/
function VerificaCargos(Codigo) {
    var msg = '';
    var erro = false;

    if (eval('document.AlteraCargo' + Codigo + '.TxtNome.value') == '') {
        msg = msg + 'Digite o nome do Cargo.\n'
        erro = true;
    }

    if (eval('document.AlteraCargo' + Codigo + '.LstStatus.value') == '') {

        msg = msg + 'Selecione o status para o cargo.\n'
        erro = true;
    }

    if (erro == true) {
        alert(msg)
    }
    else {
        eval('document.AlteraCargo' + Codigo + '.submit()')
    }
}

function VerificaNovocargo() {

    if (document.NovoCargo.TxtCargoNovo.value == '') {
        alert('Digite o nome do cargo.')
        return false;
    }
    else {
        return true;
    }

}

/*********************************************************/
function VerificaCargoPretendido() {
    if (document.CargoPretendido.LstCargo.value == '') {
        alert('Selecione o cargo pretendido.')
        return false;
    }
    else {
        return true;
    }

}

/**********************************************************/

