//Horafunction
function moveRelogio(){ 
    momentoAtual = new Date() 
    hora = momentoAtual.getHours() 
    minuto = momentoAtual.getMinutes() 
    segundo = momentoAtual.getSeconds() 

    horaImprimivel = hora + " : " + minuto + " : " + segundo 

    document.getElementById("relogio").innerHTML = horaImprimivel 

    setTimeout("moveRelogio()",1000) 
} 
//enquete
function check_enquete() 
	{
	var fr = document.enquete;
	var check = false;
	for(a=0;a<fr.elements.length;a++){
		if(fr.elements[a].name == 'PollVote'){
			if (fr.elements[a].checked == true) {
				check = true;
				break;
			}
		}
	}
	if (check == false) {
	alert('Favor escolher uma alternativa.');
	} else {
	fr.submit();
	}
}

//aj
function extraiScript(texto){
    var ini = 0;
    while (ini!=-1){
        ini = texto.indexOf('<script', ini);
        if (ini >=0){
            ini = texto.indexOf('>', ini) + 1;
            var fim = texto.indexOf('</script>', ini);
            codigo = texto.substring(ini,fim);
            eval(codigo);
        }
    }
}

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}
function openAjax() { 
var Ajax; 
try {Ajax = new XMLHttpRequest();
}catch(ee) { 
try {Ajax = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e) { 
try {Ajax = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e) {Ajax = false; 
} 
} 
} 
return Ajax; 
} 

function aj(id,url) { 
if(document.getElementById) { 
var exibeResultado = document.getElementById(id); 
var Ajax = openAjax();
Ajax.open("GET", url, true);
Ajax.onreadystatechange = function() 
{ 
//if(Ajax.readyState == 1) {
//exibeResultado.innerHTML = "<div id='loading'><img src='images/aguarde.gif' width='110' height='34' alt=''/></div>"; 
//} 
if(Ajax.readyState == 4) {
if(Ajax.status == 200) { 
var resultado = unescape(Ajax.responseText.replace(/\+/g," "));
exibeResultado.innerHTML = resultado;
// executa scripts
extraiScript(resultado);
} 
else { 
exibeResultado.innerHTML = "Erro: "+resultado; 
} 
} 
} 
Ajax.send(null);
} 
}
function openAjax() { 
var Ajax; 
try {Ajax = new XMLHttpRequest();
}catch(ee) { 
try {Ajax = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e) { 
try {Ajax = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e) {Ajax = false; 
} 
} 
} 
return Ajax;
}

<!--
function displayWindow(theURL,winName,width,height,features) { //v3.1
// Made by Eddie Traversa modified from Macromedia Code
// http://nirvana.media3.net/
    var window_width = width;
    var window_height = height;
    var newfeatures= features;
    var window_top = (screen.height-window_height)/2;
    var window_left = (screen.width-window_width)/2;
    newWindow=window.open(''+ theURL + '',''+ winName + '','width=' + window_width + ',height=' + window_height + ',top=' + window_top + ',left=' + window_left + ',features=' + newfeatures + '');
    newWindow.focus();
}


