function AjaxRequest(){var b=new Object();b.timeout=null;b.generateUniqueUrl=true;b.url=window.location.href;b.method="GET";b.async=true;b.username=null;b.password=null;b.parameters=new Object();b.requestIndex=AjaxRequest.numAjaxRequests++;b.responseReceived=false;b.groupName=null;b.queryString="";b.responseText=null;b.responseXML=null;b.status=null;b.statusText=null;b.aborted=false;b.xmlHttpRequest=null;b.onTimeout=null;b.onLoading=null;b.onLoaded=null;b.onInteractive=null;b.onComplete=null;b.onSuccess=null;b.onError=null;b.onGroupBegin=null;b.onGroupEnd=null;b.xmlHttpRequest=AjaxRequest.getXmlHttpRequest();if(b.xmlHttpRequest==null){return null}b.xmlHttpRequest.onreadystatechange=function(){if(b==null||b.xmlHttpRequest==null){return}if(b.xmlHttpRequest.readyState==1){b.onLoadingInternal(b)}if(b.xmlHttpRequest.readyState==2){b.onLoadedInternal(b)}if(b.xmlHttpRequest.readyState==3){b.onInteractiveInternal(b)}if(b.xmlHttpRequest.readyState==4){b.onCompleteInternal(b)}};b.onLoadingInternalHandled=false;b.onLoadedInternalHandled=false;b.onInteractiveInternalHandled=false;b.onCompleteInternalHandled=false;b.onLoadingInternal=function(){if(b.onLoadingInternalHandled){return}AjaxRequest.numActiveAjaxRequests++;if(AjaxRequest.numActiveAjaxRequests==1&&typeof(window['AjaxRequestBegin'])=="function"){AjaxRequestBegin()}if(b.groupName!=null){if(typeof(AjaxRequest.numActiveAjaxGroupRequests[b.groupName])=="undefined"){AjaxRequest.numActiveAjaxGroupRequests[b.groupName]=0}AjaxRequest.numActiveAjaxGroupRequests[b.groupName]++;if(AjaxRequest.numActiveAjaxGroupRequests[b.groupName]==1&&typeof(b.onGroupBegin)=="function"){b.onGroupBegin(b.groupName)}}if(typeof(b.onLoading)=="function"){b.onLoading(b)}b.onLoadingInternalHandled=true};b.onLoadedInternal=function(){if(b.onLoadedInternalHandled){return}if(typeof(b.onLoaded)=="function"){b.onLoaded(b)}b.onLoadedInternalHandled=true};b.onInteractiveInternal=function(){if(b.onInteractiveInternalHandled){return}if(typeof(b.onInteractive)=="function"){b.onInteractive(b)}b.onInteractiveInternalHandled=true};b.onCompleteInternal=function(){if(b.onCompleteInternalHandled||b.aborted){return}b.onCompleteInternalHandled=true;AjaxRequest.numActiveAjaxRequests--;if(AjaxRequest.numActiveAjaxRequests==0&&typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(b.groupName)}if(b.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[b.groupName]--;if(AjaxRequest.numActiveAjaxGroupRequests[b.groupName]==0&&typeof(b.onGroupEnd)=="function"){b.onGroupEnd(b.groupName)}}b.responseReceived=true;b.status=b.xmlHttpRequest.status;b.statusText=b.xmlHttpRequest.statusText;b.responseText=b.xmlHttpRequest.responseText;b.responseXML=b.xmlHttpRequest.responseXML;if(typeof(b.onComplete)=="function"){b.onComplete(b)}if(b.xmlHttpRequest.status==200&&typeof(b.onSuccess)=="function"){b.onSuccess(b)}else if(typeof(b.onError)=="function"){b.onError(b)}delete b.xmlHttpRequest['onreadystatechange'];b.xmlHttpRequest=null};b.onTimeoutInternal=function(){if(b!=null&&b.xmlHttpRequest!=null&&!b.onCompleteInternalHandled){b.aborted=true;b.xmlHttpRequest.abort();AjaxRequest.numActiveAjaxRequests--;if(AjaxRequest.numActiveAjaxRequests==0&&typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(b.groupName)}if(b.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[b.groupName]--;if(AjaxRequest.numActiveAjaxGroupRequests[b.groupName]==0&&typeof(b.onGroupEnd)=="function"){b.onGroupEnd(b.groupName)}}if(typeof(b.onTimeout)=="function"){b.onTimeout(b)}delete b.xmlHttpRequest['onreadystatechange'];b.xmlHttpRequest=null}};b.process=function(){if(b.xmlHttpRequest!=null){if(b.generateUniqueUrl&&b.method=="GET"){b.parameters["AjaxRequestUniqueId"]=new Date().getTime()+""+b.requestIndex}var a=null;for(var i in b.parameters){if(b.queryString.length>0){b.queryString+="&"}b.queryString+=encodeURIComponent(i)+"="+encodeURIComponent(b.parameters[i])}if(b.method=="GET"){if(b.queryString.length>0){b.url+=((b.url.indexOf("?")>-1)?"&":"?")+b.queryString}}b.xmlHttpRequest.open(b.method,b.url,b.async,b.username,b.password);if(b.method=="POST"){if(typeof(b.xmlHttpRequest.setRequestHeader)!="undefined"){b.xmlHttpRequest.setRequestHeader('Content-type','application/x-www-form-urlencoded')}a=b.queryString}if(b.timeout>0){setTimeout(b.onTimeoutInternal,b.timeout)}b.xmlHttpRequest.send(a)}};b.handleArguments=function(a){for(var i in a){if(typeof(b[i])=="undefined"){b.parameters[i]=a[i]}else{b[i]=a[i]}}};b.getAllResponseHeaders=function(){if(b.xmlHttpRequest!=null){if(b.responseReceived){return b.xmlHttpRequest.getAllResponseHeaders()}alert("Cannot getAllResponseHeaders because a response has not yet been received")}};b.getResponseHeader=function(a){if(b.xmlHttpRequest!=null){if(b.responseReceived){return b.xmlHttpRequest.getResponseHeader(a)}alert("Cannot getResponseHeader because a response has not yet been received")}};return b}AjaxRequest.getXmlHttpRequest=function(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else if(window.ActiveXObject){/*@cc_on@*//*@if(@_jscript_version>=5)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(E){return null}}@end@*/}else{return null}};AjaxRequest.isActive=function(){return(AjaxRequest.numActiveAjaxRequests>0)};AjaxRequest.get=function(a){AjaxRequest.doRequest("GET",a)};AjaxRequest.post=function(a){AjaxRequest.doRequest("POST",a)};AjaxRequest.doRequest=function(a,b){if(typeof(b)!="undefined"&&b!=null){var c=new AjaxRequest();c.method=a;c.handleArguments(b);c.process()}};AjaxRequest.submit=function(a,b){var c=new AjaxRequest();if(c==null){return false}var d=AjaxRequest.serializeForm(a);c.method=a.method.toUpperCase();c.url=a.action;c.handleArguments(b);c.queryString=d;c.process();return true};AjaxRequest.serializeForm=function(c){var d=c.elements;var e=d.length;var f="";this.addField=function(a,b){if(f.length>0){f+="&"}f+=encodeURIComponent(a)+"="+encodeURIComponent(b)};for(var i=0;i<e;i++){var g=d[i];if(!g.disabled){switch(g.type){case'text':case'password':case'hidden':case'textarea':this.addField(g.name,g.value);break;case'select-one':if(g.selectedIndex>=0){this.addField(g.name,g.options[g.selectedIndex].value)}break;case'select-multiple':for(var j=0;j<g.options.length;j++){if(g.options[j].selected){this.addField(g.name,g.options[j].value)}}break;case'checkbox':case'radio':if(g.checked){this.addField(g.name,g.value)}break}}}return f};AjaxRequest.numActiveAjaxRequests=0;AjaxRequest.numActiveAjaxGroupRequests=new Object();AjaxRequest.numAjaxRequests=0;