function jah(url,target,loading) {
    if (loading == null){
        loading="Cargando...";
    }
        

    var container = document.getElementById(target);
    var height = container.clientHeight;
    var width = container.clientWidth;

    // Arreglo alto y ancho y calculo margenes
    if (height<140){
        container.style.height = "140px";
        height=140;
    }
    var top1 = (height-111)/2;
    var left1 = (width-60)/2;
    var left2 = (width-151)/2;
    //

     var div = "<div id='pop_up' class='loading fltl' style='height:"+height+"px;width:"+width+"px;'>";
     div+=" <div class='loading_logo' style='margin-top: "+top1+"px; margin-left: "+left1+"px;'></div>";
     div+=" <div class='loading_img fltl' style='margin-left: "+left2+"px;'></div>";
     div+=" <div class='loading_txt fltl'>"+loading+"</div>";
     div+=" <div class='loading_clr'></div>";
     div+="</div>";
    container.innerHTML = div;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
		
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Msxml2.XMLHTTP");
        if (req) {
        	req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }
}    

function jahDone(target) {
    // only if req is "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            results = req.responseText;
            document.getElementById(target).innerHTML = results;
        } else {
            document.getElementById(target).innerHTML="error:\n" +
                req.statusText;
        }
    }
}