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 sendAjaxAlert(url){
	retorno=true;
    ajax=NuevoAjax(); 
    ajax.open("GET", url,true); 
    ajax.onreadystatechange=function(){
        if(ajax.readyState==1){
            //Sucede cuando se esta cargando la pagina
            //contenedor.innerHTML = "  cargando...";//<-- Aca puede ir una precarga
        }else if(ajax.readyState==4){
            //Sucede cuando la pagina se cargó
            if(ajax.status==200){
                //Todo OK
				if(ajax.responseText != "")
				{
					mostrarAlertError(ajax.responseText);	
					retorno=false;
				}
            }else if(ajax.status==404){
                //La pagina no existe
                mostrarAlertError("La página no existe");
            }else{
                //Mostramos el posible error
                mostrarAlertError("Error:".ajax.status); 
            }
        }
    }
    ajax.send(null);
    return retorno;
}