(function(){var b="ExtendedThreading";function a(){var c=false,a=null,b=true,d=Sys.version;if(!d&&!Sys._versionChecked){Sys._versionChecked=b;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the AjaxScriptManager in System.Web.Ajax.dll, or use the ToolkitScriptManager in AjaxControlToolkit.dll.");}Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.DeferredOperation=function(g,f,e){var d=this;d._delay=g;d._context=f;d._callback=e;d._completeCallback=a;d._errorCallback=a;d._timer=a;d._callArgs=a;d._isComplete=c;d._completedSynchronously=c;d._asyncResult=a;d._exception=a;d._throwExceptions=b;d._oncomplete$delegate=Function.createDelegate(d,d._oncomplete);d.post=Function.createDelegate(d,d.post)};Sys.Extended.UI.DeferredOperation.prototype={get_isPending:function(){return this._timer!=a},get_isComplete:function(){return this._isComplete},get_completedSynchronously:function(){return this._completedSynchronously},get_exception:function(){return this._exception},get_throwExceptions:function(){return this._throwExceptions},set_throwExceptions:function(a){this._throwExceptions=a},get_delay:function(){return this._delay},set_delay:function(a){this._delay=a},post:function(){for(var c=[],b=0;b<arguments.length;b++)c[b]=arguments[b];this.beginPost(c,a,a)},beginPost:function(e,c,d){var a=this;a.cancel();a._callArgs=Array.clone(e||[]);a._completeCallback=c;a._errorCallback=d;if(a._delay==-1)try{a._oncomplete()}finally{a._completedSynchronously=b}else a._timer=setTimeout(a._oncomplete$delegate,a._delay)},cancel:function(){var b=this;if(b._timer){clearTimeout(b._timer);b._timer=a}b._callArgs=a;b._isComplete=c;b._asyncResult=a;b._completeCallback=a;b._errorCallback=a;b._exception=a;b._completedSynchronously=c},call:function(){var c=this;for(var e=[],d=0;d<arguments.length;d++)e[d]=arguments[d];c.cancel();c._callArgs=e;c._completeCallback=a;c._errorCallback=a;try{c._oncomplete()}finally{c._completedSynchronously=b}if(c._exception)throw c._exception;return c._asyncResult},complete:function(){var a=this;if(a._timer){try{a._oncomplete()}finally{a._completedSynchronously=b}return a._asyncResult}else if(a._isComplete)return a._asyncResult},_oncomplete:function(){var a=this,f=a._callArgs,d=a._completeCallback,e=a._errorCallback;a.cancel();try{if(f)a._asyncResult=a._callback.apply(a._context,f);else a._asyncResult=a._callback.call(a._context);a._isComplete=b;a._completedSynchronously=c;d&&d(a)}catch(g){a._isComplete=b;a._completedSynchronously=c;a._exception=g;if(e)if(e(a))return;if(a._throwExceptions)throw g;}}};Sys.Extended.UI.DeferredOperation.registerClass("Sys.Extended.UI.DeferredOperation")}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["Core"],a);else a()})();