// byJNS - junior@clube7.com.br //

function conf(theForm)
{

if (theForm.nome.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Nome.");
	theForm.nome.focus();
	return (false);
}

if (theForm.email.value.indexOf("@",0) == -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

x = theForm.email.value.length;
x = x - 1;

if (theForm.email.value.indexOf("@",0) == x)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf("@",0) == 0)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf(".@",0) != -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf("@.",0) != -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.usuario.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Usuário.");
	theForm.usuario.focus();
	return (false);
}

if (theForm.senha.value == "")
{
	alert("Paparazzo MT\n\nInforme a sua Senha.");
	theForm.senha.focus();
	return (false);
}

if (theForm.csenha.value == "")
{
	alert("Paparazzo MT\n\nConfirme a sua Senha.");
	theForm.csenha.focus();
	return (false);
}

if (theForm.senha.value != theForm.csenha.value)
{
	alert("Paparazzo MT\n\nConfirmação de Senha errada, digite novamente.");
	theForm.csenha.focus();
	return (false);
}
	theForm.submit;
}

function conf2(theForm)
{

if (theForm.nome.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Nome.");
	theForm.nome.focus();
	return (false);
}

if (theForm.endereco.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Endereço.");
	theForm.endereco.focus();
	return (false);
}

if (theForm.bairro.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Bairro.");
	theForm.bairro.focus();
	return (false);
}

if (theForm.cidade.value == "")
{
	alert("Paparazzo MT\n\nInforme a sua Cidade.");
	theForm.cidade.focus();
	return (false);
}

if (theForm.uf.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Estado.");
	theForm.uf.focus();
	return (false);
}

if (theForm.email.value.indexOf("@",0) == -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

x = theForm.email.value.length;
x = x - 1;

if (theForm.email.value.indexOf("@",0) == x)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf("@",0) == 0)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf(".@",0) != -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.email.value.indexOf("@.",0) != -1)
{
    alert("Paparazzo MT\n\nInforme o seu Email corretamente.");
    theForm.email.focus();
    return (false);
}

if (theForm.cpf.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu CPF.");
	theForm.cpf.focus();
	return (false);
}

if (theForm.usuario.value == "")
{
	alert("Paparazzo MT\n\nInforme o seu Usuário.");
	theForm.usuario.focus();
	return (false);
}

if (theForm.senha.value == "")
{
	alert("Paparazzo MT\n\nInforme a sua Senha.");
	theForm.senha.focus();
	return (false);
}

if (theForm.csenha.value == "")
{
	alert("Paparazzo MT\n\nConfirme a sua Senha.");
	theForm.csenha.focus();
	return (false);
}

if (theForm.senha.value != theForm.csenha.value)
{
	alert("Paparazzo MT\n\nConfirmação de Senha errada, digite novamente.");
	theForm.csenha.focus();
	return (false);
}

if (theForm.termo.value == "")
{
	alert("Paparazzo MT\n\nLeia e Marque o Termo do Cadastro.");
	theForm.termo.focus();
	return (false);
}
	theForm.submit;
}

function abrir( hp )
{
    x = eval(screen.width);
    y = eval(screen.height);

    h = 380;
    v = 260;

    d = x / 2;
    r = d - h;

    t = y / 2;
    s = t - v;

    if ( x == 800 ) { s = 0; }

    window.open(hp,"","top="+s+",left="+r+",resizable=no,location=no,toolbar=no,status=no,menubar=no,copyhistory=no,scrollbars=no,width=764,height=560")
}

// JNS

