var XMLobj; var XMLParcer="https://u-volga.ru/dlibs/dlib.lib.php"; var ActionFunc; function GetXML(parms, action) { if(XMLobj && (XMLobj.readyState == 1 || XMLobj.readyState == 2 || XMLobj.readyState == 3) ) { setTimeout("GetXML('"+parms+"', '"+action+"');", 500); } else { ActionFunc = action; XMLobj = null; var rand=Math.floor(Math.random()*9000)+1000; parms=parms+"&r="+rand; if(window.XMLHttpRequest) { XMLobj = new XMLHttpRequest(); } else if(window.ActiveXObject) { XMLobj = new ActiveXObject('Msxml2.XMLHTTP'); if(!XMLobj) XMLobj = new ActiveXObject('Microsoft.XMLHTTP'); } if (XMLobj) { XMLobj.onreadystatechange = LoadXML; XMLobj.open("POST", XMLParcer, true); XMLobj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset: utf-8"); XMLobj.setRequestHeader("If-Modified-Since", "Thu, 01 Jan 1970 04:00:00 GMT"); //alert(parms); XMLobj.send(parms); } else { return false; } } } function LoadXML() { var status = XMLobj.readyState; switch (status) { default: case 0: // error break; case 1: case 2: case 3: // loading break; case 4: // ready result = XMLobj.responseText; eval(ActionFunc+"(result);"); break; } } function ParceText(text) { text=text.split("¹").join("[N]"); text=text.split("~").join(" "); text=text.split("&").join("[amp]"); text=text.split("+").join("[pl]"); return text; }