//
// Crear Ajax
//
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;
}


//
// Cargar una web en un objeto
//
function cargarContenido_ajax(contenedor, url, imagen){
    
    contenedor.innerHTML = '<div class="center" style="padding: 20px 0 20px 0;"><img src="' + imagen + '" align="absmiddle" style="padding-right: 10px; border: none;" alt="" /><br /> Cargando...</div>';
    
    ajax = nuevoAjax();
    ajax.open("GET", url, true);

    ajax.onreadystatechange = function() {
        if (ajax.readyState == 4) {
            contenedor.innerHTML = ajax.responseText;
            contenedor.style.display = '';
            
            continuar = true;
        }
    }
    
    ajax.send(null);
}