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

