
var xmlHttp=createXmlHttpRequestObject();function createXmlHttpRequestObject()
{var xmlHttp;if(window.ActiveXObject)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{xmlHttp=false;}}
else
{try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{xmlHttp=false;}}
if(!xmlHttp)
alert("Error creating the XMLHttpRequest object.");else
return xmlHttp;}
function onDownload(ip)
{try
{if(xmlHttp.readyState==4||xmlHttp.readyState==0)
{var param="ip="+ip;xmlHttp.open("POST","onDownload.php",true);xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.onreadystatechange=hServerResgetArticle;xmlHttp.send(param);}
else
{setTimeout("onDownload("+ip+")",1000);}}
catch(e)
{alert("Can't connect to server:\n"+e.toString());}}
function hServerResgetArticle()
{if(xmlHttp.readyState==4)
{if(xmlHttp.status==200)
{try
{}
catch(e)
{alert(e.toString()+"\n"+xmlHttp.responseText);}}
else
{alert("There was a problem accessing the server: "+xmlHttp.statusText);}}}
