function getXmlHttpPrefix(){if(getXmlHttpPrefix.prefix){return getXmlHttpPrefix.prefix}var c=["MSXML2","Microsoft","MSXML","MSXML3"];var d;for(var b=0;b<c.length;b++){try{d=new ActiveXObject(c[b]+".XmlHttp");return getXmlHttpPrefix.prefix=c[b]}catch(a){}}throw new Error("Could not find an installed XML parser")}function XmlHttpParameter(a,b){this.name=a;this.value=b}function XmlHttp(b){this.url=b;this.trace=false;this.responseText=null;this.responseDocument=null;this.critical=true;this.onInit=null;this.onDone=null;this.onError=null;this.addParam=function(m,n){if(k==null){k=new Array()}k[k.length]=new XmlHttpParameter(m,n)};this.addParams=function(n){if(n!=null){for(var m=0;m<n.length;++m){k.push(n[m])}}};this.clearParams=function(){k=null};this.post=function(){var m=d();this.send(m)};this.send=function(o){this.responseDocument=null;var n=typeof(this.onDone)=="function";var m=typeof(o)=="undefined";if(h){throw"An operation is already in progress"}h=true;var p=this.url;if(m){var q=d();if(q.length>0){q="?"+q}p+=q}try{c.open(m?"GET":"POST",p,n);c.onreadystatechange=g;if(!m){c.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}c.send(m?null:o);if(n){return null}else{f();return this.responseText}}finally{if(!n){h=false}}};var l=this;var c=null;var h=false;var e=null;var k=null;var j=null;try{if(window.XMLHttpRequest){c=new XMLHttpRequest();if(c.readyState==null){c.readyState=1;c.addEventListener("load",function(){c.readyState=4;if(typeof c.onreadystatechange=="function"){c.onreadystatechange()}},false)}}else{if(window.ActiveXObject){c=new ActiveXObject(getXmlHttpPrefix()+".XmlHttp")}}}catch(i){}if(c==null){throw new Error("Your browser does not support XmlHttp objects")}var g=function(){switch(c.readyState){case 1:if(typeof(l.onInit)=="function"){try{l.onInit()}catch(m){a("Error handling onInit(): "+m)}}break;case 4:a("Request done");h=false;if(typeof(l.onDone)=="function"){f();l.onDone(l.responseText)}break}};var f=function(){l.responseDocument=c.responseXML;l.responseText=c.responseText;if(c.status!=200){if(l.critical){if(confirm("Request to server failed.\nURL: "+l.url+"\nStatus: "+c.status+"\n\nShow details?")){var m=window.open("about:blank","debugwin");try{m.focus()}catch(n){}m.document.write(l.responseText)}}l.responseText=null;l.responseDocument=null}};var d=function(){var n="";if(k!=null){for(var m=0;m<k.length;m++){if(m>0){n+="&"}n+=k[m].name+"="+k[m].value}}return n};var a=function(m){if(l.trace){if(e==null){e=window.open("","SvrReqTrc")}try{e.document.write(new Date().toString()+" "+m+"<br>")}catch(n){}}}}function getOuterXml(a){try{if(typeof a.xml!="undefined"){return a.xml}if(window.XMLSerializer){return(new XMLSerializer()).serializeToString(a)}else{if(window.ActiveXObject){return a.xml}}}catch(b){}throw"This browser does not support XML serialization."}function getInnerXml(c){if(c==null){return null}var a="";for(var b=0;b<c.childNodes.length;b++){a+=getOuterXml(c.childNodes[b])}return a}function xmlSelectSingleNode(c,g,b,d){var f=typeof(b)!="undefined";var e=c.getElementsByTagName(g);for(var a=0;a<e.length;a++){if(!f||(e[a].getAttribute(b)==d)){return e[a]}}return null};
