	var pxAtual = 0, timerID;

	window.onload = function(){
		//testaresolucao();
		//anima('voador');
	}
/////////////////////////////////////////////////////////////////////////////////
// funções para animar o banner voador
/////////////////////////////////////////////////////////////////////////////////
	function anima(id){
		var banner = elemento(id);

		if(banner){
			banner.style.display = 'block';
			banner.style.left    = (screen.width / 2) - 200;

			clearInterval(timerID);
			timerID = setInterval("mover('"+id+"',10)",20);
		}else{
			setTimeout("anima('"+id+"')",1000);
		}
	}
	
	function fechar(id){
		document.getElementById(id).style.display = 'none';
	}

	function mover(id,qtd){
		var maximo, timerID, banner = elemento(id);

		maximo = screen.height - (300 + 300/2) - 20;

		pxAtual+=qtd;

		if(pxAtual <= maximo){
			banner.style.top = pxAtual.toString() + 'px';
		}else{
			clearInterval(timerID);
			//setTimeout("document.getElementById('"+id+"').style.display = 'none'",5000);
		}
	}
////////////////////////////////////////////////////////////////////////////////

	function votar(cdenq){
		var obj = document.frmenq.elements, x, y, tam, flag, voto, win, url;
		
		tam = obj.length;
		flag = false;
		
		for(x=0;x<tam;x++){
			if(obj[x].name == 'resp' && obj[x].checked){
				voto = obj[x].value;
				flag = true;
				break;
			}
		}
		
		if(flag){
			url = 'votar.php?cdenq='+cdenq+'&voto='+voto;
			janela(url,500,300);
		}else{
			alert('Escolha uma das opções de voto.');
		}
	}