// abre a janela para exibir Flyer   
function pop_up()
{
	window.open("pop_up.htm","flyer","statusbar=no,menubar=no,locationbar=no,toolbar=no,height=270,width=500")
}
		
// abre a janela para exibir o clip da inauguração
function janela()
{
	window.open("/video/video.htm","BAlI","width=284,height=300,toolbars=no,status=no,scrollbars=no,left=80,top=40");
}

// não sei
function plugNS()
{
	var b=1;
	var o=0;
	var p=new Array("Shockwave Flash","Shockwave for Director","RealPlayer","QuickTime","VivoActive","LiveAudio","VRML","Dynamic HTML Binding","Windows Media Services");
	var np=navigator.plugins;
	for(var x=0;x<p.length;x++)
	{
		for(var i=0;i<np.length;i++)
		if(np[i].name.indexOf(p[x])>=0)o|=b;
		b*=2;
	}
	return o;
}


function plugIE()
{
	if(!document.body)document.write('<body>');
	var db=document.body;
	var o=0;
	var b=1;
	var p=new Array("D27CDB6E-AE6D-11CF-96B8-444553540000","2A202491-F00D-11CF-87CC-0020AFEECF20","23064720-C4F8-11D1-994D-00C04F98BBC9","","","","90A7533D-88FE-11D0-9DBE-0000C0411FC3","9381D8F2-0288-11D0-9501-00AA00B911A5","22D6F312-B0F6-11D0-94AB-0080C74C7E95");
	db.addBehavior("#default#clientcaps");
	for(var i=0;i<p.length;i++)
	{
		if(p[i])
		if(db.isComponentInstalled("{"+p[i]+"}","componentid"))o|=b;
		b*=2;
	}
	return o;
}

function nedstatbasic(id,options)
{
	var n=navigator;
	var ver=n.appVersion;
	var name=n.appName;
	var d=document;
	var verIE=parseInt(ver.substring(ver.indexOf("MSIE")+5,ver.indexOf("MSIE")+6));
	
	if(verIE>0)ver=verIE;
	else ver=parseInt(ver);
	
	var u="http://m1.nedstatbasic.net/n?id="+id;
	var r;

	if(options&1)
		r=d.referrer;
	else
		if (self.location != top.location)
			r=self.document.referrer;
		else
			r=top.document.referrer;

	if(!(options&2))
	{
		var rc=r;
		var i=rc.indexOf('?');
		if(i >=0)rc=rc.substring(0, i);
		i=rc.lastIndexOf('/');
		if(i >=0)rc=rc.substring(0, i+1);
		var l=''+d.location;
		if(l.indexOf(rc)==0)r='';
	}
	if(r&&(r!=d.location))u+="&r="+escape(r);
	if((name=="Netscape"&&ver>=3))u+="&p="+plugNS();
	if(verIE>=5&&n.appVersion.indexOf('Win')>=0&&n.userAgent.indexOf('Opera')<0)u+="&p="+plugIE();
	
	if(ver>=4)
	{
		var s=screen;
		var w=s.width;
		var c=s.colorDepth;
		if(w)u+="&w="+w;
		if(c)u+="&c="+c;
	}
	d.write('<a target=_blank href="http://v1.nedstatbasic.net/stats?'+id+'"><img src="'+u+'" border=0 width=1 height=1 alt="Nedstat Basic - Free web site statistics"></a>');
}


function promoValidacao(theForm) {
	if(theForm.txtNome.value.length == 0){
		alert('É necessário digitar o seu nome');
		return(false);
	}

	if(theForm.txtEmail.value.length == 0){
		alert('Por Favor digite o seu E-mail');
		return(false);
	}

	if(theForm.txtDDD.value.length == 0){
		alert('Por Favor digite o seu DDD');
		return(false);
	}

	if(theForm.txtTelefone.value.length == 0){
		alert('Por Favor digite o seu telefone');
		return(false);
	}

	return(true);	
}

