function Cendojax(){
    //Método de petición (GET|POST),GET por defecto
    this.method = "GET";
    //Propiedades para la respuesta...
    this.responseText;
    this.responseXML;

    //Definición de métodos a sobreescribir...
    this.onLoading = function() { return; };
    this.onLoaded = function() { return; };
    this.onInteractive = function() { return; };
    this.onComplete = function() { return; };
}


Cendojax.prototype.run = function ( _file ){
    var oXml = null;

    if (window.XMLHttpRequest) {
        oXml = new XMLHttpRequest();
    } else if(window.ActiveXObject) {
        oXml = new ActiveXObject("Microsoft.XMLHTTP");
    } else {
        alert("¡Atención! Su navegador no incluye soporte para visualizar correctamente esta web");
    }

    var self = this;
    oXml.onreadystatechange = function() {
        switch (oXml.readyState){
            case 1:
                self.onLoading();
                break;
            case 2:
                self.onLoaded();
                break;
            case 3:
                self.onInteractive();
                break;
            case 4:
                self.responseText = oXml.responseText;
                self.responseXML = oXml.responseXML;
                self.onComplete();
                break;
        }
    }
	//alert(_file);
    oXml.open (this.method, _file ,true);
	oXml.setRequestHeader("encoding", "UTF-8");
    oXml.send (null);
}

