<!--
// script q desabilita cliques e selects em Mozilla e IE
function clique() {
    if (event.button==2||event.button==3) {
        oncontextmenu='return false';
    }
}
document.onmousedown = clique;

document.oncontextmenu = new Function("return false;")
document.onselectstart = new Function ("return false")

function disableselect(e){
    return false;
}
function reEnable(){
    return true;
}

if (window.sidebar){
    document.onmousedown = disableselect;
	document.onclick = reEnable;
}

function bloqueia(){
   	document.onmousedown = disableselect;
	document.onclick = reEnable;
}
function desbloqueia(){
   	document.onmousedown = reEnable;
	document.onclick = disableselect;
}


// script q desabilita cliques e selects em Mozilla e IE

/*function validaLogin(theForm){
	if (!validaitem(theForm.txtLogin,'s','3','15','Login')){return (false);}	
	if (!validaitem(theForm.txtSenha,'s','3','15','Senha')){return (false);}
	theForm.submit();
}*/

function validaGuestbook(theForm){
	if (!validaitem(theForm.txtNome,'s','3','100','Nome')){return (false);}	
	if (!validaitem(theForm.txtEmail,'s','3','100','E-mail')){return (false);}
	if (!splitemail(theForm.txtEmail)){return (false);}	
	if (theForm.txtEmail.value == 'sijo.jkd@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}
	if (theForm.txtEmail.value == 'jkd.brasil@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}	
	if (!validaitem(theForm.txtMensagem,'s','3','1000','Mensagem')){return (false);}
	//theForm.submit();
	var vLink = "inc/assinar_guestbookx.cfm?";
	vLink = vLink + "txtNome="+theForm.txtNome.value;
	vLink = vLink + "&txtEmail="+theForm.txtEmail.value;
	vLink = vLink + "&txtMensagem="+theForm.txtMensagem.value;
	theForm.ok.disabled = true;
	makeRequest(vLink);	
}

function validaFaleConosco(theForm){
	if (!validaitem(theForm.txtNome,'s','3','100','Nome')){return (false);}	
	if (!validaitem(theForm.txtEmail,'s','3','100','E-mail')){return (false);}
	if (!splitemail(theForm.txtEmail)){return (false);}	
	if (theForm.txtEmail.value == 'sijo.jkd@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}
	if (theForm.txtEmail.value == 'jkd.brasil@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}
	if (!validaitem(theForm.txtMensagem,'s','3','1000','Mensagem')){return (false);}
	//theForm.submit();
	var vLink = "inc/faleconoscox.cfm?";
	vLink = vLink + "ddlAssunto="+theForm.ddlAssunto.value;
	vLink = vLink + "&txtNome="+theForm.txtNome.value;
	vLink = vLink + "&txtEmail="+theForm.txtEmail.value;
	vLink = vLink + "&txtMensagem="+theForm.txtMensagem.value;
	theForm.ok.disabled = true;
	makeRequest(vLink);	
}

function validaFiliacao(theForm){
	if (!validaitem(theForm.nome,'s','3','100','Nome completo')){return (false);}
	if (!validaitem(theForm.email,'s','5','100','E-mail')){return (false);}
	if (!splitemail(theForm.email)){return (false);}
	if (theForm.email.value == 'sijo.jkd@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}
	if (theForm.email.value == 'jkd.brasil@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}	
	if (!validaitem(theForm.endereco,'s','3','100','Endereço')){return (false);}
	if (!validaitem(theForm.numero,'n','1','10','Número')){return (false);}
	if (!validaitem(theForm.bairro,'s','3','60','Bairro')){return (false);}	
	if (!validaitem(theForm.complemento,'n','1','20','Complemento')){return (false);}
	if (!validaitem(theForm.cidade,'s','3','100','Cidade')){return (false);}	
	if (!validaitem(theForm.cep,'s','8','9','CEP')){return (false);}	
	if (!validaitem(theForm.nascimento,'s','10','10','Data de nascimento')){return (false);}		
	if (!validaitem(theForm.cpf,'s','11','14','CPF')){return (false);}
	if (!valida_CPF(theForm.cpf)){return (false);}	
	if (!validaitem(theForm.ddd_telefone,'n','2','2','DDD Telefone')){return (false);}
	if (!validaitem(theForm.telefone,'n','7','20','Telefone')){return (false);}	
	if (!validaitem(theForm.ddd_celular,'n','2','2','DDD Telefone')){return (false);}	
	if (!validaitem(theForm.celular,'n','7','20','Celular')){return (false);}
	if (!validaitem(theForm.senha,'s','5','15','Senha')){return (false);}
	if (!validaitem(theForm.confirmacao,'s','5','15','Confirmação de senha')){return (false);}	
	if (theForm.senha.value != theForm.confirmacao.value){alert('A senha não confere');return (false);}
	
	//theForm.submit();	
	var vLink = "inc/filiacaox.cfm?";
	vLink = vLink + "nome="+theForm.nome.value;
	vLink = vLink + "&email="+theForm.email.value;
	vLink = vLink + "&endereco="+theForm.endereco.value;
	vLink = vLink + "&numero="+theForm.numero.value;
	vLink = vLink + "&bairro="+theForm.bairro.value;
	vLink = vLink + "&complemento="+theForm.complemento.value;
	vLink = vLink + "&cidade="+theForm.cidade.value;
	vLink = vLink + "&uf="+theForm.uf.value;
	vLink = vLink + "&cep="+theForm.cep.value;	
	vLink = vLink + "&nascimento="+theForm.nascimento.value;
	vLink = vLink + "&cpf="+theForm.cpf.value;	
	vLink = vLink + "&ddd_telefone="+theForm.ddd_telefone.value;
	vLink = vLink + "&telefone="+theForm.telefone.value;
	vLink = vLink + "&ddd_celular="+theForm.ddd_celular.value;
	vLink = vLink + "&celular="+theForm.celular.value;
	vLink = vLink + "&senha="+theForm.senha.value;	
	vLink = vLink + "&confirmacao="+theForm.confirmacao.value;		
	theForm.Cadastrar.disabled = true;	
	makeRequest(vLink);			
}

function validaInscricao(theForm){
	if (!validaitem(theForm.nome,'s','3','100','Nome completo')){return (false);}
	if (!validaitem(theForm.email,'s','5','100','E-mail')){return (false);}
	if (!splitemail(theForm.email)){return (false);}
	if (theForm.email.value == 'sijo.jkd@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}
	if (theForm.email.value == 'jkd.brasil@gmail.com'){alert('Favor usar o seu e-mail neste campo, por favor.\nVocê está querendo usar um e-mail reservado.'); return(false);}	
	if (!validaitem(theForm.endereco,'s','3','100','Endereço')){return (false);}
	if (!validaitem(theForm.numero,'n','1','10','Número')){return (false);}
	if (!validaitem(theForm.bairro,'s','3','60','Bairro')){return (false);}	
	if (!validaitem(theForm.complemento,'n','1','20','Complemento')){return (false);}
	if (!validaitem(theForm.cidade,'s','3','100','Cidade')){return (false);}	
	if (!validaitem(theForm.cep,'s','8','9','CEP')){return (false);}	
	if (!validaitem(theForm.nascimento,'s','10','10','Data de nascimento')){return (false);}		
	if (!validaitem(theForm.cpf,'s','11','14','CPF')){return (false);}
	if (!valida_CPF(theForm.cpf)){return (false);}	
	if (!validaitem(theForm.ddd_telefone,'n','2','2','DDD Telefone')){return (false);}
	if (!validaitem(theForm.telefone,'n','7','20','Telefone')){return (false);}	
	if (!validaitem(theForm.ddd_celular,'n','2','2','DDD Telefone')){return (false);}	
	if (!validaitem(theForm.celular,'n','7','20','Celular')){return (false);}
	if (!validaitem(theForm.senha,'s','5','15','Senha')){return (false);}
	if (!validaitem(theForm.confirmacao,'s','5','15','Confirmação de senha')){return (false);}	
	if (theForm.senha.value != theForm.confirmacao.value){alert('A senha não confere');return (false);}
	
	//theForm.submit();	
	var vLink = "inc/evento_dadosx.cfm?";
	vLink = vLink + "nome="+theForm.nome.value;
	vLink = vLink + "&email="+theForm.email.value;
	vLink = vLink + "&endereco="+theForm.endereco.value;
	vLink = vLink + "&numero="+theForm.numero.value;
	vLink = vLink + "&bairro="+theForm.bairro.value;
	vLink = vLink + "&complemento="+theForm.complemento.value;
	vLink = vLink + "&cidade="+theForm.cidade.value;
	vLink = vLink + "&uf="+theForm.uf.value;
	vLink = vLink + "&cep="+theForm.cep.value;	
	vLink = vLink + "&nascimento="+theForm.nascimento.value;
	vLink = vLink + "&cpf="+theForm.cpf.value;	
	vLink = vLink + "&ddd_telefone="+theForm.ddd_telefone.value;
	vLink = vLink + "&telefone="+theForm.telefone.value;
	vLink = vLink + "&ddd_celular="+theForm.ddd_celular.value;
	vLink = vLink + "&celular="+theForm.celular.value;
	vLink = vLink + "&senha="+theForm.senha.value;	
	vLink = vLink + "&confirmacao="+theForm.confirmacao.value;		
	theForm.Cadastrar.disabled = true;	
	makeRequest(vLink);			
}

/*function validaLoginAjax(theForm){
	if (!validaitem(theForm.txtLogin,'s','3','15','Login')){return (false);}	
	if (!validaitem(theForm.txtSenha,'s','3','15','Senha')){return (false);}
	
	var vLink = "inc/confere_login.cfm?user="+theForm.txtLogin.value+"&pass="+theForm.txtSenha.value;
	
	makeRequest(vLink);
}*/

function validaLogin(theForm){
	if (!validaitem(theForm.txtLogin,'s','3','15','Código de filiado')){return (false);}	
	if (!validaitem(theForm.txtSenha,'s','3','15','Senha')){return (false);}
	//theForm.submit();
	var vLink = "inc/confere_login.cfm?";
	vLink = vLink + "txtLogin="+theForm.txtLogin.value;
	vLink = vLink + "&txtSenha="+theForm.txtSenha.value;
	
	makeRequest(vLink);
}

function chr(c){
	var h = c.toString (16);
	h = unescape ('%'+h);
	return h;
} 

function Random(N){
	return Math.floor(N*(Math.random()%1))
}	

function RanSpan(MinV, MaxV){
	return MinV + Random(MaxV-MinV+1)
}

function codRandom(qtde){
	var codigogerado = '';
	
	for (i=0;i<qtde;i++){
		var num = RanSpan(1,2);
		if (num == 1){
			var dig = RanSpan(0,9);
			codigogerado = codigogerado+dig;
		}
		else{
			var min = RanSpan(97,122);
			codigogerado = codigogerado+chr(min);
		}
	}
	return codigogerado;
}
	
function atualizaPage(pagina){
	makeRequest(pagina+'?CGID='+codRandom(10));
}

// mostra ou oculta DIVs e SPANs
function mostra(obj){
	document.getElementById(obj).style.display = '';
}
function oculta(obj){
	document.getElementById(obj).style.display = 'none';
}
function altera(obj){
	if (document.getElementById(obj).style.display == ''){
		document.getElementById(obj).style.display = 'none';
	}
	else{
		document.getElementById(obj).style.display = '';
	}
}

function exibeMapa(mapa){
	window.open('inc/mapa.cfm?mapa='+mapa,'mapa','toolbar=yes,location=no,status=no,scrollbars=yes,resizable=yes,top=0,left=0,width=770,height=600');
}

function alteraLink(campo){
	oculta('seminario');
	oculta('cronograma');
	oculta('localizacao');
	oculta('hospedagem');
	oculta('inscricao');
	mostra(campo);
}

function mostraFoto(cod){
	window.open('inc/pop_fotos.cfm?cod='+cod,'fotos','toolbar=no,location=no,status=no,scrollbars=yes,resizable=no,top=0,left=0,width=800,height=600');
}

//-->