oInterval = 0;
parado = false;
bnnHTML = new Array();
listabns = new Array();

function popJogoMulti2(jogo) {
	if(eh_uol == 2) {
		document.location = 'cadastro.asp?j=' + jogo;
		return;
	}

	width = 800;
	height = 630;
	
	if((jogo != "super_trunfo")&&((screen.width <= 800)||(screen.height <=600))){
		window.open('jogo_multi.asp?r=' + Math.floor(Math.random()*99999999) + '&id='+jogo+'&logado=' + logado, '_jogomulti', 'dependent=0,toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,fullscreen=1');
	} else {
		window.open('jogo_multi.asp?id='+jogo+'&logado=' + logado, '_jogomulti', 'dependent=0,toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width='+width+',height='+height+',left ='+(screen.width - width)/2+',top = '+(screen.height - height)/2);
	}
}

function popAjudaMulti(jogo) {
	if(eh_uol == 2) {
		document.location = 'cadastro.asp?j=' + jogo;
		return;
	}

	window.open("jogos/" + jogo + "/instrucoes/help.asp", "ajuda1", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes, marginwidth=0, marginheight=0, resizable=yes,copyhistory=no,width=750,height=580");
}

function popJogoSingle(jogo, jogoID) {
	if(eh_uol == 2) {
		document.location = 'cadastro.asp';
		return;
	}

	window.open('jogo_single.asp?id='+jogo+'&jogoID='+jogoID+'&logado=' + logado, '_jogo' + ((assinante)?jogo:""), 'dependent=1,toolbar=0,scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=600,height=400,left = 400,top = 200');
}

function popRanking(id) {
	window.open('ranking.asp?id='+id, '_ranking', 'dependent=1,toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizable=1,width=315,height=430,left = 444,top = 192');
}

function campeonato() 
{
	window.open('campeonato.asp', '_campeonato', 'dependent=1,toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=640,height=480,left = 444,top = 192');
}

function blog() 
{
	window.open('http://blog.gametrack.com.br/', 'blog', 'dependent=0,toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,width=800,height=550');
}

function popDetalhes() {
	window.open('detalhes_amizade.asp', '_amizade', 'toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizable=0,width=440,height=575,left = 444,top = 192');
}

function popConvite2() {
	nome = ""+document.findique.nome.value;
	email = ""+document.findique.email.value;
	if(!ConfirmaEmail(email, "\nEste e-mail tem que ser válido para a indicação ser enviada.")) return
	window.open('convite_executa.asp?nome='+nome+'&email='+email, '_convite', 'dependent=1,toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=338,height=238,left = 100,top = 100');
}

//pos: 0 = primeiro a esquerda,  1 = esquerda, 2 = direita, 3 = direita da última linha
//Se quant_jogo = "---", codjog tem que ser um .jpg ("telacarteado.jpg");
//posjogo = "Nov", indica que é o quadro de aguarde novidades
//quadro_fundo = ""=="jogo_multiplayer_fundo.jpg", jogo_multiplayer_fundo_beta.jpg, jogo_multip_fundo_beta_novo.jpg
function EscreveQuadroMP(pos, codjog, posjogo, quant_jogo, para_quant_jogadores, quadro_fundo, mostra_ranking, descjog){
	if(quadro_fundo == "") quadro_fundo = "jogo_multiplayer_fundo.jpg";
	
	if(pos <= 1){ 
		s_  = '<tr><td width=20></td><td><table width="619" bgcolor=#bbb7b4 border="0" cellspacing="0" cellpadding="0">';
		if(pos == 0) s_ += '<tr><td background="images/jogo_multiplayer_borda1.jpg" height="10" width="619" colspan=5></td></tr>';
		s_ += '<tr><td width="10"></td>';
	} else
		s_  = '<td width="19"></td>'; 	
		
	s_  += '<td width="291"><table width="291" bgcolor=#f4f4f4 border="0" cellspacing="0" cellpadding="0"><tr><td width=291 height=234><A id="' + codjog + '">';
	document.write(s_);
	if(quant_jogo == "---"){
		s_ = '<img src="images/screens/' + codjog + '" width=291 height=234>';
		document.write(s_);
	} else {
		flashjogo("images/screens/" + codjog + ".swf");
		if(listabns.push != null) listabns.push(codjog);
	}
		
	s_  = '</A></td></tr><tr><td background="images/' + quadro_fundo + '" width=291 height=147><table border="0" bordercolor=#0000ff cellspacing="0" cellpadding="0"><tr><td rowspan=4 width=70 height=147></td><td width=135 height=30></td><td width=45 height=30 align="middle"><font face="Arial" style="FONT-SIZE: 12px" color="#990000"><b>' + quant_jogo + '</b></font></td></td><td width=41 height=30></td></tr><tr><td colspan=3 width=221 height=12></td></tr><tr><td colspan=3 width=221 height=58><P>' + descjog + '</P></td></tr><tr><td colspan=3 width=221 valign="bottom"  height=37>';
	
	if(posjogo == "Nov"){
	} else {
		s_  += '<table width=216 height=23 border="0" cellspacing="0" cellpadding="0"><tr><TD><IMG height=32 src="images/' + para_quant_jogadores + '" width=84></TD><td><IMG height=10 width=' + (mostra_ranking?3:30) + ' src="images/spacer.gif">';
		if(quant_jogo == "---"){
			s_  += '<IMG height=35 width=101 src="images/txt_em_breve.jpg">';
		} else {
			s_  += '<A onmouseover="MM_swapImage(\'Img2JogarXH' + posjogo + '\',\'\',\'images/bt_ajuda_jogar_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popAjudaMulti(\'' + codjog + '\');" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popAjudaMulti( \\\'' + codjog + '\\\');\'; return;} clearAttributes();popAjudaMulti(\'' + codjog + '\');"><IMG height=25 width=25 src="images/bt_ajuda_jogar.gif" border=0 name=Img2JogarXH' + posjogo + '></A>';
			if(mostra_ranking) s_  += '<A onmouseover="MM_swapImage(\'ImgRank0' + (100+posjogo) + '\',\'\',\'images/bt_rank_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popRanking(' + (100+posjogo) + ')" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popRanking(' + (100+posjogo) + ');\'; return;} clearAttributes();popRanking(' + (100+posjogo) + ');"><IMG height=25 src="images/bt_rank.gif" width=34 border=0 name=ImgRank0' + (100+posjogo) + '></A>';
			s_  += '<A onmouseover="MM_swapImage(\'Img2JogarX' + posjogo + '\',\'\',\'images/bt_jogar_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popJogoMulti2(\'' + codjog + '\');" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popJogoMulti2( \\\'' + codjog + '\\\');\'; return;} clearAttributes();popJogoMulti2(\'' + codjog + '\');"><IMG height=25 src="images/bt_jogar.gif" width=72 border=0 name=Img2JogarX' + posjogo + '></A>';
		}
		s_  += '</TD></tr></table>';
	}
	s_  += '</td></tr></table></td></tr></table></td>';
	
	if(pos > 1) {
		s_  += '<td width="10"></td></tr>';
		if(pos == 3) s_  += '<tr><td height="10" background="images/jogo_multiplayer_borda2.jpg" width="619" colspan=5></td></tr>';
		s_  += '</table></td></tr>';
	}
	
	document.write(s_);
}


//pos: 0 = primeiro a esquerda, 1 = esquerda, 2 = direita, 3 = direita da última linha
function EscreveQuadroSP(pos, codjog, nomejogo, posjogo, quant_jogo){
	s_  = '';
	if(pos == 0) 
		s_  = '<tr>';
	else if(pos == 1) 
		s_  = '<tr><td colspan=3 height=10></td></tr><tr>';
	s_ += '<td width=307 height=73 background="images/jogo_singleplayer_fundo.jpg" align="middle"><table width="280" border="0" cellspacing="0" cellpadding="0" height="56" class="texto"><tr> <td width="61%" height="15" valign="center"><IMG height=47 src="images/screens/' + codjog + '.jpg" width=168></td><td width="39%" height="15"> <div align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="texto"><tr> <td> <div align="center"><font face="Arial" style="FONT-SIZE: 12px" color="#993300">' + nomejogo + '</font></div></td></tr></table><div align="center"><A onmouseover="MM_swapImage(\'ImgRank0' + posjogo + '\',\'\',\'images/bt_rank_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popRanking(' + posjogo + ')" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popRanking(' + posjogo + ');\'; return;} clearAttributes();popRanking(' + posjogo + ');"><IMG height=25 src="images/bt_rank.gif" width=34 border=0 name=ImgRank0' + posjogo + '></A><A onmouseover="MM_swapImage(\'ImgJogar0' + posjogo + '\',\'\',\'images/bt_jogar_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popJogoSingle(\'' + codjog + '\',' + posjogo + ')" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popJogoSingle(\\\'' + codjog + '\\\',' + posjogo + ');\'; return;} clearAttributes();popJogoSingle(\'' + codjog + '\',' + posjogo + ');"><IMG height=25 src="images/bt_jogar.gif" width=72 border=0 name=ImgJogar0' + posjogo + '></A><br><font face="Arial" style="FONT-SIZE: 10px">' + quant_jogo + ' usuário' + ((quant_jogo==1)?'':'s') + ' online</font></div></div></td></tr></table></td>';

	if(pos <= 1) 
		s_  += '<td width=10></td></td>';
	else
		s_  += '</tr>';

	document.write(s_);
}

function EscreveBottom(logado){
	s_  = '</table></TD></TR></TBODY></TABLE>';
	if(logado){
		//Indique um amigo
		s_ += '<A id="iam" name="iam"></A><IMG src="images/logo_blank3.jpg"><br>	';
		s_ += '<table width="640" border="0" cellspacing="0" cellpadding="0">';
		s_ += '<tr><td width=20></td><td align="middle">';
		s_ += '<table border=0 bordercolor="red" cellpadding=0 cellspacing=0 class="texto">';
		s_ += '<form name="findique" method="post" action="convite_executa.asp">';
		s_ += '<TBODY><tr><td width="20" height="10" background="images/fundo_branco_tl.jpg"></td>';
		s_ += '<td height="10" width="494" background="images/fundo_branco_top.jpg"></td>';

		if(eh_uol) {
			s_ += '<td width="108" height="93" valign="bottom" align="middle" background="images/indique_carta.jpg" rowspan="4">';
			s_ += '<BR><img height=8 src="images/spacer.gif" width=1><BR></FONT><A onmouseover="MM_swapImage(\'ImageIndique\',\'\',\'images/bt_indique_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popConvite2();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popConvite2();\'; return;} clearAttributes();popConvite2();"><IMG height=30 src="images/bt_indique.gif" width=70 border=0 name=ImageIndique></A>';
		} else {
			s_ += '<td width="108" height="93" valign="bottom" align="middle" background="images/indique_carta2.jpg" rowspan="4">';
			s_ += '<A href="javascript:popDetalhes2();"><font size=1 style="FONT-SIZE: 10px" color=#A97100>ver detalhes<BR>da promoção</fONT></A><BR><img height=8 src="images/spacer.gif" width=1><BR></FONT><A onmouseover="MM_swapImage(\'ImageIndique\',\'\',\'images/bt_indique_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:popConvite2();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popConvite2();\'; return;} clearAttributes();popConvite2();"><IMG height=30 src="images/bt_indique.gif" width=70 border=0 name=ImageIndique></A>';
		}
		s_ += '<br><IMG height=16 src="images/spacer.gif" width=1>';
		s_ += '</td></tr><tr>';
		s_ += '<td width="20" background="images/fundo_branco_left.jpg"></td>';
		s_ += '<td valign="top" align="left" bgcolor="#f5f4f2">';
		if(eh_uol) {
			s_ += '<IMG height=20 src="images/indique_texto.jpg" width=305><IMG height=44 src="images/spacer.gif" width=195>';
		} else {
			s_ += '<IMG height=44 src="images/indique_texto2.jpg" width=500>';
		}
		s_ += '</td></tr><tr>';
		s_ += '<td width="20" background="images/fundo_branco_left.jpg"></td>';
		s_ += '<td valign="bottom" align="left" bgcolor="#f5f4f2">';
		s_ += '<IMG height=1 src="images/spacer.gif" width=30>';
		s_ += '<span class="texto">Nome:</span>&nbsp;&nbsp;';
		s_ += '<input name="nome" class="campo" maxlength="30" style="WIDTH: 150px">&nbsp;&nbsp;&nbsp;';
		s_ += '<span class="texto">E-mail:</span>&nbsp;&nbsp;';
		s_ += '<input name="email" class="campo"  maxlength="50" style="WIDTH: 150px">';
		s_ += '</td></tr><tr>';
		s_ += '<td width="20" height="20" background="images/fundo_branco_bl.jpg"></td>';
		s_ += '<td height="20" background="images/fundo_branco_bottom.jpg"></td>';
		s_ += '</tr></form></table></TD></TR></TBODY></TABLE>';
	}
	s_ += '</TD><td> <IMG height=13 alt="" src="images/spacer.gif" width=1></td></TR>';
	s_ += '<tr><td> <IMG height=21 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=107 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=132 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=108 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=19 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=19 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=19 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><td> <IMG height=19 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr>';
	s_ += '<tr><!-- Correção Botões Laterais p/ I.E. -->';
	s_ += '<td><IMG height=80 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr><!-- Fundo da página -->';
	s_ += '<tr><td colspan=13> <IMG height=22 alt="" src="images/fundo_00.jpg" width=770></td><td></td></tr>';
	s_ += '<tr><td colspan=3 rowspan=2> <IMG height=76 alt="" src="images/fundo_01.jpg" width=82></td>';
	document.write(s_);
}

function EscreveBottom2(){
	s_ = '<td colspan=8 rowspan=2> <IMG height=76 alt="" src="images/fundo_02.jpg" width=206></td>';
	s_ += '<td height="2"> <IMG height=42 alt="" src="images/spacer.gif" width=1></td></tr>';
	s_ += '<tr><td colspan=2><IMG height=34 alt="" src="images/fundo_03.jpg" width=482></td>';
	s_ += '<td><IMG height=34 alt="" src="images/spacer.gif" width=1></td></tr>';
	s_ += '<tr><td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=17></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=49></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=16></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=33></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=449></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=21></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=47></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=85></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=2></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=9></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=22></td>';
	s_ += '<td height="2"> <IMG height=1 alt="" src="images/spacer.gif" width=19></td>';
	s_ += '<td height="2"></td></tr></TBODY></TABLE>';
	s_ += '<font face="Arial" style="FONT-SIZE: 10px">';
	s_ += 'Copyright 2010 Devworks Game Technology. Todos os direitos reservados.<br><br>';
	s_ += '</font></DIV></TD><TD valign=top align=left>';
	document.write(s_);
}

function EscreveTopo(logado, puid, barraheight, total_jogadores, mostra_station, tem_mens_txt, dias_acesso, mensagem_ultimo_login, mensagem_ola, gl_email, gl_gravar, tem_novidade_index, quant_jogos){
	s_ = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align=center><table border="0" cellspacing="0" cellpadding="0"><tr><td><div align="center"><table width=770 border=0 cellpadding=0 cellspacing=0 class="texto">';
	if(!eh_uol){
		if(!logado){
			s_ += '  <tr> 	<td colspan=13> <IMG height=33 alt="" src="images/topo_00.jpg" width=770></td>';
			s_ += '<td> <IMG height=33 alt="" src="images/spacer.gif" width=1></td>';
			s_ += '</tr><form method=post name=flogin action="login.asp">';
			s_ += '<tr> <td colspan=7 rowspan=6 background="images/topo_01.jpg" width=632 height=98 valign="top">';
			s_ += '<div style="POSITION: absolute; TOP: ' + barraheight + 'px" ><IMG height=20 alt="" src="images/spacer.gif" width=84 align=top><A onmouseover="MM_swapImage(\'ImgAcao\',\'\',\'images/bt_cadastre_over.gif\',1)" onmouseout=MM_swapImgRestore() href="cadastro.asp"><IMG height=117 src="images/bt_cadastre.gif" width=119 border=0 name=ImgAcao></A></div>';
			s_ += '<table cellpadding=0 cellspacing=0 border=0><tr><td width="52"></td><td>';
			s_ += '<table width=159 height=44 cellpadding=0 cellspacing=0 border=0 background="images/fundo_usuarios_online.jpg">';
			s_ += '<tr><td width="109"></td><td width= "41" align="middle" valign="center" class="texto"><font style="FONT-SIZE: 12px" ';
			s_ += '>' + total_jogadores + '</font></td><td width="9"></td></tr></table></td></tr></table></td>';
			s_ += '<td colspan=2 bgcolor="#bab7b4"><input name="username" class="formtext" size=12 tabindex=1 value="' + ((gl_gravar=="1")?gl_email:"") + '">';
			s_ += '</td><td colspan=4 rowspan=2 background="images/topo_02.jpg" valign=top><img src="images/spacer.gif" width=11 height=1 alt=""><a href="javascript:SalvarLogin();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'ImgSalvar\',\'\',\'images/bt_salvar_login_over.gif\',1)"><img name="ImgSalvar" alt="Manter gravado o e-mail para a próxima sessão" border="0" src="images/bt_salvar_login_' + ((gl_gravar=="1")?"on":"off") + '.gif" width="22" height="26"></a><input type="hidden" value="' + gl_gravar + '" name="gravar"></td><td> <IMG height=21 alt="" src="images/spacer.gif" width=1></td>';
			s_ += '</tr><tr> <td colspan=2 rowspan=2> <IMG height=26 alt="" src="images/topo_03.jpg" width=86></td>';
			s_ += '<td> <IMG height=24 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td colspan=2 rowspan=5> <IMG height=64 alt="" src="images/topo_04.jpg" width=11></td>';
			s_ += '<td rowspan=3> <A onmouseover="MM_swapImage(\'ImgOk\',\'\',\'images/bt_ok_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:submitLogin();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:submitLogin();\'; return;} clearAttributes();submitLogin();"><IMG height=26 src="images/bt_ok.gif" width=22 border=0 name=ImgOk></A></td>';
			s_ += '<td rowspan=7> <IMG height=107 alt="" src="images/topo_05.jpg" width=19></td><td> <IMG height=2 alt="" src="images/spacer.gif" width=1></td>';
			s_ += '</tr><tr> <td colspan=2 bgcolor="#bab7b4">';
			s_ += '<input type="password" name="password" class="formtext" size=12 tabindex=2 ></td>';
			s_ += '<td> <IMG height=20 alt="" src="images/spacer.gif" width=1></td></tr></form><tr> ';
			s_ += '<td colspan=2 rowspan=3 background="images/topo_06.jpg" width=86 height=42><A onmouseover="MM_swapImage(\'ImgEsqueceu\',\'\',\'images/bt_esqueceu_over.jpg\',1)" onmouseout=MM_swapImgRestore()  href="javascript:popEsqueci()" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:popEsqueci();\'; return;} clearAttributes();popEsqueci();"><IMG height=42 src="images/bt_esqueceu.jpg" width=86 border=0 name=ImgEsqueceu></A></td>';
			s_ += '<td> <IMG height=4 alt="" src="images/spacer.gif" width=1></td></tr>';
		} else {
			s_ += '<tr> <td colspan=13> <IMG height=33 alt="" src="images/topo_00_login.jpg" width=770></td>';
			s_ += '<td> <IMG height=33 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td colspan=7 rowspan=6 background="images/topo_01_login.jpg" width=632 height=98 valign="top">';

			if (dias_acesso<=10080){ //7 dias
				s_ += '<div style="POSITION: absolute; TOP: ' + barraheight + 'px"><IMG height=20 alt="" src="images/spacer.gif" width=80 align=top><A onmouseover="MM_swapImage(\'ImgAcao\',\'\',\'images/bt_acao_over.gif\',1)" onmouseout=MM_swapImgRestore() href="assinatura.asp"><IMG src="images/bt_acao.gif" width=119 border=0 name=ImgAcao></A></div>';
			}

			s_ += '<table cellpadding=0 cellspacing=0 border=0><tr><td width="52"></td><td>';
			s_ += '<table width=159 height=44 cellpadding=0 cellspacing=0 border=0 background="images/fundo_usuarios_online.jpg">';
			s_ += '<tr><td width="109"></td><td width= "41" align="middle" valign="center" class="texto">';
			s_ += '<font style="FONT-SIZE: 12px" >' + total_jogadores + '</font></td><td width="9"></td></tr></table></td></tr></table>	</td>';
			s_ += '<td colspan=2 rowspan=3 background="images/box_login.jpg" align=CENTER valign=MIDDLE>';
			s_ += '<font face="Arial" style="FONT-SIZE: 10px">' + mensagem_ultimo_login + '</font></td>';
			s_ += '<td colspan=4 rowspan=2> <IMG height=45 alt="" src="images/topo_02_login.jpg" width=52></td>';
			s_ += '<td> <IMG height=21 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td> <IMG height=24 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td colspan=2 rowspan=5><IMG height=64 alt="" src="images/topo_04_login.jpg" width=11></td>';
			s_ += '<td rowspan=3 background="images/topo_a02_login.jpg"> </td>';
			s_ += '<td rowspan=7> <IMG height=107 alt="" src="images/topo_05.jpg" width=19></td>';
			s_ += '<td> <IMG height=2 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td colspan=2 background="images/topo_a01_login.jpg"></td>';
			s_ += '<td> <IMG height=20 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
			s_ += '<td colspan=2 rowspan=3 background="images/topo_06_login.jpg" width=86 height=42 valign="top" align="right"><A onmouseover="MM_swapImage(\'ImgLogout\',\'\',\'images/bt_logout_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="logout.asp"><IMG height=18 src="images/bt_logout.jpg" width=42 border=0 name=ImgLogout></A></td>';
			s_ += '<td> <IMG height=4 alt="" src="images/spacer.gif" width=1></td></tr>';
		}
	} else {
		s_ += '<tr><td colspan=13> <IMG height=33 alt="" src="images/topo_00_login.jpg" width=770></td><td> <IMG height=33 alt="" src="images/spacer.gif" width=1></td></tr>';
	  	s_ += '<tr><td colspan=7 rowspan=6 background="images/topo_01_login.jpg" width=632 height=98 valign="top">';
  		s_ += '<table cellpadding=0 cellspacing=0 border=0><tr><td width="52"></td><td>';
		s_ += '<table width=159 height=44 cellpadding=0 cellspacing=0 border=0 background="images/fundo_usuarios_online.jpg">';
		s_ += '<tr><td width="109"></td><td width= "41" align="middle" valign="center" class="texto">';
		s_ += '<font style="FONT-SIZE: 12px" >' + total_jogadores + '</font></td><td width="9"></td></tr></table></td></tr></table>';
		if(eh_uol == 2) s_ += '<div style="POSITION: absolute; TOP: ' + barraheight + 'px" ><IMG height=20 alt="" src="images/spacer.gif" width=84 align=top><A onmouseover="MM_swapImage(\'ImgAcao\',\'\',\'images/bt_cadastre_over.gif\',1)" onmouseout=MM_swapImgRestore() href="cadastro.asp"><IMG height=117 src="images/bt_cadastre.gif" width=119 border=0 name=ImgAcao></A></div>';
		s_ += '</td><td colspan=4 rowspan=7 background="images/uol/fundo_uol.jpg" valign=top><IMG height=23 src="images/uol/aviso_uol.gif" width=97 border=0 alt=""><BR>';
		
	
		var bot_uol = 0;
		bot_uol = eh_uol;
		if((bot_uol == 1)||(bot_uol == 3))
			s_ += '<A onmouseover="MM_swapImage(\'ImgLogout\',\'\',\'images/uol/btn_uol_over.gif\',1)" onmouseout=MM_swapImgRestore() href="assina_uol.asp"><IMG height=86 src="images/uol/btn_uol.gif" width=97 border=0 name=ImgLogout></A>';
		else if(bot_uol == 2) 
			s_ += '<A onmouseover="MM_swapImage(\'ImgLogout\',\'\',\'images/uol/btn_uol_ok_over.gif\',1)" onmouseout=MM_swapImgRestore() href="cadastro.asp"><IMG height=86 src="images/uol/btn_uol_ok.gif" width=97 border=0 name=ImgLogout></A>';

		s_ += '</td><td colspan=2 rowspan=2> <IMG height=45 alt="" src="images/uol/topo_02_login.jpg" width=41></td><td> <IMG height=21 alt="" src="images/spacer.gif" width=1></td></tr>';
	  	s_ += '<tr><td><IMG height=24 alt="" src="images/spacer.gif" width=1></td></tr><tr><td rowspan=3 background="images/topo_a02_login.jpg"></td><td rowspan=7> <IMG height=107 alt="" src="images/topo_05.jpg" width=19></td><td> <IMG height=2 alt="" src="images/spacer.gif" width=1></td></tr>';
	  	s_ += '<tr><td colspan=2 background="images/topo_a01_login.jpg"></td><td> <IMG height=20 alt="" src="images/spacer.gif" width=1></td></tr>';
	  	s_ += '<tr><td> <IMG height=4 alt="" src="images/spacer.gif" width=1></td></tr>';
	}
	
	s_ += '<tr> <td rowspan=4> <IMG height=81 alt="" src="images/topo_07.jpg" width=22></td>';
	s_ += '<td> <IMG height=27 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
	s_ += '<td rowspan=15 background="images/barra_lateral_esq.jpg" width=17></td>';
	s_ += '<td rowspan=15 valign="top" background="images/fundo_esq.jpg"><A onmouseover="MM_swapImage(\'ImgHome\',\'\',\'images/bt_home_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="index.asp"><IMG height=130 src="images/bt_home.jpg" width=49 border=0 name=ImgHome></A><br>';
	
	if(!logado){
		s_ += '<A onmouseover="MM_swapImage(\'ImgCadastro\',\'\',\'images/bt_cadastro_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="cadastro.asp"><IMG height=130 src="images/bt_cadastro.jpg" width=49 border=0 name=ImgCadastro></A>';
	}else{
		s_ += '<A onmouseover="MM_swapImage(\'ImgMinhaConta\',\'\',\'images/bt_minhaconta_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="perfil.asp"><IMG height=130 src="images/bt_minhaconta.jpg" width=49 border=0 name=ImgMinhaConta></A>';
	}
	
	s_ += '<br><A onmouseover="MM_swapImage(\'ImgComoJogar\',\'\',\'images/bt_como_jogar_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="como_jogar.asp"><IMG height=128 src="images/bt_como_jogar.jpg" width=49 border=0 name=ImgComoJogar></A><br><A onmouseover="MM_swapImage(\'ImgGametrack\',\'\',\'images/bt_gametrack_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="gametrack.asp"><IMG height=132 src="images/bt_gametrack.jpg" width=49 border=0 name=ImgGametrack></A><br><A onmouseover="MM_swapImage(\'ImgContato\',\'\',\'images/bt_contato_over.jpg\',1)" onmouseout=MM_swapImgRestore() href="contato.asp"><IMG height=127 src="images/bt_contato.jpg" width=49 border=0 name=ImgContato></A></td>';
	s_ += '<td colspan=5> <IMG height=11 alt="" src="images/topo_08.jpg" width=566></td>';
	s_ += '<td> <IMG height=11 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
	s_ += '<td colspan=4 rowspan=2> <IMG height=43 alt="" src="images/topo_09.jpg" width=519></td>';
	s_ += '<td colspan=4 bgcolor="#e3dfd8" align=middle><font face="Arial" style="FONT-SIZE: 12px"><b>';
	s_ += mensagem_ola;
	s_ += '</b></font> </td><td rowspan=2> <IMG height=43 alt="" src="images/topo_10.jpg" width=9></td>';
	s_ += '<td> <IMG height=21 alt="" src="images/spacer.gif" width=1></td></tr><tr> ';
	s_ += '<td colspan=4> <IMG height=22 alt="" src="images/topo_11.jpg" width=135></td>';
	s_ += '<td> <IMG height=22 alt="" src="images/spacer.gif" width=1></td>	</tr><tr>     ';
	s_ += '<td bgcolor="#d9d9d9" ></td><td colspan=10 background="images/fundo_blank.jpg" width=688 valign="center"></td>';
	s_ += '<td></td></tr><tr>     <td rowspan=11 bgcolor="#d9d9d9"></td>';
	s_ += '<td colspan=10 width="688" valign=top background="images/fundo_blank.jpg">';
	s_ += '<table width="655" border="0" cellspacing="0" cellpadding="0">';
	s_ += '<tr><td background="images/logo_blank_cima.jpg" height="21">'


	document.write(s_);
	
	// mostra_station: 0 = não mostra botão, 1 = mostra botão do station
	if(tem_mens_txt){// BPWIR (indicador de trecho da Ação War Império Romano)
		str  = '</td></tr><tr><td align=center>';
		str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="618" height="72" id="banner" align="middle" VIEWASTEXT>				<param name="allowScriptAccess" value="sameDomain" />				<param name="movie" value="banner4.swf?teste=0&manutencao=&u=' + puid + '" />				<param name="quality" value="high" />				<param name="bgcolor" value="#f7f7f7" />				<param name=FlashVars value="">				<embed src="banner4.swf?teste=&manutencao=&u=' + puid + '" quality="high" bgcolor="#f7f7f7" width="618" height="72" name="banner" 	align="middle" 	allowScriptAccess="sameDomain"	type="application/x-shockwave-flash" 					pluginspage="http://www.adobe.com/go/getflashplayer"			FlashVars=""/>	</object>';
		if(mostra_station == 1) str += '<BR><IMG height=1 alt="" src="images/spacer.gif" width=445><A onmouseover="MM_swapImage(\'ImgStation\',\'\',\'images/Btn_GTS_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:station();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:station();\'; return;} clearAttributes();station();"><IMG src="images/Btn_GTS_out.gif" border=0 name=ImgStation width=190 height=21></A>';
		document.write(str);
	} else {
		if(false) { // BPWIR (indicador de trecho da Ação War Império Romano)
			str  = '</td></tr><tr><td align=center>';
			str += '<A id="pwir" href="javascript:banner(100,100);"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="469" height="60" id="banner" align="middle" VIEWASTEXT>				<param name="allowScriptAccess" value="sameDomain" />				<param name="movie" value="images/acao/PWIR.swf" />				<param name="quality" value="high" />				<param name="bgcolor" value="#f7f7f7" />				<param name=FlashVars value="">				<embed src="images/acao/PWIR.swf" quality="high" bgcolor="#f7f7f7" width="469" height="60" name="banner" 	align="middle" 	allowScriptAccess="sameDomain"	type="application/x-shockwave-flash" 					pluginspage="http://www.adobe.com/go/getflashplayer"			FlashVars=""/>	</object></A>';
			if(listabns.push != null) listabns.push("pwir");
			if(mostra_station == 1) str += '<BR><IMG height=1 alt="" src="images/spacer.gif" width=445><A onmouseover="MM_swapImage(\'ImgStation\',\'\',\'images/Btn_GTS_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:station();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:station();\'; return;} clearAttributes();station();"><IMG src="images/Btn_GTS_out.gif" border=0 name=ImgStation width=190 height=21></A>';
			document.write(str);
		} else {
			str = "";
			if(mostra_station == 1) str = '<IMG height=1 alt="" src="images/spacer.gif" width=455><A onmouseover="MM_swapImage(\'ImgStation\',\'\',\'images/Btn_GTS_over.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:station();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:station();\'; return;} clearAttributes();station();"><IMG src="images/Btn_GTS_out.gif" border=0 name=ImgStation width=190 height=21></A>';
			str += '</td></tr><tr><td align=center>';
			document.write(str);
		}

	}
	s_ = '';
	s_ += '</td></tr><tr><td background="images/logo_blank_baixo_mp' + tem_novidade_index + '.jpg" height=40 valign="bottom"><IMG src="images/spacer.gif" alt="" width=195 height=38><A href="javascript: popDetalhes3();"><font size="1" color="#C26D13" style="FONT-SIZE: 9px"><B>' + quant_jogos + ' jogos</B></font></A><IMG src="images/spacer.gif" alt="" width=155 height=10><A onmouseover="MM_swapImage(\'ImgRating\',\'\',\'images/ranking_2.gif\',1)" onmouseout=MM_swapImgRestore() href="formulas.asp"><IMG src="images/ranking_1.gif" border=0 name=ImgRating></A><IMG height=10 alt="" src="images/spacer.gif" width=10><A onmouseover="MM_swapImage(\'ImgCamp\',\'\',\'images/campeonato_2.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:campeonato();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:campeonato();\'; return;} clearAttributes();campeonato();"><IMG src="images/campeonato_1.gif" border=0 name=ImgCamp></A><IMG height=10 alt="" src="images/spacer.gif" width=10><A onmouseover="MM_swapImage(\'ImgBlog\',\'\',\'images/blog_2.gif\',1)" onmouseout=MM_swapImgRestore() href="javascript:blog();" onclick="if(pcarregou) { if(href==\'\') href=\'javascript:blog();\'; return;} clearAttributes();blog();"><IMG src="images/blog_1.gif" border=0 name=ImgBlog></A></td>';
	s_ += '</tr></table></td><td><IMG height=61 alt="" src="images/spacer.gif" width=1></td>';
	s_ += '</tr><tr> <td colspan=10 rowspan=10 background="images/fundo_corpo.jpg" valign="top"><IMG height=8 alt="" src="images/fundo_corpo_top.jpg" width=688>';
	s_ += '<table width="639" border="0" cellspacing="0" cellpadding="0"><tr><td width=20></td><td>';
	document.write(s_);
}

function popDetalhes2() {
	window.open('detalhes_amizade.asp', '_amizade', 'toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizable=0,width=440,height=575,left = 444,top = 192');
}

function popDetalhes3() {
	window.open('detalhes_assinatura.asp?t=2', '_verjogo', 'toolbar=0,scrollbars=0,location=0,status=0,menubar=0,resizable=0,width=380,height=413,left = 444,top = 192');
}

function PegouFoco(){
	Parar(false);
	if(oInterval != 0) window.clearTimeout(oInterval);
	oInterval = window.setTimeout("Parar(true)", 120000); // 2 minutos para parar tudo!
}

function Parar(val){
	if(parado == val) return;
	parado = val;
	if(listabns.length != null){
		if(parado){
			if(bnnHTML.length == 0)	for(i = 0; i < listabns.length; ++i) bnnHTML.push(document.getElementById(listabns[i]).innerHTML);
			for(i = 0; i < listabns.length; ++i) document.getElementById(listabns[i]).innerHTML = '<IMG border=0 src="images/screens/parado_' + listabns[i] + '.jpg">';
		} else {
			for(i = 0; i < listabns.length; ++i) document.getElementById(listabns[i]).innerHTML = bnnHTML[i];
		}
	}
}

window.onfocus=PegouFoco;
PegouFoco();
