function AO(a,b){this.url=a;this.query=b;this.uri=a+"?"+b;this.init=false;this.http=false;this.setup()}AO.prototype.debug=false;AO.prototype.setup=function(){if(typeof XMLHttpRequest!="undefined"){this.http=new XMLHttpRequest()}if(!this.http&&window.ActiveXObject){try{this.http=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{this.http=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){this.http=false}}}if(this.http){this.init=true}if(this.debug){alert(this.http)}};AO.handler=function(b){var a=b;if(a.debug){alert("readyState: "+a.http.readyState)}if(a.http.readyState==4){a.txt=a.http.responseText;a.xml=a.http.responseXML;a.readyState=a.http.readyState;a.status=a.http.status;a.statusText=a.http.statusText;a.headers=a.http.getAllResponseHeaders();a.getHeader=function(c){return a.http.getResponseHeader(c)};if(a.debug){alert("status: "+a.status+"\ncalling onload()")}a.onload()}else{a.wait()}};AO.prototype.putHere=function(b,a){if(a!=null){document.getElementById(b).innerHTML=a}else{document.getElementById(b).innerHTML=this.txt}};AO.prototype.go=function(a){if(!this.init){return false}var b=this;try{this.http.onreadystatechange=function(){AO.handler(b)};if(a=="GET"){if(this.debug){alert("getting: "+this.uri)}this.http.open("GET",this.uri,true);this.http.send(null)}else{if(a=="POST"){if(this.debug){alert("posting: "+this.url+"\npost data: "+this.query)}this.http.open("POST",this.url,true);this.http.setRequestHeader("Content-Type","application/x-www-form-urlencoded");this.http.send(this.query)}}}catch(c){if(this.debug){alert("failed to connect")}this.init=false;this.onload()}};AO.prototype.get=function(){this.go("GET")};AO.prototype.post=function(){this.go("POST")};AO.prototype.onload=function(){};function ajax(){var b;try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(d){try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){b=null}}if(!b&&typeof XMLHttpRequest!="undefined"){b=new XMLHttpRequest()}return b}function byaks(a,b,c){xhs=new ajax();if(xhs){xhs.open(a,b,true);if(c){xhs.onreadystatechange=c}if(a=="post"){qs=b.split("?");qs=qs[1];xhs.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhs.send(qs)}else{xhs.send(null)}}};
