var xmlHttp= new Array(); /** * creates a xMLHttpRequest-object * * @param object the XMLHttpRequest-object */ function GetXmlHttpObject() { var objXMLHttp=null if (window.XMLHttpRequest) { objXMLHttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); } return objXMLHttp } /** * sets the visibility of the indicator * * @param string view the status of the indicator (hidden|visible) */ function setIndicator(view) { document.getElementById('indicator').style.visibility=view; } /** * Makes the ajax-connection * * @param string url the url * @param string funct the function that has to be executed when the state is changed * @param int i an integer for simultanous connections */ function doIt(url, funct, i) { xmlHttp[i]=GetXmlHttpObject() setIndicator('visible'); if (xmlHttp[i]==null) { alert ("Error: your browser doesn't support HTTP Request"); return false; } url="http://gallery.verkoyen.eu/"+url+"&sid="+Math.random(); xmlHttp[i].onreadystatechange=funct; xmlHttp[i].open("GET",url,true); xmlHttp[i].send(null); return true; }