function checkCV() {
	var msg = "";

	/*if (formX.nome.value.length == 0) {
		msg += "Preencha o campo NOME \n";
	}
	if (formX.cpf.value.length == 0) {
		msg += "Preencha o campo CPF \n";
	}*/
	if (formX.email.value.length == 0) {
		msg += "Preencha o campo E-MAIL \n";
	} else {
		if (formX.email.value.indexOf("@") < 0) {
			msg += "E-MAIL Inválido \n";
		}
		if (formX.email.value.indexOf(".") < 0) {
			msg += "E-MAIL Inválido \n";
		}
	}
	
	/*if (formX.dataNascimento1.value.length == 0 || 
		formX.dataNascimento2.value.length == 0 || 
		formX.dataNascimento3.value.length == 0) {
	
		msg += "Preencha o campo DATA DE NASCIMENTO \n";
	}
	if (formX.endereco.value.length == 0) {
		msg += "Preencha o campo ENDEREÇO \n";
	}
	if (formX.cidade.value.length == 0) {
		msg += "Preencha o campo CIDADE \n";
	}
	if (formX.bairro.value.length == 0) {
		msg += "Preencha o campo BAIRRO \n";
	}
	if (formX.cep.value.length == 0) {
		msg += "Preencha o campo CEP \n";
	}
	if (formX.uf.value.length == 0) {
		msg += "Preencha o campo UF \n";
	}
	if (formX.ddd.value.length == 0) {
		msg += "Preencha o campo DDD \n";
	}
	if (formX.telefoneRes.value.length == 0) {
		msg += "Preencha o campo TELEFONE (res) \n";
	}
	if (formX.telefoneCel.value.length == 0) {
		msg += "Preencha o campo TELEFONE (cel) \n";
	}
	if (formX.atividadesDesenvolvidas.value.length == 0) {
		msg += "Preencha o campo ATIVIDADES DESENVOLVIDAS \n";
	}
	if (formX.idCurso.value == 0) {
		msg += "Preencha o campo CURSOS (+) \n";
	} else {
		if (formX.nomeCurso_1.value.length == 0||formX.nomeCurso_1.value == "") {
			msg += "Preencha o campo NOME DO CURSO \n";
		}
	}
	if (formX.pretensaoSalarial.value.length == 0) {
		msg += "Preencha o campo PRETENSAO SALARIAL \n";
	}*/
	if (formX.senha.value.length == 0) {
		msg += "Preencha o campo SENHA \n";
	}
	if (formX.confirmaSenha.value.length == 0) {
		msg += "Preencha o campo CONFIRME SUA SENHA \n";
	}
	if (formX.confirmaSenha.value != formX.senha.value ) {
		msg += "Sua senha esta diferente de sua confirmação de senha \n";
	}
	
	if( msg.length == 0 ) {
		if( confirm('Confirma envio dos dados preenchidos?') ) {
			formX.action.value = "cv";
			//ChamaPaginaArray("/maquinaNet/techEngine?" + createQueryString(formX) + "&ajax=true", "navegacaoAjax" );
			formX.submit();
		}
	} else {
		alert(msg);
	} 
}
function maisCurso(teste) {
	var qtdProx  = formX.idCurso.value;
	var qtdProx2 = formX.idCurso.value;
	qtdProx++;
	qtdProx2++;
	qtdProx2++;
	if( teste!= null ){
		var tipo = eval("formX.tipo_"+qtdProx+"_.value");
		var nomeCurso = eval("formX.nomeCurso_"+qtdProx+"_.value");
		var nomeEntidade = eval("formX.nomeEntidade_"+qtdProx+"_.value");
		var cursoCompleto = eval("formX.cursoCompleto_"+qtdProx+"_.value");
		var diaInicio = eval("formX.dataInicio_1_"+qtdProx+"_.value");
		var mesInicio = eval("formX.dataInicio_2_"+qtdProx+"_.value");
		var anoInicio = eval("formX.dataInicio_3_"+qtdProx+"_.value");
		var diaTermino = eval("formX.dataTermino_1_"+qtdProx+"_.value");
		var mesTermino = eval("formX.dataTermino_2_"+qtdProx+"_.value");
		var anoTermino = eval("formX.dataTermino_3_"+qtdProx+"_.value");
	}else{
		var tipo = "";
		var nomeCurso = "";
		var nomeEntidade = "";
		var cursoCompleto = "";
		var diaInicio = "";
		var mesInicio = "";
		var anoInicio = "";
		var diaTermino = "";
		var mesTermino = "";
		var anoTermino = "";
	}	
	
	if(cursoCompleto == "1"){
		var select =
			" Status ? : <select name='cursoCompleto_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option SELECTED value='1'>Completo</option>" +
			"				<option value='2'>Em andamento</option>" +
			"				<option value='3'>Incompleto</option>" +
			"		   </select>&nbsp;" ;
	}else if(cursoCompleto == "2")	{
		var select =
			" Status ? : <select name='cursoCompleto_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Completo</option>" +
			"				<option SELECTED value='2'>Em andamento</option>" +
			"				<option value='3'>Incompleto</option>" +
			"		   </select>&nbsp;" ;
	}else if(cursoCompleto == "3")	{
		var select =
			" Status ? : <select name='cursoCompleto_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Completo</option>" +
			"				<option value='2'>Em andamento</option>" +
			"				<option SELECTED value='3'>Incompleto</option>" +
			"		   </select>&nbsp;" ;
	}else if(cursoCompleto == "0")	{
		var select =
			" Status ? : <select name='cursoCompleto_" + qtdProx + "'> " +
			"			    <option SELECTED value='0'>-</option>" +
			"				<option value='1'>Completo</option>" +
			"				<option value='2'>Em andamento</option>" +
			"				<option value='3'>Incompleto</option>" +
			"		   </select>&nbsp;" ;
	}else if(cursoCompleto == "")	{
		var select =
			" Status ? : <select name='cursoCompleto_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Completo</option>" +
			"				<option value='2'>Em andamento</option>" +
			"				<option value='3'>Incompleto</option>" +
			"		   </select>&nbsp;" ;
	}	
	if(tipo == "1"){
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option SELECTED value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "2")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option SELECTED value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "3")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option SELECTED value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "4")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option SELECTED value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "5")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option SELECTED value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "6")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option SELECTED value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "0")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}else if(tipo == "")	{
		var tipo =
			" Tipo ? : <select name='tipo_" + qtdProx + "'> " +
			"			    <option value='0'>-</option>" +
			"				<option value='1'>Ensino Médio </option>" +
			"				<option value='2'>Graduação</option>" +
			"				<option value='3'>Pós-graduação</option>" +
			"				<option value='4'>Especialização/MBA</option>" +
			"				<option value='5'>Mestrado</option>" +
			"				<option value='6'>Doutorado</option>" +
			"		   </select>&nbsp;" ;
	}
	formX.idCurso.value = qtdProx;
	var result =
		" Curso: <input type='text' class='text' value='"+nomeCurso+"' name='nomeCurso_" + qtdProx + "' size='15' maxlength='100' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' /> &nbsp; " +
		" Entidade: <input type='text' value='"+nomeEntidade+"' class='text' name='nomeEntidade_" + qtdProx + "' size='15' maxlength='100' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' /> &nbsp;" +
		select + tipo +"<br>"+
		" Início:&nbsp;<input type='text' class='text' value='"+diaInicio+"' name='dataInicio_1_"  + qtdProx + "' size='1' maxlength='2'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> / <input type='text' class='text'  value='"+mesInicio+"' name='dataInicio_2_"  + qtdProx + "' size='1' maxlength='2'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> / <input type='text' class='text' value='"+anoInicio+"' name='dataInicio_3_"  + qtdProx + "' size='3' maxlength='4'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> &nbsp;" + 
		" &nbsp;Término: <input type='text' class='text' value='"+diaTermino+"' name='dataTermino_1_"  + qtdProx + "' size='1' maxlength='2'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> / <input type='text' class='text' value='"+mesTermino+"' name='dataTermino_2_"  + qtdProx + "' size='1' maxlength='2'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> / <input type='text' class='text' value='"+anoTermino+"' name='dataTermino_3_"  + qtdProx + "' size='3' maxlength='4'  onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this)';'/> &nbsp;" +		 
		
   		"<div id='escolaridade" + qtdProx2 + "' />"
   	;
	document.getElementById("escolaridade" + qtdProx).innerHTML = result;
}
/*
function maisEmpresa() {
	var qtdProx  = formX.idEmpresa.value;
	var qtdProx2 = formX.idEmpresa.value;
	qtdProx++;
	qtdProx2++;
	qtdProx2++;

	formX.idEmpresa.value = qtdProx;
	var result =
		"Empresa: <input type='text' class='text' name='nomeEmpresa_" + qtdProx + "' size='15' maxlength='100' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' /> &nbsp; " +
		"Ramo Atividade: <input type='text' class='text' name='ramoAtividade_" + qtdProx + "' size='15' maxlength='100' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' /> &nbsp; " +
		"Nº Funcionários: <input type='text' class='text' name='funcionarios_" + qtdProx + "' size='2' maxlength='5' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this);' /> &nbsp;" +
		"Faturamento: <input type='text' class='text' name='faturamento_" + qtdProx + "' size='10' maxlength='10' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDouble(this);' /> &nbsp;" +
		"<br/>"+
		"Cargo: <input type='text' class='text' name='cargo_" + qtdProx + "' size='7' maxlength='100' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' /> &nbsp;" +
		"Tipo Contrato: <select name='tipoContrato_" + qtdProx + "'> " +
		"				<option value='1'>Estágio</option>" +
		"				<option value='2'>Funcionário CLT</option>" +
		"				<option value='3'>Prestador de serviço PJ</option>" +
		"				<option value='4'>Free lancer</option>" +
		"				<option value='5'>Autônomo</option>" +
		"				<option value='6'>Voluntário</option>" +
		"			</select>&nbsp;" +
		"Início:  <input type='text' class='text' name='dataInicioEmpresa_"  + qtdProx + "' size='9' maxlength='10' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDate(this);'/><input type='button' class='box2' value='Ano' onclick='javascript:calendarOpener(formX, formX.dataInicioEmpresa_" + qtdProx + ", true);'/> &nbsp;" +
		"Término: <input type='text' class='text' name='dataTerminoEmpresa_" + qtdProx + "' size='9' maxlength='10' onFocus='this.style.backgroundColor=\"#E1F4FD\"' onBlur='this.style.backgroundColor=\"#ffffff\"' onkeypress='checkDate(this);'/><input type='button' class='box2' value='Ano' onclick='javascript:calendarOpener(formX, formX.dataTerminoEmpresa_" + qtdProx + ", true);'/> &nbsp;" +
		"<br/><br/>"+
   		"<div id='empresa" + qtdProx2 + "' />"
   	;

	document.getElementById("empresa" + qtdProx).innerHTML = result;
}
*/
var y = 0;
var x = 0;
function get_mouse(e){
	y=e.y;
	x=e.x;
}
function popup(msg, e) {
	get_mouse(e);
	//document.onmousemove=get_mouse2;
	document.getElementById('dek').innerHTML =msg;
	document.getElementById('dek').style.top = y+350;
	document.getElementById('dek').style.left = x-180;
	document.getElementById('dek').style.visibility='visible';
}

function kill(){
	document.getElementById('dek').innerHTML = "";
	document.getElementById('dek').style.visibility='hidden';
}

function cadastroInativar(){
	document.getElementById('cadastro').style.visibility='hidden';
	document.getElementById('cadastro2').style.visibility='hidden';
	document.getElementById('cadastro3').style.visibility='hidden';
}

function cadastroAtivar(){
	document.getElementById('cadastro').style.visibility='visible';
	document.getElementById('cadastro2').style.visibility='visible';
	document.getElementById('cadastro3').style.visibility='visible';
}
function cadastroVisaoInativar(){
	document.getElementById('visao').style.visibility='hidden';
}

function cadastroVisaoAtivar(){
	document.getElementById('visao').style.visibility='visible';
}
function cadastroMissaoInativar(){
	document.getElementById('missao').style.visibility='hidden';
}

function cadastroMissaoAtivar(){
	document.getElementById('missao').style.visibility='visible';
}
function cadastroValorInativar(){
	document.getElementById('valor').style.visibility='hidden';
}

function cadastroValorAtivar(){
	document.getElementById('valor').style.visibility='visible';
}

