// menu acompanha tela
function setVariables() {
if (navigator.appName == "Netscape") {
v=".top=";
dS="document.";
sD="";
y="window.pageYOffset";
}
else {
v=".pixelTop=";
dS="";
sD=".style";
y="document.body.scrollTop";
   }
}
function checkLocation() {
object="object1";
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout("checkLocation()",10);
}
//fim

var current = 0;
var x = 0;
var speed = 100;
var speed2 = 2000;
		
function initArray(n) {

  this.length = n;
  for (var i =1; i <= n; i++) {
	this[i] = ' ';
  }
}
	typ = new initArray(6);
	typ[0]="Grupo Ki-Festa - Buffet & Eventos - ''Não Vendemos Festas... Realizamos Sonhos!!!''";
	typ[1]="30 anos de dedicação e habilidade na realização de seu evento";
	typ[2]="Locadora completa de materiais para eventos, tais como: mesas, cadeiras, pratos, talheres, toalhas, taças, etc...";
	typ[3]="Locação de tendas 03x03m, 05x05m, 10x10m e 15x15m; tablados sob medida com ou sem forração";
	typ[4]="03 salões próprios na cidade de Jundiaí, com capacidade de até 600 pessoas cada.";
	typ[5]="''Que culpa temos, se no final, todos dizem......    KI-FESTA!!!!";
		
function typewrite() 
{
	var m = typ[current];
	window.status = m.substring(0, x++) + "_";
	if (x == m.length + 1) 
	{
		x = 0;
		current++;
		if (current > typ.length - 1) 
		{
			current = 0;
		}
		setTimeout("typewrite()", speed2);
	}
	else 
	{
		setTimeout("typewrite()", speed);
	}
}
		
function Display() {
	if (screen.width==800)
	window.location.replace("index800.asp") 
	else if (screen.width==1024)
	window.location.replace("index1024.asp")
	else
	window.location.replace("index1280.asp")
}

var isIE4 = false;
var isNN4 = false;
if ( document.all ) {
	isIE4 = true;
}
if ( ( 0 <= navigator.appName.indexOf( "Netscape" ) ) && ( 4 <= parseInt( navigator.appVersion.charAt(0) ) ) ) {
	isNN4 = true;
}
i=0;			
wn=0;	

function openBr( theURL ) { 
	if ( isIE4 || isNN4 ) {
		features = 'scrollbars=yes,top=0,left=0,width=' + screen.availWidth + ',height=' + screen.availHeight;
	}
	else {
		features = 'scrollbars=yes,width=800,height=640';
	}
	wn++;		
	win1=window.open(theURL,wn,features); 
	i++;		
}

function OpenPagina(pagina,altura,largura,bar) {
	hor = (screen.availWidth - largura) / 2
	ver = (screen.availHeight - altura) / 2
	window.open(pagina,'pagina','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+bar+',resizable=no,menubar=no,height='+altura+',width='+largura+',top='+ver+',left='+hor)
}

function CheckForm() { 

	var errorMsg = "";
	
	if (document.contato.data.value == ""){
		errorMsg += "\n\tData \t- Entre com a Data do Evento";
		document.contato.data.focus();
	}

	if (document.contato.fone.value == ""){
		errorMsg += "\n\tFone \t- Entre com o Telefone";
		document.contato.fone.focus();
	}

	if (document.contato.cidade.value == ""){
		errorMsg += "\n\tCidade \t- Entre com a Cidade";
		document.contato.cidade.focus();
	}

	if ((document.contato.email.value == "") || (document.contato.email.value.length > 0 && (document.contato.email.value.indexOf("@",0) == - 1 || document.contato.email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail \t- Entre com um E-mail válido";
		document.contato.email.focus();
	}
		
	if (document.contato.nome.value == ""){
		errorMsg += "\n\tNome \t- Digite seu Nome";
		document.contato.nome.focus();
	}
		
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Seu Pedido de Orçamento não pode ser enviado, devido a problema(s) no preenchimento.\n";
		msg += "                Favor verificar o(s) campo(s) com problema(s).\n";
		msg += "______________________________________________________________\n\n";
		msg += "O(s) seguinte(s) campo(s) precisam ser corrigidos: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}


function CheckCase() { 

	var errorMsg = "";

	if (document.frmUser.Message.value == ""){
		errorMsg += "\n\tMensagem \t- Entre com a Mensagem";
		document.frmUser.Message.focus();
	}

	if ((document.frmUser.Email.value == "") || (document.frmUser.Email.value.length > 0 && (document.frmUser.Email.value.indexOf("@",0) == - 1 || document.frmUser.Email.value.indexOf(".",0) == - 1))) { 
		errorMsg += "\n\tE-mail \t- Entre com um E-mail válido";
		document.frmUser.Email.focus();
	}
		
	if (document.frmUser.Evento.value == ""){
		errorMsg += "\n\tEvento \t- Entre com Data do Evento";
		document.frmUser.Evento.focus();
	}

	if (document.frmUser.Name.value == ""){
		errorMsg += "\n\tNome \t- Digite seu Nome";
		document.frmUser.Name.focus();
	}


			
	if (errorMsg != ""){
		msg = "______________________________________________________________\n\n";
		msg += "Seu Contato não pode ser enviado, devido a problema(s) no preenchimento.\n";
		msg += "                Favor verificar o(s) campo(s) com problema(s).\n";
		msg += "______________________________________________________________\n\n";
		msg += "O(s) seguinte(s) campo(s) precisam ser corrigidos: -\n";
		
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}
	
	return true;
}