startList = function() {
	if (document.all&&document.getElementById("submenu")) {
		navRoot = document.getElementById("submenu");
				
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
				setTimeout('node.className=node.className.replace(" over", "")',250);
				}
			}
		}
	}
}

window.onload=startList;

//Banner
function embeds(url,w,h)  {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+url+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>');
	document.write('</object>');
}

//	funcao para validar contato
function validaContato(x)  {
	if(x.nome_cliente.value == "")  {
		alert ("O campo Nome é de preenchimento obrigatório");
		x.nome_cliente.focus();
		return false;
	}
	if(x.email.value == "")  {
		alert ("O campo E-mail é de preenchimento obrigatório");
		x.email.focus();
		return false;
	}
	if( x.email.value == '' || x.email.value.indexOf('@', 0) == -1 || x.email.value.indexOf('.', 0) == -1 )  {
		alert("Por favor, digite um e-mail válido.");
		x.email.focus();
		return false;
	}
	if(x.ddd_tel.value == "")  {
		alert ("Por favor preencher o DDD do Telefone");
		x.ddd_tel.focus();
		return false;
	}
	if(x.tel.value == "")  {
		alert ("Por favor preencher o número do Telefone");
		x.tel.focus();
		return false;
	}	
	if(x.texto.value == "")  {
		alert ("O campo Mensagem é de preenchimento obrigatório");
		x.texto.focus();
		return false;
	}
}

//validacao do form incompany
function validaIncompany(x)  {
	if(x.empresa_cliente.value == "")  {
		alert ("O campo Empresa é de preenchimento obrigatório");
		x.empresa_cliente.focus();
		return false;
	}
	if(x.nome_cliente.value == "")  {
		alert ("O campo Nome é de preenchimento obrigatório");
		x.nome_cliente.focus();
		return false;
	}	
	if(x.email.value == "")  {
		alert ("O campo E-mail é de preenchimento obrigatório");
		x.email.focus();
		return false;
	}
	if( x.email.value == '' || x.email.value.indexOf('@', 0) == -1 || x.email.value.indexOf('.', 0) == -1 )  {
		alert("Por favor, digite um e-mail válido.");
		x.email.focus();
		return false;
	}
	if(x.email_cliente.value == "")  {
		alert ("O campo E-mail é de preenchimento obrigatório");
		x.email_cliente.focus();
		return false;
	}
	if( x.email_cliente.value == '' || x.email_cliente.value.indexOf('@', 0) == -1 || x.email_cliente.value.indexOf('.', 0) == -1 )  {
		alert("Por favor, digite um e-mail válido.");
		x.email_cliente.focus();
		return false;
	}
	if(x.ddd_tel.value == "")  {
		alert ("Por favor preencher o DDD do Telefone");
		x.ddd_tel.focus();
		return false;
	}
	if(x.tel.value == "")  {
		alert ("Por favor preencher o número do Telefone");
		x.tel.focus();
		return false;
	}	
	if(x.necessidades.value == "")  {
		alert ("O campo Suas Necessidades é de preenchimento obrigatório");
		x.necessidades.focus();
		return false;
	}
}


//	funcao para validar inscricao
function validaInscricao(x)  {
	if(x.pessoa[0].checked)  {
		//início de física
		if(x.nome.value == "")  {
			alert ("O campo Nome é de preenchimento obrigatório");
			x.nome.focus();
			return false;
		}
		if(x.cpf.value == "")  {
			alert ("O campo CPF é de preenchimento obrigatório");
			x.cpf.focus();
			return false;
		}
		if(!isCpf(x.cpf.value))  {
		alert("O campo CPF está em um formato inválido");
		x.cpf.focus();
		return false;
		}
		if(x.cpf.value  == "000.000.000-00")  {
		alert("Campo CPF inválido");
		x.cpf.focus();
		return false;
		}
		if(x.rg.value == "")  {
			alert ("O campo RG é de preenchimento obrigatório");
			x.rg.focus();
			return false;
		}
		if(x.endereco.value == "")  {
			alert ("O campo Endereço é de preenchimento obrigatório");
			x.endereco.focus();
			return false;
		}
		if(x.bairro.value == "")  {
			alert ("O campo Bairro é de preenchimento obrigatório");
			x.bairro.focus();
			return false;
		}
		if(x.cidade.value == "")  {
			alert ("O campo Cidade é de preenchimento obrigatório");
			x.cidade.focus();
			return false;
		}
		if(x.uf.value == "")  {
			alert ("Por favor selecionar o Estado");
			x.uf.focus();
			return false;
		}
		if(x.cep.value == "")  {
			alert ("O campo CEP é de preenchimento obrigatório");
			x.cep.focus();
			return false;
		}
		if(x.email.value == "")  {
			alert ("O campo E-mail do Participante é de preenchimento obrigatório");
			x.email.focus();
			return false;
		}
		if( x.email.value == '' || x.email.value.indexOf('@', 0) == -1 || x.email.value.indexOf('.', 0) == -1 )  {
			alert("Por favor, digite um e-mail válido.");
			x.email.focus();
			return false;
		}
		//final de física
	}
	else  {
		//início de jurídica
		if(x.empresa.value == "")  {
			alert ("O campo Razão Social é de preenchimento obrigatório");
			x.empresa.focus();
			return false;
		}
		if(x.empresa_cnpj.value == "")  {
			alert ("O campo CNPJ é de preenchimento obrigatório");
			x.empresa_cnpj.focus();
			return false;
		}
		if(!isCnpj(x.empresa_cnpj.value))  {
			alert("O campo CNPJ está em um formato inválido");
			x.empresa_cnpj.focus();
			return false;
		}
		if(x.empresa_ie.value == "")  {
			alert ("O campo I.E. é de preenchimento obrigatório");
			x.empresa_ie.focus();
			return false;
		}
		if(x.empresa_endereco.value == "")  {
			alert ("O campo Endereço é de preenchimento obrigatório");
			x.empresa_endereco.focus();
			return false;
		}
		if(x.empresa_bairro.value == "")  {
			alert ("O campo Bairro é de preenchimento obrigatório");
			x.empresa_bairro.focus();
			return false;
		}
		if(x.empresa_cidade.value == "")  {
			alert ("O campo Cidade é de preenchimento obrigatório");
			x.empresa_cidade.focus();
			return false;
		}
		if(x.empresa_uf.value == "")  {
			alert ("Por favor selecionar o Estado");
			x.empresa_uf.focus();
			return false;
		}
		if(x.empresa_cep.value == "")  {
			alert ("O campo CEP é de preenchimento obrigatório");
			x.empresa_cep.focus();
			return false;
		}
		if(x.empresa_ddd.value == "")  {
			alert ("O campo DDD é de preenchimento obrigatório");
			x.empresa_ddd.focus();
			return false;
		}		
		if(x.empresa_telefone.value == "")  {
			alert ("O campo Telefone é de preenchimento obrigatório");
			x.empresa_telefone.focus();
			return false;
		}
		if(x.empresa_responsavel_inscricao.value == "")  {
			alert ("O campo Responsável pela Inscrição é de preenchimento obrigatório");
			x.empresa_responsavel_inscricao.focus();
			return false;
		}
		if(x.empresa_departamento.value == "")  {
			alert ("O campo Departamento é de preenchimento obrigatório");
			x.empresa_departamento.focus();
			return false;
		}
		if(x.empresa_email.value == "")  {
			alert ("O campo E-mail é de preenchimento obrigatório");
			x.empresa_email.focus();
			return false;
		}
		if( x.empresa_email.value == '' || x.empresa_email.value.indexOf('@', 0) == -1 || x.empresa_email.value.indexOf('.', 0) == -1 )  {
			alert("Por favor, digite um e-mail válido.");
			x.empresa_email.focus();
			return false;
		}				
		if(x.nome.value == "")  {
			alert ("O campo Nome do Participante é de preenchimento obrigatório");
			x.nome.focus();
			return false;
		}
		if(x.cpf.value == "")  {
			alert ("O campo CPF é de preenchimento obrigatório");
			x.cpf.focus();
			return false;
		}		
		if(x.email.value == "")  {
			alert ("O campo E-mail do Participante é de preenchimento obrigatório");
			x.email.focus();
			return false;
		}
		if( x.email.value == '' || x.email.value.indexOf('@', 0) == -1 || x.email.value.indexOf('.', 0) == -1 )  {
			alert("Por favor, digite um e-mail válido.");
			x.email.focus();
			return false;
		}				
		//fim de jurídica
	}
	if(x.id_agenda.value == "")  {
		alert ("Por favor selecionar o Curso");
		x.id_agenda.focus();
		return false;
	}			
	if(x.imagem_seguranca.value == "")  {
			alert ("O campo Imagem de Segurança é de preenchimento obrigatório");
			x.imagem_seguranca.focus();
			return false;
	}	
}

//abre pop-up clicando no link
function janelaSecundaria (URL)  { 
	window.open(URL,"janela1","width=320,height=312,scrollbars=1") 
} 
//abre pop-up clicando no mapa
function janelaSecundariaMapa (URL)  { 
	window.open(URL,"janela1","width=755,height=440,scrollbars=1") 
} 

//
function validaAviso(x)  {
	if(x.nome.value == "")  {
		alert ("O campo Nome é de preenchimento obrigatório");
		x.nome.focus();
		return false;
	}
	if(x.email.value == "")  {
		alert ("O campo E-mail é de preenchimento obrigatório");
		x.email.focus();
		return false;
	}
	if( x.email.value == '' || x.email.value.indexOf('@', 0) == -1 || x.email.value.indexOf('.', 0) == -1 )  {
		alert("Por favor, digite um e-mail válido.");
		x.email.focus();
		return false;
	}
	if(x.telefone.value == "")  {
		alert ("Por favor preencher o número do Telefone");
		x.telefone.focus();
		return false;
	}	
	if(x.cidade.value == "")  {
		alert ("O campo Cidade é de preenchimento obrigatório");
		x.cidade.focus();
		return false;
	}
	if(x.uf.value == "")  {
		alert ("Selecione uma opção para o campo UF");
		x.uf.focus();
		return false;
	}
}

function abrirSubMenu(id, tipo)  {
	obj=document.getElementById("submenu_cidades_"+id);
	obj.style.display=(tipo=="1")?"":"none";
}

function escolhePessoaInscricao(vid)  {
	if(vid=="1")  {//fisica
		document.getElementById("linha_nome").style.display="";
		document.getElementById("linha_cpf").style.display="";
		document.getElementById("linha_rg").style.display="";
		document.getElementById("linha_endereco").style.display="";
		document.getElementById("linha_bairro").style.display="";
		document.getElementById("linha_cidade").style.display="";
		document.getElementById("linha_uf").style.display="";
		document.getElementById("linha_cep").style.display="";
		document.getElementById("linha_telefone_res").style.display="";
		document.getElementById("linha_telefone_com").style.display="";
		document.getElementById("linha_telefone_celular").style.display="";
		document.getElementById("linha_telefone_emergencia").style.display="";		
		document.getElementById("linha_email").style.display="";
		document.getElementById("linha_empresa").style.display="none";
		document.getElementById("linha_cnpj").style.display="none";
		document.getElementById("linha_empresa_ie").style.display="none";
		document.getElementById("linha_empresa_endereco").style.display="none";
		document.getElementById("linha_empresa_bairro").style.display="none";
		document.getElementById("linha_empresa_cidade").style.display="none";
		document.getElementById("linha_empresa_uf").style.display="none";
		document.getElementById("linha_empresa_cep").style.display="none";
		document.getElementById("linha_empresa_telefone").style.display="none";
		document.getElementById("linha_empresa_ramal").style.display="none";
//		document.getElementById("linha_empresa_fax").style.display="none";
		document.getElementById("linha_empresa_responsavel_inscricao").style.display="none";
		document.getElementById("linha_empresa_departamento").style.display="none";
		document.getElementById("linha_empresa_email").style.display="none";
		document.getElementById("linha_empresa_divisao").style.display="none";
	}
	else  {//juridica
		document.getElementById("linha_nome").style.display="";
		document.getElementById("linha_cpf").style.display="";
		document.getElementById("linha_rg").style.display="";
		document.getElementById("linha_endereco").style.display="none";
		document.getElementById("linha_bairro").style.display="none";
		document.getElementById("linha_cidade").style.display="none";
		document.getElementById("linha_uf").style.display="none";
		document.getElementById("linha_cep").style.display="none";
		document.getElementById("linha_telefone_res").style.display="";
		document.getElementById("linha_telefone_com").style.display="";
		document.getElementById("linha_telefone_celular").style.display="";
		document.getElementById("linha_telefone_emergencia").style.display="";
		document.getElementById("linha_email").style.display="";
		document.getElementById("linha_empresa").style.display="";
		document.getElementById("linha_cnpj").style.display="";
		document.getElementById("linha_empresa_ie").style.display="";
		document.getElementById("linha_empresa_endereco").style.display="";
		document.getElementById("linha_empresa_bairro").style.display="";
		document.getElementById("linha_empresa_cidade").style.display="";
		document.getElementById("linha_empresa_uf").style.display="";
		document.getElementById("linha_empresa_cep").style.display="";
		document.getElementById("linha_empresa_telefone").style.display="";
		document.getElementById("linha_empresa_ramal").style.display="";
//		document.getElementById("linha_empresa_fax").style.display="";
		document.getElementById("linha_empresa_responsavel_inscricao").style.display="";
		document.getElementById("linha_empresa_departamento").style.display="";
		document.getElementById("linha_empresa_email").style.display="";
		document.getElementById("linha_empresa_divisao").style.display="";
	}
}

 function getElementsById(sId)
 {
    var outArray = new Array();	
	if(typeof(sId)!='string' || !sId)
	{
		return outArray;
	};
	if(document.evaluate)
	{
		var xpathString = "//*[@id='" + sId.toString() + "']"
		var xpathResult = document.evaluate(xpathString, document, null, 0, null);
		while ((outArray[outArray.length] = xpathResult.iterateNext())) { }
		outArray.pop();
	}
	else if(document.all)
	{
		for(var i=0,j=document.all[sId].length;i<j;i+=1){
		outArray[i] =  document.all[sId][i];}
	}else if(document.getElementsByTagName)
	{
		var aEl = document.getElementsByTagName( '*' );	
		for(var i=0,j=aEl.length;i<j;i+=1){
		
			if(aEl[i].id == sId )
			{
				outArray.push(aEl[i]);
			};
		};	
		
	};
	return outArray;
 }
 
function gerarAJAX() {
    if(window.XMLHttpRequest)  {
        return new XMLHttpRequest();
    }
	else
		if(window.ActiveXObject)  {
			var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
			for(var i = 0; i < prefixes.length; i++)  {
            try  {
                return new ActiveXObject(prefixes[i] + ".XMLHTTP");
            }
			catch (e) {}
		}
	}
	window.alert('AJAX não funciona neste navegador.');
	return false;
}

function buscarEndereco(cep,endereco,bairro,cidade,uf,msg)  {
	if(parseInt(cep.value.length)==8)  {
		xmlhttp=gerarAJAX();
		if(!xmlhttp) return false;
		xmlhttp.open("GET","/library/buscaEndereco.asp?cep="+cep.value,true);
		xmlhttp.onreadystatechange=function()  {
			if(xmlhttp.readyState<4)  {
				v_percent=(parseInt(xmlhttp.readyState)*23)+3;
				msg.innerHTML="carregando..."+v_percent+"%";
			}
			else  {
				if(xmlhttp.status==200)  {
					resultado=xmlhttp.responseText;
					if(resultado=="erro")
						msg.innerHTML="CEP não encontrado.<BR>Digite o endereço manualmente.";
					else  {
						v_resultado=resultado.split("//");
						endereco.value=v_resultado[0];
						bairro.value=v_resultado[1];
						cidade.value=v_resultado[2];
						for(i=0;i<uf.options.length;i++)  {
							if(uf.options[i].innerHTML==v_resultado[3])
								uf.selectedIndex=i;
						}
						msg.innerHTML="";
					}
				}
				else  {
				//	msg.innerHTML="CEP não encontrado.<BR>Digite o endereço manualmente.";
					msg.innerHTML="Erro ao buscar CEP.<BR>Erro: " + xmlhttp.status + " - " + xmlhttp.statusText;
				}
			}
		}
		xmlhttp.send(null);
	}
}

function arruma_campo(campo,digitos)  {
	var i;
	i = 0;
	while (i < campo.value.length)  {
		if (digitos.indexOf(campo.value.substring(i,i+1)) == -1)
			campo.value = campo.value.substring(0,i) + campo.value.substring(i+1);
		else
			i++;
	}
}

function arruma_cep(campo)  {
	arruma_campo(campo,"0123456789");
}
function arruma_fone(campo)  {
	arruma_campo(campo,"0123456789");
}
/**
 * String unformatNumber(String pNum)
 * String formatCpfCnpj(String pCpfCnpj, boolean pUseSepar, boolean pIsCnpj)
 * String dvCpfCnpj(String pEfetivo, boolean pIsCnpj)
 * boolean isCpf(String pCpf)
 * boolean isCnpj(String pCnpj)
 * boolean isCpfCnpj(String pCpfCnpj)
 */


NUM_DIGITOS_CPF  = 11;
NUM_DIGITOS_CNPJ = 14;
NUM_DGT_CNPJ_BASE = 8;


String.prototype.lpad = function(pSize, pCharPad)
{
	var str = this;
	var dif = pSize - str.length;
	var ch = String(pCharPad).charAt(0);
	for (; dif>0; dif--) str = ch + str;
	return (str);
} //String.lpad


String.prototype.trim = function()
{
	return this.replace(/^\s*/, "").replace(/\s*$/, "");
} //String.trim


function unformatNumber(pNum)
{
	return String(pNum).replace(/\D/g, "").replace(/^0+/, "");
} //unformatNumber


function formatCpfCnpj(pCpfCnpj, pUseSepar, pIsCnpj)
{
	if (pIsCnpj==null) pIsCnpj = false;
	if (pUseSepar==null) pUseSepar = true;
	var maxDigitos = pIsCnpj? NUM_DIGITOS_CNPJ: NUM_DIGITOS_CPF;
	var numero = unformatNumber(pCpfCnpj);

	numero = numero.lpad(maxDigitos, '0');
	if (!pUseSepar) return numero;

	if (pIsCnpj)
	{
		reCnpj = /(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})$/;
		numero = numero.replace(reCnpj, "$1.$2.$3/$4-$5");
	}
	else
	{
		reCpf  = /(\d{3})(\d{3})(\d{3})(\d{2})$/;
		numero = numero.replace(reCpf, "$1.$2.$3-$4");
	}
	return numero;
} //formatCpfCnpj


function dvCpfCnpj(pEfetivo, pIsCnpj)
{
	if (pIsCnpj==null) pIsCnpj = false;
	var i, j, k, soma, dv;
	var cicloPeso = pIsCnpj? NUM_DGT_CNPJ_BASE: NUM_DIGITOS_CPF;
	var maxDigitos = pIsCnpj? NUM_DIGITOS_CNPJ: NUM_DIGITOS_CPF;
	var calculado = formatCpfCnpj(pEfetivo, false, pIsCnpj);
	calculado = calculado.substring(2, maxDigitos);
	var result = "";

	for (j = 1; j <= 2; j++)
	{
		k = 2;
		soma = 0;
		for (i = calculado.length-1; i >= 0; i--)
		{
			soma += (calculado.charAt(i) - '0') * k;
			k = (k-1) % cicloPeso + 2;
		}
		dv = 11 - soma % 11;
		if (dv > 9) dv = 0;
		calculado += dv;
		result += dv
	}

	return result;
} //dvCpfCnpj


function isCpf(pCpf)
{
	var numero = formatCpfCnpj(pCpf, false, false);
	var base = numero.substring(0, numero.length - 2);
	var digitos = dvCpfCnpj(base, false);
	var algUnico, i;

	// Valida dígitos verificadores
	if (numero != base + digitos) return false;

	algUnico = true;
	for (i=1; algUnico && i<NUM_DIGITOS_CPF; i++)
	{
		algUnico = (numero.charAt(i-1) == numero.charAt(i));
	}
	return (!algUnico);
} //isCpf

function isCnpj(pCnpj)
{
	var numero = formatCpfCnpj(pCnpj, false, true);
	var base = numero.substring(0, NUM_DGT_CNPJ_BASE);
	var ordem = numero.substring(NUM_DGT_CNPJ_BASE, 12);
	var digitos = dvCpfCnpj(base + ordem, true);
	var algUnico;

	// Valida dígitos verificadores
	if (numero != base + ordem + digitos) return false;

	algUnico = numero.charAt(0) != '0';
	for (i=1; algUnico && i<NUM_DGT_CNPJ_BASE; i++)
	{
		algUnico = (numero.charAt(i-1) == numero.charAt(i));
	}
	if (algUnico) return false;

	if (ordem == "0000") return false;
	return (base == "00000000"
		|| parseInt(ordem, 10) <= 300 || base.substring(0, 3) != "000");
} //isCnpj


function isCpfCnpj(pCpfCnpj)
{
	var numero = pCpfCnpj.replace(/\D/g, "");
	if (numero.length > NUM_DIGITOS_CPF)
		return isCnpj(pCpfCnpj)
	else
		return isCpf(pCpfCnpj);
} //isCpfCnpj

function arruma_cpf(campo)  {
	arruma_campo(campo,"0123456789");
	for (i = 0; i < campo.value.length; i++)  {
		if (i == 3 || i == 7)
			campo.value = campo.value.substring(0,i) + "." + campo.value.substring(i);
		if (i == 11)
			campo.value = campo.value.substring(0,i) + "-" + campo.value.substring(i);
	}
}

function arruma_cnpj(campo)  {
	arruma_campo(campo,"0123456789");
	for (i = 0; i < campo.value.length; i++)  {
		if (i == 2 || i == 6)
			campo.value = campo.value.substring(0,i) + "." + campo.value.substring(i);
		if (i == 10)
			campo.value = campo.value.substring(0,i) + "/" + campo.value.substring(i);
		if (i == 15)
			campo.value = campo.value.substring(0,i) + "-" + campo.value.substring(i);
	}
}

function DigitoCPFCNPJ(numCIC)  {
	var numDois = numCIC.substring(numCIC.length-2, numCIC.length);
	var novoCIC = numCIC.substring(0, numCIC.length-2);

	switch (numCIC.length)  {
		case 11 :
			numLim = 11;
		break;
		case 14 :
			numLim = 9;
		break;
			default : return false;
	}

	var numSoma = 0;
	var Fator = 1;
	
	for (var i=novoCIC.length-1; i>=0 ; i--)  {
		Fator = Fator + 1;
		if (Fator > numLim)  {
			Fator = 2;
		}
		numSoma = numSoma + (Fator * Number(novoCIC.substring(i, i+1)));
	}
	
	numSoma = numSoma/11;
	var numResto = Math.round( 11 * (numSoma - Math.floor(numSoma)));

	if (numResto > 1)  {
		numResto = 11 - numResto;
	}
	else  {
		numResto = 0;
	}

	var numDigito	= String(numResto)			;
	novoCIC			= novoCIC.concat(numResto)	;

	numSoma = 0;
	Fator = 1;

	for (var i=novoCIC.length-1; i>=0 ; i--)  {
		Fator = Fator + 1;
		if (Fator > numLim)  {
			Fator = 2;
		}
		numSoma = numSoma + (Fator * Number(novoCIC.substring(i, i+1)));
	}

	numSoma = numSoma/11;
	numResto = numResto = Math.round( 11 * (numSoma - Math.floor(numSoma)));

	if (numResto > 1)  {
		numResto = 11 - numResto;
	}
	else  {
		numResto = 0;
	}
	numDigito = numDigito.concat(numResto);
	if (numDigito == numDois)  {
		return true;
	}
	else  {
		return false;
	}
}
i=0;
function exibirTelaTelefone()  {
	document.getElementById("telaTelefone").style.top=document.body.scrollTop+150;
	setTimeout("exibirTelaTelefone()",1000);
}

function exibirTelaTelefone2(msg)  {
	document.getElementById("msg_entre_contato").innerHTML=msg;
	document.getElementById("tela_entre_contato1").style.display="";
	document.getElementById("tela_entre_contato2").style.display="";
	document.getElementById("tela_entre_contato3").style.display="";
	document.getElementById("tela_entre_contato4").style.display="";
}

function validaFormInscricaoContato(formulario)  {
	erro="";
	if(formulario.nome_cliente.value=="")  {
		formulario.nome_cliente.focus();
		erro+="Nome obrigatório!\n";
	}
	if(formulario.email_cliente.value=="")  {
		formulario.email_cliente.focus();
		erro+="E-Mail obrigatório!\n";
	}
	if(formulario.ddd_tel.value=="")  {
		formulario.ddd_tel.focus();
		erro+="DDD obrigatório!\n";
	}
	if(formulario.tel.value=="")  {
		formulario.tel.focus();
		erro+="Telefone obrigatório!\n";
	}
	if(formulario.imagem_seguranca.value=="")  {
		formulario.imagem_seguranca.focus();
		erro+="Imagem de Segurança obrigatório!\n";
	}
	if(erro!="")  {
		window.alert(erro);
		return false;
	}
	return true;
}