function changeReadyState(objDOMDocument, iReadyState) {
		//change the readyState
		objDOMDocument.readyState = iReadyState;
		
		//if there is an onreadystatechange event handler, run it
		if (objDOMDocument.onreadystatechange != null && typeof objDOMDocument.onreadystatechange == "function")
			objDOMDocument.onreadystatechange();
	}
	
if (navigator.appName=='Netscape') {
	Document.prototype.onreadystatechange = null;
	
	//add the loadXML() method to the Document class
		Document.prototype.loadXML = function(strXML) {
		
			//change the readystate
			changeReadyState(this, 1);
		
			//create a DOMParser
			var objDOMParser = new DOMParser();
			
			//create new document from string
			var objDoc = objDOMParser.parseFromString(strXML, "text/xml");
			
			//make sure to remove all nodes from the document
			while (this.hasChildNodes())
				this.removeChild(this.lastChild);
			    
			//add the nodes from the new document
			for (var i=0; i < objDoc.childNodes.length; i++) {
			    
				//import the node
				var objImportedNode = this.importNode(objDoc.childNodes[i], true);
			    
				//append the child to the current document
				this.appendChild(objImportedNode);
			
			} //End: for
			
			//change the readystate
			changeReadyState(this, 4);
			
		} //End: function
}
function getXMLHttpRequest(){
	var aVersions = [ "MSXML2.XMLHttp.5.0",
			"MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0",
			"MSXML2.XMLHttp","Microsoft.XMLHttp"];

	if (window.XMLHttpRequest){
			// para IE7, Mozilla, Safari, etc: que usen el objeto nativo
			return new XMLHttpRequest();
	}else if (window.ActiveXObject){
		// de lo contrario utilizar el control ActiveX para IE5.x y IE6.x
		for (var i = 0; i < aVersions.length; i++) {
			try {
				var oXmlHttp = new ActiveXObject(aVersions[i]);
				return oXmlHttp;
			}catch (error) {
			//no necesitamos hacer nada especial
			}
		}
	}
}
