    function GetXMLHttp() {
        if(navigator.appName == "Microsoft Internet Explorer") {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        }else {
            xmlHttp = new XMLHttpRequest();
        }
        return xmlHttp;
    }
    var xmlRequest = GetXMLHttp();
    var container;
    
    // ------------------------------------    
    function abrirPag(valor,unidade){
        var url = valor;
        container = unidade;
        xmlRequest.open("GET",url,true);    
        xmlRequest.onreadystatechange = mudancaEstado;
        xmlRequest.send(null);

        if (xmlRequest.readyState == 1) {            
            document.getElementById(container).innerHTML = "Carregando...";
        }
        return url;
    }

    function mudancaEstado(){
        if (xmlRequest.readyState == 4){            
            document.getElementById(container).innerHTML = xmlRequest.responseText;
        }
    }

