function check_campos(elem){
	inputs = $(elem).parents('form').find('input');
	i = inputs.size();
	while(i--){
		name = inputs.eq(i).attr('name');
		atual = inputs.eq(i);
		if(name == 'nome'){
			if(atual.attr('value') == 'Digite seu nome'){
				atual.attr('value','');
			}
		}
		if(name == 'email'){
			if(atual.attr('value') == 'Digite seu email'){
				atual.attr('value','');
			}
		}
	}
}

function jqCheckAll( id, pID ){
   $( "#" + pID + " :checkbox").attr('checked', $('#' + id).is(':checked'));
}

function EditarFormInscricaoFisica1(){
	if(document.getElementById('FormInscricaoJuridicaSenha').value = ""){
		_msg += _msg + "O campo senha é obrigatório";
		//msg = msg + "O \"SEU NOME\" deve ser preenchido! \n";
	}
	Forms.submitNormal('EditarFormInscricaoFisica1', 'EditarInscricaoFisica1',[['email','c_email']]); 
	return false;
}

function SubmitForm(Form){
 	document.getElementById(Form).submit();	
}

function Fale_Tipo(valor){
 	document.getElementById('tipo').value = valor;	
}

function DetahleIns(id){
    //alert(id);
	document.getElementById(id).style.display = '';
	//$("#" + id).attr("style","");
}

function Login(){
	if(document.FormLogin.login.value == ""  && document.FormLogin.senha.value == ""){
	Forms.submitNormal('FormLogin','Login')	
	}else{
		var variavel = getUrlVars();
		cd_cucur = variavel['cd_cucur'];
		cd_cueve = document.FormCurso.cd_cueve.value;
		cd_cuinv = document.FormCurso.cd_cuinv.value;
		Uteis.loadHtml('#PessoaFisica','index.php?id=/includes/paginas/logon.php&cod=1&var=' + document.FormLogin.login.value + '&var2=' + document.FormLogin.senha.value  + '&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
		$("#PessoaFisica").fadeIn(800);
	}
}

function EsqueciLogin(){
	if(document.getElementById('FormLoginEsqueciLoginEmail').value == "")
	{
		Forms.submitNormal('FormLoginEsqueciLogin','EsqueciLogin')
	}else{
		Uteis.loadHtml('#EsqueciLogin','index.php?id=/includes/paginas/logon.php&cod=2&var=' + document.getElementById('FormLoginEsqueciLoginEmail').value)
		$("#EsqueciLogin").fadeIn(800);
	}
}
function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
 
    for(var i = 0; i < hashes.length; i++)
    {	
        hash = hashes[i].split('=');
		hash[1] = unescape(hash[1]);
		vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
 
    return vars;
}

function MesmoDoAnt(cod){
	
	if(cod == 1){
		if(document.getElementById('FormInscricaoJuridicaResponsavel').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavel1').value = document.getElementById('FormInscricaoJuridicaResponsavel').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelEmail').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelEmail1').value = document.getElementById('FormInscricaoJuridicaResponsavelEmail').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelTelefone').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelTelefone1').value = document.getElementById('FormInscricaoJuridicaResponsavelTelefone').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelCelular').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelCelular1').value = document.getElementById('FormInscricaoJuridicaResponsavelCelular').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelSetor').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelSetor1').value = document.getElementById('FormInscricaoJuridicaResponsavelSetor').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelSexoinsM').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo1M').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelSexoinsF').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo1F').checked =  true;
		}	
		if(document.getElementById('FormInscricaoJuridicaResponsavelLigaM').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga1M').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelLigaT').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga1T').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelLigaN').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga1N').checked =  true;
		}
   }else{
		  	document.getElementById('FormInscricaoJuridicaResponsavel1').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelEmail1').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelTelefone1').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelCelular1').value = "";
			document.getElementById('FormInscricaoJuridicaResponsavelSetor1').value = "";
		  if(document.getElementById('FormInscricaoJuridicaResponsavelSexo1M').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo1M').checked =  false;
		  }else{
			document.getElementById('FormInscricaoJuridicaResponsavelSexo1F').checked =  false;
		  }	
 		  if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1M').checked){
			 document.getElementById('FormInscricaoJuridicaResponsavelLiga1M').checked =  false;
		  }
		  if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1T').checked){
		  	document.getElementById('FormInscricaoJuridicaResponsavelLiga1T').checked =  false;
		  }
		  if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1N').checked){
		 	document.getElementById('FormInscricaoJuridicaResponsavelLiga1N').checked =  false;
		}  
   }
	
}

function MesmoDoAnt2(cod){
	
	if(cod == 1){
		if(document.getElementById('FormInscricaoJuridicaResponsavel1').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavel2').value = document.getElementById('FormInscricaoJuridicaResponsavel1').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelEmail1').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelEmail2').value = document.getElementById('FormInscricaoJuridicaResponsavelEmail1').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelTelefone1').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelTelefone2').value = document.getElementById('FormInscricaoJuridicaResponsavelTelefone1').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelCelular1').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelCelular2').value = document.getElementById('FormInscricaoJuridicaResponsavelCelular1').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelSetor1').value != ""){
			document.getElementById('FormInscricaoJuridicaResponsavelSetor2').value = document.getElementById('FormInscricaoJuridicaResponsavelSetor1').value;
		}
		
		if(document.getElementById('FormInscricaoJuridicaResponsavelSexo1M').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo2M').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelSexo1F').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo2F').checked =  true;
		}	
		if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1M').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga2M').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1T').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga2T').checked =  true;
		}
		if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1N').checked){
		 document.getElementById('FormInscricaoJuridicaResponsavelLiga2N').checked =  true;
		}
   }else{
		  	document.getElementById('FormInscricaoJuridicaResponsavel2').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelEmail2').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelTelefone2').value = "";
		  	document.getElementById('FormInscricaoJuridicaResponsavelCelular2').value = "";
			document.getElementById('FormInscricaoJuridicaResponsavelSetor2').value = "";
		    if(document.getElementById('FormInscricaoJuridicaResponsavelSexo1M').checked){
			document.getElementById('FormInscricaoJuridicaResponsavelSexo2M').checked =  false;
			}
			if(document.getElementById('FormInscricaoJuridicaResponsavelSexo1F').checked){
				document.getElementById('FormInscricaoJuridicaResponsavelSexo2F').checked =  false;
			}	
			if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1M').checked){
			 document.getElementById('FormInscricaoJuridicaResponsavelLiga2M').checked =  false;
			}
			if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1T').checked){
			 document.getElementById('FormInscricaoJuridicaResponsavelLiga2T').checked =  false;
			}
			if(document.getElementById('FormInscricaoJuridicaResponsavelLiga1N').checked){
			 document.getElementById('FormInscricaoJuridicaResponsavelLiga2N').checked =  false;
			} 
   }
	
}

function CursoRadioCueve(valor){
	document.FormCurso.cd_cueve.value = valor;
}
function CursoRadioCuinv(valor){
	document.FormCurso.cd_cuinv.value = valor;
}

function EditarCursoRadioCueve(valor){
	document.FormInscricaoFisica.cd_cueve.value = valor;
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	Uteis.loadHtml('#InscricaoFisica','index.php?id=/includes/paginas/logon.php&cod=23&var='+valor+'&cd_cucur='+cd_cucur)
}
function EditarCursoRadioCuinv(valor){
	document.FormInscricaoFisica.cd_cuinv.value = valor;
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	Uteis.loadHtml('#InscricaoFisica','index.php?id=/includes/paginas/logon.php&cod=22&var='+valor+'&cd_cucur='+cd_cucur)
}

function EditarCursoRadioCueveJ(valor){
	document.FormInscricaoJuridica.cd_cueve.value = valor;
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	Uteis.loadHtml('#InscricaoJuridica','index.php?id=/includes/paginas/logon.php&cod=23&var='+valor+'&cd_cucur='+cd_cucur)
}
function EditarCursoRadioCuinvJ(valor){
	document.FormInscricaoJuridica.cd_cuinv.value = valor;
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	Uteis.loadHtml('#InscricaoJuridica','index.php?id=/includes/paginas/logon.php&cod=22&var='+valor+'&cd_cucur='+cd_cucur)
}

function PFJ(codigo){
	if(codigo == 1){
		var variavel = getUrlVars();
		cd_cucur = variavel['cd_cucur'];
		cd_cueve = document.FormCurso.cd_cueve.value;
		cd_cuinv = document.FormCurso.cd_cuinv.value;
		Uteis.loadHtml('#PessoaFisica','index.php?id=/includes/paginas/logon.php&cod=4&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
		$("#PessoaFisica").fadeIn(800);
		document.getElementById('PessoaFisica').style.display = '';
		document.getElementById('PessoaJuridica').style.display = 'none';
		document.getElementById('PessoaJuridica').innerHTML = '';
	}
	else{
		var variavel = getUrlVars();
		cd_cucur = variavel['cd_cucur'];
		cd_cueve = document.FormCurso.cd_cueve.value;
		cd_cuinv = document.FormCurso.cd_cuinv.value;
		//Uteis.loadHtml('#PessoaJuridica','index.php?id=/includes/paginas/logon.php&cod=7&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
		Uteis.loadHtml('#PessoaJuridica','index.php?id=/includes/paginas/inscricao.php&cod=7&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
		$("#PessoaJuridica").fadeIn(800);
		document.getElementById('PessoaFisica').style.display = 'none';
		document.getElementById('PessoaJuridica').style.display = '';
		document.getElementById('PessoaFisica').innerHTML = '';
	}
}

function RadioParticipante(cod){
	if (cod==1){
	document.getElementById('ParticipanteNome').value = document.FormJuridicaPart.FormInscricaoJuridicaResponsavel.value;
	document.getElementById('ParticipanteEmail').value = document.FormJuridicaPart.FormInscricaoJuridicaResponsavelEmail.value;
	document.getElementById('ParticipanteTelefone').value = document.FormJuridicaPart.FormInscricaoJuridicaResponsavelTelefone.value;
	document.getElementById('ParticipanteCelular').value = document.FormJuridicaPart.FormInscricaoJuridicaResponsavelCelular.value;
	if(document.FormJuridicaPart.FormInscricaoJuridicaResponsavelSexo.value == "M"){
		document.getElementById('ParticipanteSexoM').checked = true;
	}
	if(document.FormJuridicaPart.FormInscricaoJuridicaResponsavelSexo.value == "F"){
		document.getElementById('ParticipanteSexoF').checked = true;
	}
	document.getElementById('ParticipanteSetor').value = document.FormJuridicaPart.FormInscricaoJuridicaResponsavelSetor.value;
	}else{
	document.getElementById('ParticipanteNome').value = "";
	document.getElementById('ParticipanteEmail').value = "";
	document.getElementById('ParticipanteTelefone').value = "";
	document.getElementById('ParticipanteCelular').value = "";
	if(document.FormJuridicaPart.FormInscricaoJuridicaResponsavelSexo.value == "M"){
		document.getElementById('ParticipanteSexoM').checked = false;
	}
	if(document.FormJuridicaPart.FormInscricaoJuridicaResponsavelSexo.value == "F"){
		document.getElementById('ParticipanteSexoF').checked = false;
	}
	document.getElementById('ParticipanteSetor').value = "";
	}
}

function ChecarPart(){
	
	if(document.getElementById('ParticipanteNome').value == '' ||  document.getElementById('ParticipanteTelefone').value == '' || document.getElementById('ParticipanteCelular').value == '' || document.getElementById('ParticipanteNomeCracha').value == '' || document.getElementById('ParticipanteSetor').value == '' ){
		Forms.submitTest('FormJuridicaPart','InscricaoJuridicaPart');
	}
	else{		
		var variavel = getUrlVars();
		cd_cucur = variavel['cd_cucur'];
		cd_cueve = document.getElementById('cd_cueve').value;
		cd_cuinv = document.getElementById('cd_cuinv').value;
		nome = document.getElementById('ParticipanteNome').value;
		email = document.getElementById('ParticipanteEmail').value;
		tel = document.getElementById('ParticipanteTelefone').value;
		cel = document.getElementById('ParticipanteCelular').value;
		cracha = document.getElementById('ParticipanteNomeCracha').value;
		setor = document.getElementById('ParticipanteSetor').value;
		
		if(document.getElementById('ParticipanteSexoM').checked){
		 genero = "M";	
		}
		
		if(document.getElementById('ParticipanteSexoF').checked){
		 genero = "F";	
		}
		
		document.getElementById('receber').innerHTML = '';
		
		//alert('index.php?id=/includes/paginas/logon.php&cod=40&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv+'&var='+nome+'&var2='+email+'&var3='+tel+'&var4='+cel+'&var5='+genero+'&var7='+setor+'&var8='+cracha);
		
		Uteis.loadHtml('#receber','index.php?id=/includes/paginas/logon.php&cod=40&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv+'&var='+nome+'&var2='+email+'&var3='+tel+'&var4='+cel+'&var5='+genero+'&var7='+setor+'&var8='+cracha)
		
		$("#receber").fadeIn(800);
		
		document.getElementById('InscricaoJuridicaPart').innerHTML = '';
		document.getElementById('InscricaoJuridicaPart').style.display = 'none';
		document.getElementById('ParticipanteNome').value = '';
		document.getElementById('ParticipanteEmail').value = '';
		document.getElementById('ParticipanteTelefone').value = '';
		document.getElementById('ParticipanteCelular').value = '';
		document.getElementById('ParticipanteNomeCracha').value = '';
		document.getElementById('ParticipanteSetor').value = '';
		
		if(document.getElementById('ParticipanteSexoM').checked){
			document.getElementById('ParticipanteSexoM').checked = false;	
		}
		
		if(document.getElementById('ParticipanteSexoF').checked){
			document.getElementById('ParticipanteSexoF').checked = false;	
		}
		
	}
	
}


function EditarChecarPart(){
	if(document.getElementById('ParticipanteNome').value == '' || document.getElementById('ParticipanteEmail').value == '' || document.getElementById('ParticipanteTelefone').value == '' || document.getElementById('ParticipanteCelular').value == '' || document.getElementById('ParticipanteNomeCracha').value == '' || document.getElementById('ParticipanteSetor').value == ''){
		Forms.submitNormal('FormJuridicaPart','InscricaoJuridicaPart');
	}else{		
		
		var variavel = getUrlVars();
		cd_cucur = variavel['cd_cucur'];		
		cd_cueve = document.getElementById('cd_cueve_par').value;
		cd_cuinv = document.getElementById('cd_cuinv_par').value;
		cdcupa  = document.getElementById('cd_cupar_par').value;
		nome = document.getElementById('ParticipanteNome').value;
		email = document.getElementById('ParticipanteEmail').value;
		tel = document.getElementById('ParticipanteTelefone').value;
		cel = document.getElementById('ParticipanteCelular').value;
		cracha = document.getElementById('ParticipanteNomeCracha').value;
		setor = document.getElementById('ParticipanteSetor').value;
		if(document.getElementById('ParticipanteSexoM').checked){
		 genero = "M";	
		}
		if(document.getElementById('ParticipanteSexoF').checked){
		 genero = "F";	
		}
		document.getElementById('editar').innerHTML = '';
		document.getElementById('receber').innerHTML = '';
		//alert('index.php?id=/includes/paginas/logon.php&cod=14&cd_cupar='+cdcupa+'&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv+'&var='+nome+'&var2='+email+'&var3='+tel+'&var4='+cel+'&var5='+genero+'&var7='+setor+'&var8='+cracha);
		Uteis.loadHtml('#receber','index.php?id=/includes/paginas/logon.php&cod=14&cd_cupar='+cdcupa+'&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv+'&var='+nome+'&var2='+email+'&var3='+tel+'&var4='+cel+'&var5='+genero+'&var7='+setor+'&var8='+cracha)
		$("#receber").fadeIn(800);
		//document.getElementById('InscricaoJuridicaPart').innerHTML = '';
	}
}


function FinalizarFisica(){	
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	cd_cueve = document.getElementById('cd_cueve').value;
	cd_cuinv = document.getElementById('cd_cuinv').value;
	cd_usuin = document.getElementById('cd_usuin').value;
	Uteis.loadHtml('#receber','index.php?id=/includes/paginas/logon.php&cod=19&var='+cd_usuin+'&var2='+cd_cueve+'&var3='+cd_cuinv+'&var4='+cd_cucur);
	//$("#receber").fadeIn(800);
	document.getElementById('FormInscricaoFisica').submit();
}

function FinalizarJuridica(){	
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	cd_cueve = document.getElementById('cd_cueve').value;
	cd_cuinv = document.getElementById('cd_cuinv').value;
	cd_usuin = document.getElementById('cd_usuin').value;
	
	cd_cupar = document.getElementsByName('cd_cupar[]');
	
	url = 'index.php?id=/includes/paginas/logon.php&cod=20&var='+cd_usuin+'&var2='+cd_cueve+'&var3='+cd_cuinv+'&var4='+cd_cucur;
	
	url += '&qtde_par='+cd_cupar.length;
	
	for(i=0; i<cd_cupar.length; i++){
		
		url += '&cd_cupar_'+i+'='+cd_cupar[i].value;
		
	}
	
	//alert('index.php?id=/includes/paginas/logon.php&cod=20&var='+cd_usuin+'&var2='+cd_cueve+'&var3='+cd_cuinv+'&var4='+cd_cucur);
	Uteis.loadHtml('#InscricaoJuridica',url);
	//s$("#receber").fadeIn(800);
	document.getElementById('FormInscricaoJuridica').submit();
	

}

function EditarPart(cod){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	cd_cueve = document.FormInscricaoJuridica.cd_cueve.value;
	cd_cuinv = document.FormInscricaoJuridica.cd_cuinv.value;
	//alert('index.php?id=/includes/paginas/logon.php&cod=12&cd_cupar='+cod+'&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv);
	Uteis.loadHtml('#editar','index.php?id=/includes/paginas/logon.php&cod=12&cd_cupar='+cod+'&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
	$("#editar").fadeIn(800);
}


function JuridCupar(cod){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	cd_cueve = document.getElementById('cd_cueve').value;
	cd_cuinv = document.getElementById('cd_cuinv').value;
	cd_inclu = document.getElementById('cd_inclu').value;
	Uteis.loadHtml('#receber','index.php?id=/includes/paginas/logon.php&cod=13&var='+cd_inclu+'&cd_cupar='+cod+'&cd_cucur='+cd_cucur+'&cd_cueve='+cd_cueve+'&cd_cuinv='+cd_cuinv)
	$("#receber").fadeIn(800);
}



function VerificarLogin(login,id){
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=9&var='+login+'&var2='+id)
}
 
function VerificarLogin2(login,id){
	//alert('index.php?id=/includes/paginas/logon.php&cod=25&var='+login+'&var2='+id+'&var3='+document.getElementById('FormInscricaoJuridicaCpf').value);
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=25&var='+login+'&var2='+id+'&var3='+document.getElementById('FormInscricaoJuridicaCpf').value)
}
function VerificarLogin3(login,id){
	//alert('index.php?id=/includes/paginas/logon.php&cod=26&var='+login+'&var2='+id+'&var3='+document.getElementById('FormInscricaoFisicaCpf').value);
	Uteis.loadHtml('#EditarInscricaoFisica1','index.php?id=/includes/paginas/logon.php&cod=26&var='+login+'&var2='+id+'&var3='+document.getElementById('FormInscricaoFisicaCpf').value)
}

function VerificarEmail(email,id){
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=10&var='+email+'&var2='+id);
}

function VerificarEmail2(email,id){
	//alert('index.php?id=/includes/paginas/logon.php&cod=27&var='+email+'&var2='+id+'&var3='+document.getElementById('FormInscricaoJuridicaCpf').value);
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=29&var='+email+'&var2='+id+'&var3='+document.getElementById('FormInscricaoJuridicaCpf').value);
}

function VerificarEmail3(email,id){
	Uteis.loadHtml('#EditarInscricaoFisica1','index.php?id=/includes/paginas/logon.php&cod=28&var='+email+'&var2='+id+'&var3='+document.getElementById('FormInscricaoFisicaCpf').value);
}


function VerificarCpf(cpf,id){
	//alert('index.php?id=/includes/paginas/logon.php&cod=17&var='+cpf+'&var2='+id);
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=17&var='+cpf+'&var2='+id)
}

function VerificarCpf2(cnpj,id){
	Uteis.loadHtml('#Pessoa','index.php?id=/includes/paginas/logon.php&cod=18&var='+cnpj+'&var2='+id)
}

function confirmation() {
	var teste  = confirm("Já Existe um Usuário cadastrado com este CPF!\n Para receber o Login e Senha clique em OK!\n e digite o E-mail de Cadastrado \n para recebe o Login e Senha!")
	if (teste){
		document.getElementById('cad_login3').checked = true;
		mostrar(3)
	}else{
		return false;
	}
}

function Editar(){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	document.getElementById('FormInscricaoFisica').action = 'index.php?id=/inscricao/editarinscricoesfisica.php&cd_cucur=' + cd_cucur;
	document.getElementById('FormInscricaoFisica').submit();
}

function Incluir(){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	document.getElementById('FormInscricaoJuridica').action = 'index.php?id=/inscricao/inscricoesjuridica.php&cd_cucur=' + cd_cucur;
	document.getElementById('FormInscricaoJuridica').submit();
}

function VizualizarJ(){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	document.getElementById('FormJuridicaPart').action = 'index.php?id=/inscricao/visualizajuridica.php&cd_cucur=' + cd_cucur;
	document.getElementById('FormJuridicaPart').submit();
}

function Editar2(){
	var variavel = getUrlVars();
	cd_cucur = variavel['cd_cucur'];
	document.getElementById('FormInscricaoJuridica').action = 'index.php?id=/inscricao/editarinscricoesjuridica.php&cd_cucur=' + cd_cucur;
	document.getElementById('FormInscricaoJuridica').submit();
}


function mostrar(cod){
	if(cod == 1){
		if((document.FormCurso.cd_cueve.value == "" && document.FormCurso.cd_cuinv.value == "" ) || (document.FormCurso.cd_cueve.value != "" && document.FormCurso.cd_cuinv.value == "" ) || (document.FormCurso.cd_cueve.value == "" && document.FormCurso.cd_cuinv.value != "" )){
		alert("Por favor escolha um Local e Data e um Investimento para efetuar o cadastro!");
		document.FormAcesso.cad_login1.checked = false;
		}else{
		document.getElementById('CadastroLogin').style.display = '';
		document.getElementById('CadastroNaoLogin').style.display = 'none';
		document.getElementById('CadastroEsqueciLogin').style.display = 'none';
		document.getElementById('PessoaFisica').style.display = 'none';
		document.getElementById('PessoaJuridica').style.display = 'none';
		document.getElementById('Login').style.display = 'none';
		document.getElementById('EsqueciLogin').style.display = 'none';
		document.getElementById('pessoaPJ').checked = false;
		document.getElementById('pessoaPF').checked = false;
		}
	}
	else if(cod == 2){
		if((document.FormCurso.cd_cueve.value == "" && document.FormCurso.cd_cuinv.value == "" ) || (document.FormCurso.cd_cueve.value != "" && document.FormCurso.cd_cuinv.value == "" ) || (document.FormCurso.cd_cueve.value == "" && document.FormCurso.cd_cuinv.value != "" )){
		alert("Por favor escolha um Local e Data e um Investimento para efetuar o cadastro!");
		document.FormAcesso.cad_login2.checked = false;
		}else{
		document.getElementById('CadastroLogin').style.display = 'none';
		document.getElementById('CadastroNaoLogin').style.display = '';
		document.getElementById('CadastroEsqueciLogin').style.display = 'none';
		document.getElementById('PessoaFisica').style.display = 'none';
		document.getElementById('PessoaJuridica').style.display = 'none';
		document.getElementById('PessoaFisica').innerHTML = '';
		document.getElementById('PessoaJuridica').innerHTML = '';
		document.getElementById('Login').style.display = 'none';
		document.getElementById('EsqueciLogin').style.display = 'none';
		document.getElementById('pessoaPJ').checked = false;
		document.getElementById('pessoaPF').checked = false;
		}
	}
	else{
		document.getElementById('CadastroLogin').style.display = 'none';
		document.getElementById('CadastroNaoLogin').style.display = 'none';
		document.getElementById('CadastroEsqueciLogin').style.display = '';
		document.getElementById('PessoaFisica').style.display = 'none';
		document.getElementById('PessoaJuridica').style.display = 'none';
		document.getElementById('Login').style.display = 'none';
		document.getElementById('EsqueciLogin').style.display = 'none';
		document.getElementById('PessoaFisica').innerHTML = '';
		document.getElementById('PessoaJuridica').innerHTML = '';
		document.getElementById('pessoaPJ').checked = false;
		document.getElementById('pessoaPF').checked = false;
	}
	
}

function SomenteNumero(e){
    var tecla=(window.event)?event.keyCode:e.which;
    if((tecla > 44 && tecla < 58) || (tecla > 2 && tecla < 15) || (tecla == 32) ) return true;
    else{
    if (tecla != 8) return false;
    else return true;
    }
}







	

 

