	var submitcount = 0;
	var submitcountlogin = 0;
	
	//history.forward(); 
	
	function valida_express(frm)
	{
	var vogais = "aeiouAEIOU";
	var cInvalidos = "&*¨%#@$!?;:,./\|=+)({}][<>";
	var cInvalidosApelido = cInvalidos + " ";
	

// testa se o email foi preenchido e se está no formato correto
	if (!isEmail(frm.inscricao_email.value)) {
		erroval(frm.inscricao_email,"lblMail","O email deve ser preenchido no formato correto (usuário@dominio).")
		return false;
	}			
	


	// verifica se o cpfpassaporte foi preenchido
	if (isBlank(frm.inscricao_cpfpassaporte.value)) {
		erroval(frm.inscricao_cpfpassaporte,"lblcpfpassaporte","O CPF é obrigatório.");
		return false;
	}else{
		

var i;   
s = document.form_cadastro.inscricao_cpfpassaporte.value; 
s = s.replace(".","");
s = s.replace(".","");
s = s.replace(".","");
s = s.replace(".","");
s = s.replace(".","");
s = s.replace(".","");
s = s.replace(".","");
s = s.replace("-","");
s = s.replace("-","");
s = s.replace("-","");
s = s.replace(" ","");
s = s.replace(" ","");
s = s.replace(" ","");
//alert(s)

var c = s.substr(0,9);   
var dv = s.substr(9,2); 
var d1 = 0;   
for (i = 0; i < 9; i++)   
{   
d1 += c.charAt(i)*(10-i);   
} 
  
if (d1 == 0){   
		erroval(frm.inscricao_cpfpassaporte,"lblcpfpassaporte","CPF inválido.");
		frm.inscricao_cpfpassaporte.value = "";
		return false;
} 
  
d1 = 11 - (d1 % 11);   
if (d1 > 9) d1 = 0;   
if (dv.charAt(0) != d1) 
  
{   
		erroval(frm.inscricao_cpfpassaporte,"lblcpfpassaporte","CPF inválido.");
		frm.inscricao_cpfpassaporte.value = "";
		return false;
}   
  
d1 *= 2; 
  
for (i = 0; i < 9; i++) 
{   
d1 += c.charAt(i)*(11-i);   
} 
  
d1 = 11 - (d1 % 11);   
if (d1 > 9) d1 = 0;   
if (dv.charAt(1) != d1) 
  
{ 
		erroval(frm.inscricao_cpfpassaporte,"lblcpfpassaporte","CPF inválido.");
		frm.inscricao_cpfpassaporte.value = "";
		return false;
} 



		
		};
		



	// confere que o formulário tenha sido submetido somente uma vez
	if (submitcount == 0) {
		submitcount++;
		return true;
	}
	else
		return false;
	
	}
	
	
	
function Tecla(e)
{
	if (document.all) // Internet Explorer
		var tecla = event.keyCode;
	else if(document.layers) // Nestcape
		var tecla = e.which;
		if (tecla > 47 && tecla < 58) // numeros de 0 a 9
			return true;
		else
			{
				if (tecla != 8) // backspace
					event.keyCode = 0;
					//return false;
				else
					return true;
			}
}	
