LectorXML.xml=''; function LectorXML(url){ if ((url!=undefined)&&(url!='')) { this.xml = loadCall(url); } }; LectorXML.setXML=function(xml){ this.xml=xml; }; function loadCall(url) { // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = processReqChange; req.open("GET", url, false); // the third parameter - true - specified ASYNCHRONOUS processing i.e. not waiting for the response! req.send(null); return req.responseText; // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processReqChange; req.open("GET", url, false); // the third parameter - true - specified ASYNCHRONOUS processing i.e. not waiting for the response! req.send(); return req.responseText; } } } function processReqChange() { // only if req shows "complete" if (req.readyState == 4) { // only if "OK" if (req.status == 200) { xmldoc=req.responseXML; //_xml=req.responseText; } else { alert("Error: can not get the content ("+ req.statusText +")"); } } }