try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}

atual=0
function carrega(n){
    //var conteudo=document.getElementById("conteudo")
    //conteudo.innerHTML='<div class="carregando">carregando...</div>'
    atual=n
    xmlhttp.open("GET", "funcoes.php?n="+n+"&"+Math.random(),true);
    xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
            var texto=xmlhttp.responseText
            texto=texto.replace(/\+/g," ")
            texto=unescape(texto)
            var formulario=document.getElementById("formulario")
            conteudo.innerHTML=texto			
        }
    }
    xmlhttp.send(null)
}