function modelo(cod,categoria)
{
	window.open('modelo.php?cod=' + cod + '&nomecategoria=' + categoria, '', "Height=400px, Width= 520px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=yes")
}
function servicos(cod)
{
	window.open('modelo_servico.php?cod=' + cod, '', "Height=400px, Width= 520px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=yes")
}
function consulta(cod)
{
	window.open('consulta.php?cod=' + cod, '', "Height=450px, Width= 300px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=no")
}
function esqueci()
{
	window.open('esqueci.php', '', "Height=220px, Width= 340px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=no")
}
function jardim1cp()
{
	window.open('e_i_jardim1_cp.htm', '', "Height=500px, Width= 500px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=yes")
}
function jardim2cp()
{
	window.open('e_i_jardim2_cp.htm', '', "Height=500px, Width= 500px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=yes")
}
function precp()
{
	window.open('e_i_pre_cp.htm', '', "Height=500px, Width= 500px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no, scrollbars=yes")
}
function indique()
{
	window.open('indique.htm', '', "Height=150, Width=350, Top=10, Left=10, help=Yes, resizable=no, status=no")
}
function cadastrese()
{
	window.open('cadastrese.htm', '', "Height=110, Width=350, Top=10, Left=10, help=Yes, resizable=no, status=no")
}
function registered()
{
	window.open('registered.htm', '', "Height=110, Width=350, Top=10, Left=10, help=Yes, resizable=no, status=no")
}
function registrese()
{
	window.open('registrese.htm', '', "Height=110, Width=350, Top=10, Left=10, help=Yes, resizable=no, status=no")
}
function janela_fotos()
{
	window.open('fotos/fotos.php?min=0', '', "Height=350px, Width= 650px, Top= 25px, Left= 25px, help= Yes, resizable= no, status= no")
}
var Aberto = ""
var Fechado = ""

function preload(){
if(document.images){
Aberto = new Image() 
Fechado = new Image()
Aberto.src = "images_gerais/zeta1.jpg"
Fechado.src = "images_gerais/zeta2.jpg"
}}
function mostra(item2){
item2.src=Aberto.src
}
function mostra1(item2){
item2.src=Fechado.src
}

preload();

function validar(Consulta)
{ 
	
	var expReg = /^(([0-2]\d|[3][0-1])\/([0]\d|[1][0-2])\/[1-2][0-9]\d{2})$/;
    var msgErro = 'Formato inválido de data.';
	if (Consulta.datain.value.match(expReg)){
   	} else {
       	alert(msgErro);Consulta.datain.focus();return (false);
   	}
	if (Consulta.dataout.value.match(expReg)) {
   	} else {
       	alert(msgErro);Consulta.dataout.focus();return (false);
  	}
	if (Consulta.qtddias.value == 0){alert("Por favor, Qtd dias = 0 , controlar Datas.");return (false);}
	
  	if (Consulta.nome.value.length < 1){alert("Por favor, digitar Nome.");Consulta.nome.focus();return (false);}
  	if ((Consulta.email.value.indexOf ('@', 0) == -1)||(Consulta.email.value.length < 5)) {alert("Por favor, digitar seu E-mail ou conferir a digitação.");Consulta.email.focus();return (false);}
	if (Consulta.telefone.value.length < 1){alert("Por favor, digitar Fone.");Consulta.telefone.focus();return (false);}

    return (true);
}
function valida(Contato)
{ 
	
	if (Contato.nome.value.length < 1){alert("Por favor, digitar Nome.");Contato.nome.focus();return (false);}
  	if ((Contato.email.value.indexOf ('@', 0) == -1)||(Contato.email.value.length < 5)) {alert("Por favor, digitar seu E-mail ou conferir a digitação.");Contato.email.focus();return (false);}
	if (Contato.telefone.value.length < 1){alert("Por favor, digitar Fone.");Contato.telefone.focus();return (false);}
	if (Contato.mensagem.value.length < 1){alert("Por favor, digitar a Mensagem.");Contato.mensagem.focus();return (false);}

    return (true);
}


