function Busca() {
	var q = document.getElementById("__query");
	if (q!=null) {
		location.href="/2007/busca.asp?query=" + q.value;
	}
}
function PosicionaJanela(width,height) {
 window.resizeTo(width,height);
 window.moveTo((screen.availWidth-width)/2, (screen.availHeight-height)/2);
}

function AbreJanela(url) {
	jan = window.open(url,'_blank','resizable=yes,width=400,height=400');
	jan.document.write('<html><head><title>:: Rei da Praia ::</title></head>');
	jan.document.write('<body onload="window.resizeTo(imagem.clientWidth+10,imagem.clientHeight+30)" ');
	jan.document.write('leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#ffffff">');
	jan.document.write('<img src="' + url + '" id="imagem" border=0></body></html>');
	jan.document.close();
	jan.focus();
}

function AbreHorario(url) {
window.open('/2006/popuptv.asp','_blank','resizable=yes,width=400,height=310');
}

function AbrePlacar(url) {
window.open('/2006/popplacar.asp?conteudo='+url+'','_blank','resizable=no,width=425,height=395');
}

function AbreIngles(url) {
window.open('/2009/ingles/index.asp?conteudo=117','_blank','resizable=no,width=647,height=610');
}

function AbreIngles2007(url) {
window.open('/2007/ingles/index.asp?conteudo=117','_blank','resizable=no,width=647,height=610');
}
function AbreIngles2008(url) {
window.open('/2008/ingles/index.asp?conteudo=117','_blank','resizable=no,width=647,height=610');
}
function AbreIngles2009(url) {
window.open('/2009/ingles/index.asp?conteudo=117','_blank','resizable=no,width=647,height=610');
}

function BannnerHome(){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="280" height="380" id="banner" align="middle" VIEWASTEXT>\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="../images/mascote_rei2.swf" />\n'); 
	document.write('<param name="quality" value="high" />\n'); 
	document.write('<param name="bgcolor" value="#0000ff" />\n'); 
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="/images/mascote_rei2.swf" wmode="transparent" quality="high" bgcolor="#0000ff" width="280" height="380" name="banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'); 
	document.write('</object>\n');
}
function ListaGaleria() {
	var path = arguments[0];
	for (i=1; i<arguments.length; i++) {
		document.write('<TD><A href="javascript:AbreJanela(\'/images/galeria'+path+'/img/'+arguments[i]+'\');">');
		document.write('<IMG onmouseover="this.src=\'/images/galeria'+path+'/ico_hover/'+arguments[i]+'\'" ');
		document.write('onmouseout="this.src=\'/images/galeria'+path+'/ico/'+arguments[i]+'\'" height=64 alt="" ');
		document.write('src="/images/galeria'+path+'/ico/'+arguments[i]+'" width=106 border=0></A></TD>')
	}
}

function SplashPromo() {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="420" height="420" id="promo_reidapraia" align="middle" VIEWASTEXT>\n');
	document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
	document.write('<param name="movie" value="http://www.reidapraia.com.br/images/noticias2010/promo_reidapraia.swf" />\n'); 
	document.write('<param name="quality" value="high" />\n'); 
	document.write('<param name="bgcolor" value="#ffffff" />\n'); 
	document.write('<param name="wmode" value="transparent" />\n'); 
	document.write('<embed src="http://www.reidapraia.com.br/images/noticias2010/promo_reidapraia.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="420" height="420" name="promo_reidapraia" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n'); 
	document.write('</object>\n');
}

function FechaSplash() {
	document.getElementById('splash').style.visibility='hidden';
}
