function NuevoAjax(){
    var xmlhttp=false;
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }

    if(!xmlhttp && typeof XMLHttpRequest!='undefined'){
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}

function abrir(url, contenedor){
    ajax=NuevoAjax(); 
    ajax.open("GET", url,true); 
    ajax.onreadystatechange=function(){
        if(ajax.readyState==1){
            document.getElementById(contenedor).innerHTML = 'Cargando...';
        }else if(ajax.readyState==4){
            if(ajax.status==200){
                document.getElementById(contenedor).innerHTML = ajax.responseText;
                //agregar_accion();
            }else if(ajax.status==404){
                document.getElementById(contenedor).innerHTML = "La página no existe";
            }else{
                document.getElementById(contenedor).innerHTML = "Error:".ajax.status; 
            }
        }
    }
    ajax.send(null);
}