function vericaLogin(id_promo) {
		showIndicator();
		var url = '/ajax/clube/verifica_login.jscale';
		var req = initRequest(url);
		var parametros = '';
			
		req.open("POST", url, true);
		req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
		req.setRequestHeader('Content-length', parametros.length);
		
		req.onreadystatechange = function() {
			hideIndicator(); 
			if (req.readyState == 4) {	
				var xml = req.responseXML;
				var dados;
				if (xml != null) {
					dados = xml.getElementsByTagName("dados")[0];
					if (dados != null) {
						for (i=0; i < dados.childNodes.length; i++) {
							var node = dados.childNodes[i];
							if (node.firstChild == null) continue;
							if (node.firstChild.nodeValue != null) {
								document.getElementById(''+node.nodeName).value = node.firstChild.nodeValue;
							}
							
						}
						scaletriviaRedir(id_promo);
					}
				}			
				var resposta = req.responseText;
				
				if (resposta == 'COOKIE') location.href = '/clube/cadastro/novo.jscale?acao=confimarSenha&url.path=' + '/promocoes/clube/scaletrivia_redir.jsp?id_promo='+id_promo;
				else if (resposta == 'LOGAR') { 
					callBackLogin();
					alert('Para participar da promoção faça o login no menu ao lado!');
				}
			}
		}

		req.send(parametros);
	}
	
	function abrePromocaoPop(url,nomeJanela) {
			var w = window.open(url,nomeJanela,'toolbar=no,status=no,menubar=no,scrollbars=no,resizeable=no,top=100,left=50');
			if (w == null) {
				alert('Por favor desative o bloqueador de pop-ups');
			}
	}
	
	function abreGavetaClube(id) {
		var gaveta = document.getElementById(id);
		if (gaveta.style.display == '') gaveta.style.display = 'none';
		else gaveta.style.display = '';
	}
	
	function scaletriviaRedir(bla) {
		var f = document.forms['formPromocao'];
		if (f != null) {
			document.getElementById('id_promocao').value = bla;
			f.submit();
		}
	}