function WebForm_DoCallback_Fixed(eventTarget,eventArgument,eventCallback,context,errorCallback,useAsync)
{__theFormPostData="";__theFormPostCollection=new Array();WebForm_InitCallback();var postData=__theFormPostData+"__CALLBACKID="+WebForm_EncodeCallback(eventTarget)+"&__CALLBACKPARAM="+WebForm_EncodeCallback(eventArgument);if(theForm["__EVENTVALIDATION"])
{postData+="&__EVENTVALIDATION="+WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);}
var xmlRequest,e;try
{xmlRequest=new XMLHttpRequest();}
catch(e)
{var aVersions=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(var i=0;i<aVersions.length;i++)
{try
{xmlRequest=new ActiveXObject(aVersions[i]);break;}
catch(e){}}}
var setRequestHeaderMethodExists=true;try{setRequestHeaderMethodExists=(xmlRequest&&xmlRequest.setRequestHeader);}
catch(e){}
var callback=new Object();callback.eventCallback=eventCallback;callback.context=context;callback.errorCallback=errorCallback;callback.async=useAsync;var callbackIndex=WebForm_FillFirstAvailableSlot(__pendingCallbacks,callback);if(!useAsync)
{if(__synchronousCallBackIndex!=-1)
{__pendingCallbacks[__synchronousCallBackIndex]=null;}
__synchronousCallBackIndex=callbackIndex;}
if(setRequestHeaderMethodExists)
{xmlRequest.onreadystatechange=WebForm_CallbackComplete;callback.xmlRequest=xmlRequest;xmlRequest.open("POST",theForm.action,true);xmlRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlRequest.send(postData);return;}
callback.xmlRequest=new Object();var callbackFrameID="__CALLBACKFRAME"+callbackIndex;var xmlRequestFrame=document.frames[callbackFrameID];if(!xmlRequestFrame)
{xmlRequestFrame=document.createElement("IFRAME");xmlRequestFrame.width="1";xmlRequestFrame.height="1";xmlRequestFrame.frameBorder="0";xmlRequestFrame.id=callbackFrameID;xmlRequestFrame.name=callbackFrameID;xmlRequestFrame.style.position="absolute";xmlRequestFrame.style.top="-100px"
xmlRequestFrame.style.left="-100px";xmlRequestFrame.src="~/html/common/html/blank.html";try
{if(callBackFrameUrl)
{xmlRequestFrame.src=callBackFrameUrl;}}
catch(e){}
document.body.appendChild(xmlRequestFrame);}
var interval=window.setInterval(function()
{xmlRequestFrame=document.frames[callbackFrameID];if(xmlRequestFrame&&xmlRequestFrame.document)
{window.clearInterval(interval);xmlRequestFrame.document.write("");xmlRequestFrame.document.close();xmlRequestFrame.document.write('<html><body><form method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT" value="t"></form></body></html>');xmlRequestFrame.document.close();xmlRequestFrame.document.forms[0].action=theForm.action;var count=__theFormPostCollection.length;var element;for(var i=0;i<count;i++)
{element=__theFormPostCollection[i];if(element)
{var fieldElement=xmlRequestFrame.document.createElement("INPUT");fieldElement.type="hidden";fieldElement.name=element.name;fieldElement.value=element.value;xmlRequestFrame.document.forms[0].appendChild(fieldElement);}}
var callbackIdFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackIdFieldElement.type="hidden";callbackIdFieldElement.name="__CALLBACKID";callbackIdFieldElement.value=eventTarget;xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);var callbackParamFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackParamFieldElement.type="hidden";callbackParamFieldElement.name="__CALLBACKPARAM";callbackParamFieldElement.value=eventArgument;xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);if(theForm["__EVENTVALIDATION"])
{var callbackValidationFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackValidationFieldElement.type="hidden";callbackValidationFieldElement.name="__EVENTVALIDATION";callbackValidationFieldElement.value=theForm["__EVENTVALIDATION"].value;xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);}
var callbackIndexFieldElement=xmlRequestFrame.document.createElement("INPUT");callbackIndexFieldElement.type="hidden";callbackIndexFieldElement.name="__CALLBACKINDEX";callbackIndexFieldElement.value=callbackIndex;xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);xmlRequestFrame.document.forms[0].submit();}},10);}
function WebForm_CallbackComplete_Fixed()
{for(var i=0;i<__pendingCallbacks.length;i++)
{callbackObject=__pendingCallbacks[i];if(callbackObject&&callbackObject.xmlRequest&&(callbackObject.xmlRequest.readyState==4))
{if(!__pendingCallbacks[i].async)
{__synchronousCallBackIndex=-1;}
__pendingCallbacks[i]=null;var callbackFrameID="__CALLBACKFRAME"+i;var xmlRequestFrame=document.getElementById(callbackFrameID);if(xmlRequestFrame)
{xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);}
WebForm_ExecuteCallback(callbackObject);}}}
function WebForm_InitCallback_Fixed(){var count=theForm.elements.length;var element;for(var i=0;i<count;i++){element=theForm.elements[i];var tagName=element.tagName.toLowerCase();if(tagName=="input"){var type=element.type;if((type=="text"||type=="hidden"||type=="password"||((type=="checkbox"||type=="radio")&&element.checked))&&(element.id!="__EVENTVALIDATION")){WebForm_InitCallbackAddField(element.name,element.value);}}
else if(tagName=="select"){var selectCount=element.options.length;for(var j=0;j<selectCount;j++){var selectChild=element.options[j];if(selectChild.selected==true){WebForm_InitCallbackAddField(element.name,selectChild.value);}}}
else if(tagName=="textarea"){WebForm_InitCallbackAddField(element.name,element.value);}}}
function WebForm_ExecuteCallback_Hook(callbackObject){var response=callbackObject.xmlRequest.responseText;var separatorIndex=response.indexOf("|");if(separatorIndex!=-1)
{var itemLength=parseInt(response.substring(0,separatorIndex));if(!isNaN(itemLength))
{var redirectCode='pageRedirect||';var instructionIndex=separatorIndex+1;var contentIndex=instructionIndex+redirectCode.length;if(response.substring(instructionIndex,contentIndex)==redirectCode)
{window.location.href=response.substring(contentIndex,contentIndex+itemLength);return;}}}
WebForm_ExecuteCallback_Original.apply(this,arguments);}
if(typeof(WebForm_DoCallback)=="function")
{WebForm_DoCallback=WebForm_DoCallback_Fixed;}
if(typeof(WebForm_CallbackComplete)=="function")
{WebForm_CallbackComplete=WebForm_CallbackComplete_Fixed;}
if(typeof(WebForm_InitCallback)=="function")
{WebForm_InitCallback=WebForm_InitCallback_Fixed;}
if(typeof(WebForm_ExecuteCallback)=="function")
{WebForm_ExecuteCallback_Original=WebForm_ExecuteCallback;WebForm_ExecuteCallback=WebForm_ExecuteCallback_Hook;}
function PatchAjaxNet()
{if(typeof(Sys)=="object"&&typeof(Sys.Net)=="object"&&typeof(Sys.Net.XMLHttpExecutor)=="function")
{var prototypes=Sys.Net.XMLHttpExecutor.prototype;Sys.Browser.WebKit={};if(navigator.userAgent.indexOf('WebKit/')>-1){Sys.Browser.agent=Sys.Browser.WebKit;Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name='WebKit';}
Sys.Net.XMLHttpExecutor=function(){if(arguments.length!==0)throw Error.parameterCount();Sys.Net.XMLHttpExecutor.initializeBase(this);var _this=this;this._xmlHttpRequest=null;this._webRequest=null;this._responseAvailable=false;this._timedOut=false;this._timer=null;this._aborted=false;this._started=false;this._onReadyStateChange=function(){if(_this._xmlHttpRequest.readyState===4&&_this._xmlHttpRequest.status!==0){_this._clearTimer();_this._responseAvailable=true;_this._webRequest.completed(Sys.EventArgs.Empty);if(_this._xmlHttpRequest!=null){_this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;_this._xmlHttpRequest=null;}}}
this._clearTimer=function this$_clearTimer(){if(_this._timer!=null){window.clearTimeout(_this._timer);_this._timer=null;}}
this._onTimeout=function this$_onTimeout(){if(!_this._responseAvailable){_this._clearTimer();_this._timedOut=true;_this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;_this._xmlHttpRequest.abort();_this._webRequest.completed(Sys.EventArgs.Empty);_this._xmlHttpRequest=null;}}}
Sys.Net.XMLHttpExecutor.prototype=prototypes;if(typeof(__registeredTypes)=="object")
__registeredTypes["Sys.Net.XMLHttpExecutor"]=null;Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);}}