<!--
function janela( windowURL, windowName, windowFeatures )
{ 
	return window.open( windowURL, windowName, windowFeatures ) ; 
} 
function Validar(theForm)
{
	if (theForm.nome.value == "")
	{
		alert("Digite um valor para \"Nome\".");
		theForm.nome.select();
		return (false);
	}
	if (theForm.email.value == "")
	{
		alert("Digite um valor para \"E-mail\".");
		theForm.email.select();
		return (false);
	}
	var Erro = "Seu e-mail não é válido.\nPreencha-o assim:\nusuario@provedor.com.br";
	if ((theForm.email.value.indexOf("@") == -1) || (theForm.email.value.indexOf(".") == -1))
	{
		alert(Erro);
		theForm.email.select();
		return (false);
	}
	var check_tel = "0123456789-() ";
	var Valid_tel = true;
	var Valid_fax = true;
	for (i = 0;  i < theForm.Telefone.value.length;  i++)
	{
		ch = theForm.Telefone.value.charAt(i);
		for (j = 0;  j < check_tel.length;  j++)
		if (ch == check_tel.charAt(j))
			break;
		if (j == check_tel.length)
		{
			Valid_tel = false;
			break;
		}
	}
	if (!Valid_tel && theForm.Telefone.value.length!=0)
	{
		alert("Digite apenas parênteses, hífen e espaço em \"Telefone\".");
		theForm.Telefone.select();
		return (false);
	}
	if (theForm.Telefone.value.length < 7 && theForm.Telefone.value.length!=0)
	{
		alert("Digite pelo menos 7 números em \"Telefone\".");
		theForm.Telefone.select();
		return (false);
	}
	for (i = 0;  i < theForm.Fax.value.length;  i++)
	{
		ch = theForm.Fax.value.charAt(i);
		for (j = 0;  j < check_tel.length;  j++)
		if (ch == check_tel.charAt(j))
			break;
		if (j == check_tel.length)
		{
			Valid_fax = false;
			break;
		}
	}
	if (!Valid_fax && theForm.Fax.value.length!=0)
	{
		alert("Digite apenas parênteses, hífen e espaço em \"Fax\".");
		theForm.Fax.select();
		return (false);
	}
	if (theForm.Fax.value.length < 7 && theForm.Fax.value.length!=0)
	{
		alert("Digite pelo menos 7 números em \"Fax\".");
		theForm.Fax.select();
		return (false);
	}
	return (true);
}
//-->

