
function nuevoAjax(){
   var xmlHttp=false;
   try {
         xmlHttp = new XMLHttpRequest("Msxml2.XMLHTTP");
       } 
   catch (e) {
                 try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
             }

    if (!xmlHttp && typeof XMLHttpRequest!='undefined') {
           xmlHttp = new XMLHttpRequest();
    }

    return xmlHttp;
} 


function onreadystatechange()
  {
    if (http.readyState == 4) {
        results = http.responseText;
        document.getElementById("pageZone").innerHTML = results;
        enProceso = false;
    }
}

function selectPage(page) {
    if (!enProceso && http) {
       var url =  page;
       http.open("GET", url, true);
       http.onreadystatechange = onreadystatechange;
       enProceso = true;
       http.send(null);
    } 
}

var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = nuevoAjax(); // Creamos el objeto XMLHttpRequest
