//Tenta criar o objeto xmlHTTP
try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}

//Carrega via XMLHTTP a url recebida e coloca seu valor
//no objeto com o id recebido
function ajaxHTML(id,url) {
    //Carregando...
    document.getElementById(id).innerHTML="<span class='carregando'>" + "Carregando...</span>";
		ajaxRun(id, url);
}

//Executa
function ajaxRun(pId, pUrl){
    //Abre a conexão
    xmlhttp.open("GET", pUrl, true);
    //Função para tratamento do retorno
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
            //Mostra o HTML recebido
            retorno=unescape(xmlhttp.responseText.replace(/\+/g," "));
            document.getElementById(pId).innerHTML=retorno;
						InitializeTimer(6);
        }
    }
    //Executa
    xmlhttp.send(pUrl);
}
