/* --------------------------------
 Detectando Resolucao
---------------------------------*/
if (document.frmResolucao.Resolucao.value != screen.width)
{
	GeraCookie();
}
function GeraCookie ()
{
	document.frmResolucao.Resolucao.value = screen.width;
	document.frmResolucao.submit();
}

/* --------------------------------
 Script para Validar Contato
---------------------------------*/
function validContato()
{
	if (document.frmContato.nome.value == 0)
	{
		alert('Preencha o Campo Nome');
		document.frmContato.nome.focus();
		return(false);
	}
	if (document.frmContato.email.value == 0)
	{
		alert('Preencha o Campo E-mail');
		document.frmContato.email.focus();
		return(false);
	}
	if (document.frmContato.mensagem.value == 0)
	{
		alert('Preencha o Campo Mensagem');
		document.frmContato.mensagem.focus();
		return(false);
	}
	return(true);
}

/* --------------------------------
 Script para Validar Cadastro
---------------------------------*/
function validCadastro()
{
	if (document.frmContato.Cliente.value == 0)
	{
		alert('Preencha o Campo Nome');
		document.frmContato.Cliente.focus();
		return(false);
	}
	if (document.frmContato.Email.value == 0)
	{
		alert('Preencha o Campo E-mail');
		document.frmContato.Email.focus();
		return(false);
	}
	if (document.frmContato.Senha.value == 0)
	{
		alert('Preencha o Campo Senha');
		document.frmContato.Senha.focus();
		return(false);
	}
	if (document.frmContato.Endereco.value == 0)
	{
		alert('Preencha o Campo Endereco');
		document.frmContato.Endereco.focus();
		return(false);
	}
	if (document.frmContato.CEP.value == 0)
	{
		alert('Preencha o Campo CEP');
		document.frmContato.CEP.focus();
		return(false);
	}
	if (document.frmContato.CPF.value == 0)
	{
		alert('Preencha o CPF/CNPJ E-mail');
		document.frmContato.CPF.focus();
		return(false);
	}
	return(true);
}


// Abrindo Nova Janela //
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->

