
function LoadXML(URL){if(window.XMLHttpRequest){var xmlDoc=new window.XMLHttpRequest();xmlDoc.open("GET",URL,false);xmlDoc.send("");return xmlDoc.responseXML;}else if(ActiveXObject("Microsoft.XMLDOM")){var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.ignoreWhite=true;xmlDoc.load(URL);return xmlDoc;}else{return false;}}
function StringToXML(XML){if(window.ActiveXObject){var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(XML);return xmlDoc;}else if(window.XMLHttpRequest){var parser=new DOMParser();var xmlDoc=parser.parseFromString(XML,"text/xml");return xmlDoc;}else{return false;}}
function HTTPRequest(){this.POST=function(){if(window.XMLHttpRequest){HTTPRequest=new XMLHttpRequest();if(HTTPRequest.overrideMimeType){HTTPRequest.overrideMimeType('text/html');}}else if(window.ActiveXObject){try{HTTPRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{HTTPRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!HTTPRequest){if(typeof this.Error=="function"){this.Error('HTTP Request Error');}}
HTTPRequest.onreadystatechange=RequestParser;HTTPRequest.open('POST',this.URL,true);HTTPRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");HTTPRequest.setRequestHeader("Content-length",this.Parameters.length);HTTPRequest.setRequestHeader("Connection","close");HTTPRequest.send(this.Parameters);}
this.GET=function(){if(window.XMLHttpRequest){HTTPRequest=new XMLHttpRequest();if(HTTPRequest.overrideMimeType){HTTPRequest.overrideMimeType('text/html');}}else if(window.ActiveXObject){try{HTTPRequest=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{HTTPRequest=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!HTTPRequest){if(typeof this.Error=="function"){this.Error('HTTP Request Error');}}
HTTPRequest.onreadystatechange=RequestParser;HTTPRequest.open('GET',this.URL+'?'+this.Parameters,true);HTTPRequest.send(null);}
function RequestParser(){if(HTTPRequest.readyState==4){if(HTTPRequest.status==200){var Result=HTTPRequest.responseText;if(ObjectThis.PraseXML){if(typeof ObjectThis.Completed=="function"){ObjectThis.Completed(StringToXML(Result));}}else{if(typeof ObjectThis.Completed=="function"){ObjectThis.Completed(Result);}}}else{if(typeof ObjectThis.Error=="function"){ObjectThis.Error('HTTP Response Error');}}}}
var ObjectThis=this;var HTTPRequest=false;var URL='';var Parameters='';var PraseXML=false;}