try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}


function carrega(idLoc,pag){

    var conteudo=document.getElementById(idLoc)
   // conteudo.innerHTML='<div class="caregando">Carregando...</div>'

    xmlhttp.open("GET", pag,true);

    xmlhttp.onreadystatechange=function() {

        if (xmlhttp.readyState==4){

            var texto=xmlhttp.responseText

            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)

            var conteudo=document.getElementById(idLoc)
            conteudo.innerHTML=texto


        }
    }
    xmlhttp.send(null)
}

function menuclick(idLoc,pag){
    carrega(idLoc,pag)
    return false
}

