summaryrefslogtreecommitdiffstats
path: root/gimsis/Datoteke_za_Izbira učbenikov/ScriptResource.js
blob: 2ba3978f45a3df65891e892d1925d9169aa00352 (plain) (blame)
1
2
3
// (c) 2010 CodePlex Foundation
(function(){function a(){var s="aria-hidden",k="status",j="submit",h="=",g="undefined",d=-1,f="",u="function",r="pageLoading",q="pageLoaded",p="initializeRequest",o="endRequest",n="beginRequest",m="script",l="error",t="readystatechange",i="load",a=null,c=true,b=false;Type._registerScript("MicrosoftAjaxWebForms.js",["MicrosoftAjaxCore.js","MicrosoftAjaxSerialization.js","MicrosoftAjaxNetwork.js","MicrosoftAjaxComponentModel.js"]);var e,v;Type.registerNamespace("Sys.WebForms");e=Sys.WebForms.BeginRequestEventArgs=function(d,c,b){var a=this;Sys.WebForms.BeginRequestEventArgs.initializeBase(a);a._request=d;a._postBackElement=c;a._updatePanelsToUpdate=b};e.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]}};e.registerClass("Sys.WebForms.BeginRequestEventArgs",Sys.EventArgs);e=Sys.WebForms.EndRequestEventArgs=function(e,c,d){var a=this;Sys.WebForms.EndRequestEventArgs.initializeBase(a);a._errorHandled=b;a._error=e;a._dataItems=c||{};a._response=d};e.prototype={get_dataItems:function(){return this._dataItems},get_error:function(){return this._error},get_errorHandled:function(){return this._errorHandled},set_errorHandled:function(a){this._errorHandled=a},get_response:function(){return this._response}};e.registerClass("Sys.WebForms.EndRequestEventArgs",Sys.EventArgs);e=Sys.WebForms.InitializeRequestEventArgs=function(d,c,b){var a=this;Sys.WebForms.InitializeRequestEventArgs.initializeBase(a);a._request=d;a._postBackElement=c;a._updatePanelsToUpdate=b};e.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request},get_updatePanelsToUpdate:function(){return this._updatePanelsToUpdate?Array.clone(this._updatePanelsToUpdate):[]},set_updatePanelsToUpdate:function(a){this._updated=c;this._updatePanelsToUpdate=a}};e.registerClass("Sys.WebForms.InitializeRequestEventArgs",Sys.CancelEventArgs);e=Sys.WebForms.PageLoadedEventArgs=function(c,b,d){var a=this;Sys.WebForms.PageLoadedEventArgs.initializeBase(a);a._panelsUpdated=c;a._panelsCreated=b;a._dataItems=d||{}};e.prototype={get_dataItems:function(){return this._dataItems},get_panelsCreated:function(){return this._panelsCreated},get_panelsUpdated:function(){return this._panelsUpdated}};e.registerClass("Sys.WebForms.PageLoadedEventArgs",Sys.EventArgs);e=Sys.WebForms.PageLoadingEventArgs=function(c,b,d){var a=this;Sys.WebForms.PageLoadingEventArgs.initializeBase(a);a._panelsUpdating=c;a._panelsDeleting=b;a._dataItems=d||{}};e.prototype={get_dataItems:function(){return this._dataItems},get_panelsDeleting:function(){return this._panelsDeleting},get_panelsUpdating:function(){return this._panelsUpdating}};e.registerClass("Sys.WebForms.PageLoadingEventArgs",Sys.EventArgs);e=Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a};e.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){var b=this;if(b._disposed)return;b._disposed=c;b._removeScriptElementHandlers();Sys._ScriptLoaderTask._clearScript(b._scriptElement);b._scriptElement=a},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){var a=this;a._scriptLoadDelegate=Function.createDelegate(a,a._scriptLoadHandler);if(document.addEventListener){if(!a._scriptElement.readyState)a._scriptElement.readyState="loaded";$addHandler(a._scriptElement,i,a._scriptLoadDelegate)}else $addHandler(a._scriptElement,t,a._scriptLoadDelegate);if(a._scriptElement.addEventListener){a._scriptErrorDelegate=Function.createDelegate(a,a._scriptErrorHandler);a._scriptElement.addEventListener(l,a._scriptErrorDelegate,b)}},_removeScriptElementHandlers:function(){var c=this;if(c._scriptLoadDelegate){var d=c.get_scriptElement();if(document.addEventListener)$removeHandler(d,i,c._scriptLoadDelegate);else $removeHandler(d,t,c._scriptLoadDelegate);if(c._scriptErrorDelegate){c._scriptElement.removeEventListener(l,c._scriptErrorDelegate,b);c._scriptErrorDelegate=a}c._scriptLoadDelegate=a}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),b)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;this._completedCallback(a,c)}};e.registerClass("Sys._ScriptLoaderTask",a,Sys.IDisposable);e._clearScript=function(a){!Sys.Debug.isDebug&&a.parentNode.removeChild(a)};e=Sys._ScriptLoader=function(){var b=this;b._scriptsToLoad=a;b._sessions=[];b._scriptLoadedDelegate=Function.createDelegate(b,b._scriptLoadedHandler)};e.prototype={dispose:function(){var c=this;c._stopSession();c._loading=b;if(c._events)delete c._events;c._sessions=a;c._currentSession=a;c._scriptLoadedDelegate=a},loadScripts:function(f,d,e,c){var b=this,g={allScriptsLoadedCallback:d,scriptLoadFailedCallback:e,scriptLoadTimeoutCallback:c,scriptsToLoad:b._scriptsToLoad,scriptTimeout:f};b._scriptsToLoad=a;b._sessions.push(g);!b._loading&&b._nextSession()},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(b){var a=document.createElement(m);a.type="text/javascript";for(var c in b)a[c]=b[c];return a},_loadScriptsInternal:function(){var a=this,c=a._currentSession;if(c.scriptsToLoad&&c.scriptsToLoad.length>0){var d=Array.dequeue(c.scriptsToLoad),b=a._createScriptElement(d);if(b.text&&Sys.Browser.agent===Sys.Browser.Safari){b.innerHTML=b.text;delete b.text}if(typeof d.src==="string"){a._currentTask=new Sys._ScriptLoaderTask(b,a._scriptLoadedDelegate);a._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(b);Sys._ScriptLoaderTask._clearScript(b);a._loadScriptsInternal()}}else{a._stopSession();var e=c.allScriptsLoadedCallback;e&&e(a);a._nextSession()}},_nextSession:function(){var d=this;if(d._sessions.length===0){d._loading=b;d._currentSession=a;return}d._loading=c;var e=Array.dequeue(d._sessions);d._currentSession=e;if(e.scriptTimeout>0)d._timeoutCookie=window.setTimeout(Function.createDelegate(d,d._scriptLoadTimeoutHandler),e.scriptTimeout*1e3);d._loadScriptsInternal()},_raiseError:function(){var a=this,d=a._currentSession.scriptLoadFailedCallback,c=a._currentTask.get_scriptElement();a._stopSession();if(d){d(a,c);a._nextSession()}else{a._loading=b;throw Sys._ScriptLoader._errorScriptLoadFailed(c.src);}},_scriptLoadedHandler:function(c,d){var b=this;if(d){Array.add(Sys._ScriptLoader._getLoadedScripts(),c.src);b._currentTask.dispose();b._currentTask=a;b._loadScriptsInternal()}else b._raiseError()},_scriptLoadTimeoutHandler:function(){var a=this,b=a._currentSession.scriptLoadTimeoutCallback;a._stopSession();b&&b(a);a._nextSession()},_stopSession:function(){var b=this;if(b._timeoutCookie){window.clearTimeout(b._timeoutCookie);b._timeoutCookie=a}if(b._currentTask){b._currentTask.dispose();b._currentTask=a}}};e.registerClass("Sys._ScriptLoader",a,Sys.IDisposable);e.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};e.isScriptLoaded=function(b){var a=document.createElement(m);a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};e.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts)for(var c=Sys._ScriptLoader._referencedScripts=[],d=document.getElementsByTagName(m),b=d.length-1;b>=0;b--){var e=d[b],a=e.src;if(a.length)!Array.contains(c,a)&&Array.add(c,a)}};e._errorScriptLoadFailed=function(b){var a;a=Sys.Res.scriptLoadFailed;var d="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(d,{name:"Sys.ScriptLoadFailedException",scriptUrl:b});c.popStackFrame();return c};e._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};e=Sys.WebForms.PageRequestManager=function(){var c=this;c._form=a;c._activeDefaultButton=a;c._activeDefaultButtonClicked=b;c._updatePanelIDs=a;c._updatePanelClientIDs=a;c._updatePanelHasChildrenAsTriggers=a;c._asyncPostBackControlIDs=a;c._asyncPostBackControlClientIDs=a;c._postBackControlIDs=a;c._postBackControlClientIDs=a;c._scriptManagerID=a;c._pageLoadedHandler=a;c._additionalInput=a;c._onsubmit=a;c._onSubmitStatements=[];c._originalDoPostBack=a;c._originalDoPostBackWithOptions=a;c._originalFireDefaultButton=a;c._originalDoCallback=a;c._isCrossPost=b;c._postBackSettings=a;c._request=a;c._onFormSubmitHandler=a;c._onFormElementClickHandler=a;c._onWindowUnloadHandler=a;c._asyncPostBackTimeout=a;c._controlIDToFocus=a;c._scrollPosition=a;c._processingRequest=b;c._scriptDisposes={};c._transientFields=["__VIEWSTATEENCRYPTED","__VIEWSTATEFIELDCOUNT"]};e.prototype={get_isInAsyncPostBack:function(){return this._request!==a},add_beginRequest:function(a){Sys.Observer.addEventHandler(this,n,a)},remove_beginRequest:function(a){Sys.Observer.removeEventHandler(this,n,a)},add_endRequest:function(a){Sys.Observer.addEventHandler(this,o,a)},remove_endRequest:function(a){Sys.Observer.removeEventHandler(this,o,a)},add_initializeRequest:function(a){Sys.Observer.addEventHandler(this,p,a)},remove_initializeRequest:function(a){Sys.Observer.removeEventHandler(this,p,a)},add_pageLoaded:function(a){Sys.Observer.addEventHandler(this,q,a)},remove_pageLoaded:function(a){Sys.Observer.removeEventHandler(this,q,a)},add_pageLoading:function(a){Sys.Observer.addEventHandler(this,r,a)},remove_pageLoading:function(a){Sys.Observer.removeEventHandler(this,r,a)},abortPostBack:function(){var b=this;if(!b._processingRequest&&b._request){b._request.get_executor().abort();b._request=a}},beginAsyncPostBack:function(h,e,k,i,j){var d=this;if(i&&typeof Page_ClientValidate===u&&!Page_ClientValidate(j||a))return;d._postBackSettings=d._createPostBackSettings(c,h,e);var g=d._form;g.__EVENTTARGET.value=e||f;g.__EVENTARGUMENT.value=k||f;d._isCrossPost=b;d._additionalInput=a;d._onFormSubmit()},_cancelPendingCallbacks:function(){for(var b=0,g=window.__pendingCallbacks.length;b<g;b++){var e=window.__pendingCallbacks[b];if(e){if(!e.async)window.__synchronousCallBackIndex=d;window.__pendingCallbacks[b]=a;var f="__CALLBACKFRAME"+b,c=document.getElementById(f);c&&c.parentNode.removeChild(c)}}},_commitControls:function(b,d){var c=this;if(b){c._updatePanelIDs=b.updatePanelIDs;c._updatePanelClientIDs=b.updatePanelClientIDs;c._updatePanelHasChildrenAsTriggers=b.updatePanelHasChildrenAsTriggers;c._asyncPostBackControlIDs=b.asyncPostBackControlIDs;c._asyncPostBackControlClientIDs=b.asyncPostBackControlClientIDs;c._postBackControlIDs=b.postBackControlIDs;c._postBackControlClientIDs=b.postBackControlClientIDs}if(typeof d!==g&&d!==a)c._asyncPostBackTimeout=d*1e3},_createHiddenField:function(d,e){var b,a=document.getElementById(d);if(a)if(!a._isContained)a.parentNode.removeChild(a);else b=a.parentNode;if(!b){b=document.createElement("span");b.style.cssText="display:none !important";this._form.appendChild(b)}b.innerHTML="<input type='hidden' />";a=b.childNodes[0];a._isContained=c;a.id=a.name=d;a.value=e},_createPageRequestManagerTimeoutError:function(){var b="Sys.WebForms.PageRequestManagerTimeoutException: "+Sys.WebForms.Res.PRM_TimeoutError,a=Error.create(b,{name:"Sys.WebForms.PageRequestManagerTimeoutException"});a.popStackFrame();return a},_createPageRequestManagerServerError:function(a,d){var c="Sys.WebForms.PageRequestManagerServerErrorException: "+(d||String.format(Sys.WebForms.Res.PRM_ServerError,a)),b=Error.create(c,{name:"Sys.WebForms.PageRequestManagerServerErrorException",httpStatusCode:a});b.popStackFrame();return b},_createPageRequestManagerParserError:function(b){var c="Sys.WebForms.PageRequestManagerParserErrorException: "+String.format(Sys.WebForms.Res.PRM_ParserError,b),a=Error.create(c,{name:"Sys.WebForms.PageRequestManagerParserErrorException"});a.popStackFrame();return a},_createPanelID:function(e,b){var c=b.asyncTarget,a=this._ensureUniqueIds(e||b.panelsToUpdate),d=a instanceof Array?a.join(","):a||this._scriptManagerID;if(c)d+="|"+c;return encodeURIComponent(this._scriptManagerID)+h+encodeURIComponent(d)+"&"},_createPostBackSettings:function(d,a,c,b){return{async:d,asyncTarget:c,panelsToUpdate:a,sourceElement:b}},_convertToClientIDs:function(a,g,e,d){if(a)for(var b=0,i=a.length;b<i;b+=d?2:1){var c=a[b],h=(d?a[b+1]:f)||this._uniqueIDToClientID(c);Array.add(g,c);Array.add(e,h)}},dispose:function(){var b=this;Sys.Observer.clearEventHandlers(b);if(b._form){Sys.UI.DomEvent.removeHandler(b._form,j,b._onFormSubmitHandler);Sys.UI.DomEvent.removeHandler(b._form,"click",b._onFormElementClickHandler);Sys.UI.DomEvent.removeHandler(window,"unload",b._onWindowUnloadHandler);Sys.UI.DomEvent.removeHandler(window,i,b._pageLoadedHandler)}if(b._originalDoPostBack){window.__doPostBack=b._originalDoPostBack;b._originalDoPostBack=a}if(b._originalDoPostBackWithOptions){window.WebForm_DoPostBackWithOptions=b._originalDoPostBackWithOptions;b._originalDoPostBackWithOptions=a}if(b._originalFireDefaultButton){window.WebForm_FireDefaultButton=b._originalFireDefaultButton;b._originalFireDefaultButton=a}if(b._originalDoCallback){window.WebForm_DoCallback=b._originalDoCallback;b._originalDoCallback=a}b._form=a;b._updatePanelIDs=a;b._updatePanelClientIDs=a;b._asyncPostBackControlIDs=a;b._asyncPostBackControlClientIDs=a;b._postBackControlIDs=a;b._postBackControlClientIDs=a;b._asyncPostBackTimeout=a;b._scrollPosition=a},_doCallback:function(d,b,c,f,a,e){!this.get_isInAsyncPostBack()&&this._originalDoCallback(d,b,c,f,a,e)},_doPostBack:function(e,l){var d=this;d._additionalInput=a;var j=d._form;if(e===a||typeof e===g||d._isCrossPost){d._postBackSettings=d._createPostBackSettings(b);d._isCrossPost=b}else{var f=d._masterPageUniqueID,k=d._uniqueIDToClientID(e),i=document.getElementById(k);if(!i&&f)if(k.indexOf(f+"$")===0)i=document.getElementById(k.substr(f.length+1));if(!i)if(Array.contains(d._asyncPostBackControlIDs,e))d._postBackSettings=d._createPostBackSettings(c,a,e);else if(Array.contains(d._postBackControlIDs,e))d._postBackSettings=d._createPostBackSettings(b);else{var h=d._findNearestElement(e);if(h)d._postBackSettings=d._getPostBackSettings(h,e);else{if(f){f+="$";if(e.indexOf(f)===0)h=d._findNearestElement(e.substr(f.length))}if(h)d._postBackSettings=d._getPostBackSettings(h,e);else d._postBackSettings=d._createPostBackSettings(b)}}else d._postBackSettings=d._getPostBackSettings(i,e)}if(!d._postBackSettings.async){j.onsubmit=d._onsubmit;d._originalDoPostBack(e,l);j.onsubmit=a;return}j.__EVENTTARGET.value=e;j.__EVENTARGUMENT.value=l;d._onFormSubmit()},_doPostBackWithOptions:function(a){this._isCrossPost=a&&a.actionUrl;this._originalDoPostBackWithOptions(a)},_elementContains:function(d,a){while(a){if(a===d)return c;a=a.parentNode}return b},_endPostBack:function(d,f,g){var c=this;if(c._request===f.get_webRequest()){c._processingRequest=b;c._additionalInput=a;c._request=a}var e=new Sys.WebForms.EndRequestEventArgs(d,g?g.dataItems:{},f);Sys.Observer.raiseEvent(c,o,e);if(d&&!e.get_errorHandled())throw d;},_ensureUniqueIds:function(a){if(!a)return a;a=a instanceof Array?a:[a];for(var c=[],b=0,g=a.length;b<g;b++){var f=a[b],e=Array.indexOf(this._updatePanelClientIDs,f);c.push(e>d?this._updatePanelIDs[e]:f)}return c},_findNearestElement:function(b){while(b.length>0){var f=this._uniqueIDToClientID(b),e=document.getElementById(f);if(e)return e;var c=b.lastIndexOf("$");if(c===d)return a;b=b.substring(0,c)}return a},_findText:function(b,a){var c=Math.max(0,a-20),d=Math.min(b.length,a+20);return b.substring(c,d)},_fireDefaultButton:function(d,h){if(d.keyCode===13){var f=d.srcElement||d.target;if(!f||f.tagName.toLowerCase()!=="textarea"){var e=document.getElementById(h);if(e&&typeof e.click!==g){this._activeDefaultButton=e;this._activeDefaultButtonClicked=b;try{e.click()}finally{this._activeDefaultButton=a}d.cancelBubble=c;typeof d.stopPropagation===u&&d.stopPropagation();return b}}}return c},_getPageLoadedEventArgs:function(r,g){var q=[],p=[],o=g?g.version4:b,h=g?g.updatePanelData:a,i,k,l,e;if(!h){i=this._updatePanelIDs;k=this._updatePanelClientIDs;l=a;e=a}else{i=h.updatePanelIDs;k=h.updatePanelClientIDs;l=h.childUpdatePanelIDs;e=h.panelsToRefreshIDs}var c,j,n,m;if(e)for(c=0,j=e.length;c<j;c+=o?2:1){n=e[c];m=(o?e[c+1]:f)||this._uniqueIDToClientID(n);Array.add(q,document.getElementById(m))}for(c=0,j=i.length;c<j;c++)(r||Array.indexOf(l,i[c])!==d)&&Array.add(p,document.getElementById(k[c]));return new Sys.WebForms.PageLoadedEventArgs(q,p,g?g.dataItems:{})},_getPageLoadingEventArgs:function(h){var l=[],k=[],c=h.updatePanelData,m=c.oldUpdatePanelIDs,n=c.oldUpdatePanelClientIDs,p=c.updatePanelIDs,o=c.childUpdatePanelIDs,e=c.panelsToRefreshIDs,a,g,b,i,j=h.version4;for(a=0,g=e.length;a<g;a+=j?2:1){b=e[a];i=(j?e[a+1]:f)||this._uniqueIDToClientID(b);Array.add(l,document.getElementById(i))}for(a=0,g=m.length;a<g;a++){b=m[a];Array.indexOf(e,b)===d&&(Array.indexOf(p,b)===d||Array.indexOf(o,b)>d)&&Array.add(k,document.getElementById(n[a]))}return new Sys.WebForms.PageLoadingEventArgs(l,k,h.dataItems)},_getPostBackSettings:function(f,h){var e=this,i=f,g=a;while(f){if(f.id){if(!g&&Array.contains(e._asyncPostBackControlClientIDs,f.id))g=e._createPostBackSettings(c,a,h,i);else if(!g&&Array.contains(e._postBackControlClientIDs,f.id))return e._createPostBackSettings(b);else{var j=Array.indexOf(e._updatePanelClientIDs,f.id);if(j!==d)return e._updatePanelHasChildrenAsTriggers[j]?e._createPostBackSettings(c,[e._updatePanelIDs[j]],h,i):e._createPostBackSettings(c,a,h,i)}if(!g&&e._matchesParentIDInList(f.id,e._asyncPostBackControlClientIDs))g=e._createPostBackSettings(c,a,h,i);else if(!g&&e._matchesParentIDInList(f.id,e._postBackControlClientIDs))return e._createPostBackSettings(b)}f=f.parentNode}return!g?e._createPostBackSettings(b):g},_getScrollPosition:function(){var b=this,a=document.documentElement;if(a&&(b._validPosition(a.scrollLeft)||b._validPosition(a.scrollTop)))return{x:a.scrollLeft,y:a.scrollTop};else{a=document.body;return a&&(b._validPosition(a.scrollLeft)||b._validPosition(a.scrollTop))?{x:a.scrollLeft,y:a.scrollTop}:b._validPosition(window.pageXOffset)||b._validPosition(window.pageYOffset)?{x:window.pageXOffset,y:window.pageYOffset}:{x:0,y:0}}},_initializeInternal:function(k,l,d,e,h,f,g){var b=this;if(b._prmInitialized)throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice);b._prmInitialized=c;b._masterPageUniqueID=g;b._scriptManagerID=k;b._form=Sys.UI.DomElement.resolveElement(l);b._onsubmit=b._form.onsubmit;b._form.onsubmit=a;b._onFormSubmitHandler=Function.createDelegate(b,b._onFormSubmit);b._onFormElementClickHandler=Function.createDelegate(b,b._onFormElementClick);b._onWindowUnloadHandler=Function.createDelegate(b,b._onWindowUnload);Sys.UI.DomEvent.addHandler(b._form,j,b._onFormSubmitHandler);Sys.UI.DomEvent.addHandler(b._form,"click",b._onFormElementClickHandler);Sys.UI.DomEvent.addHandler(window,"unload",b._onWindowUnloadHandler);b._originalDoPostBack=window.__doPostBack;if(b._originalDoPostBack)window.__doPostBack=Function.createDelegate(b,b._doPostBack);b._originalDoPostBackWithOptions=window.WebForm_DoPostBackWithOptions;if(b._originalDoPostBackWithOptions)window.WebForm_DoPostBackWithOptions=Function.createDelegate(b,b._doPostBackWithOptions);b._originalFireDefaultButton=window.WebForm_FireDefaultButton;if(b._originalFireDefaultButton)window.WebForm_FireDefaultButton=Function.createDelegate(b,b._fireDefaultButton);b._originalDoCallback=window.WebForm_DoCallback;if(b._originalDoCallback)window.WebForm_DoCallback=Function.createDelegate(b,b._doCallback);b._pageLoadedHandler=Function.createDelegate(b,b._pageLoadedInitialLoad);Sys.UI.DomEvent.addHandler(window,i,b._pageLoadedHandler);d&&b._updateControls(d,e,h,f,c)},_matchesParentIDInList:function(e,d){for(var a=0,f=d.length;a<f;a++)if(e.startsWith(d[a]+"_"))return c;return b},_onFormElementActive:function(a,e,f){var b=this;if(a.disabled)return;b._postBackSettings=b._getPostBackSettings(a,a.name);if(a.name){var c=a.tagName.toUpperCase();if(c==="INPUT"){var d=a.type;if(d===j)b._additionalInput=encodeURIComponent(a.name)+h+encodeURIComponent(a.value);else if(d==="image")b._additionalInput=encodeURIComponent(a.name)+".x="+e+"&"+encodeURIComponent(a.name)+".y="+f}else if(c==="BUTTON"&&a.name.length!==0&&a.type===j)b._additionalInput=encodeURIComponent(a.name)+h+encodeURIComponent(a.value)}},_onFormElementClick:function(a){this._activeDefaultButtonClicked=a.target===this._activeDefaultButton;this._onFormElementActive(a.target,a.offsetX,a.offsetY)},_onFormSubmit:function(r){var e=this,m,C,q=c,D=e._isCrossPost;e._isCrossPost=b;if(e._onsubmit)q=e._onsubmit();if(q)for(m=0,C=e._onSubmitStatements.length;m<C;m++)if(!e._onSubmitStatements[m]()){q=b;break}if(!q){r&&r.preventDefault();return}var w=e._form;if(D)return;e._activeDefaultButton&&!e._activeDefaultButtonClicked&&e._onFormElementActive(e._activeDefaultButton,0,0);if(!e._postBackSettings||!e._postBackSettings.async)return;var f=new Sys.StringBuilder,F=w.elements.length,z=e._createPanelID(a,e._postBackSettings);f.append(z);for(m=0;m<F;m++){var l=w.elements[m],o=l.name;if(typeof o===g||o===a||o.length===0||o===e._scriptManagerID)continue;var v=l.tagName.toUpperCase();if(v==="INPUT"){var t=l.type;if(t==="text"||t==="password"||t==="hidden"||(t==="checkbox"||t==="radio")&&l.checked){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(l.value));f.append("&")}}else if(v==="SELECT")for(var E=l.options.length,x=0;x<E;x++){var A=l.options[x];if(A.selected){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(A.value));f.append("&")}}else if(v==="TEXTAREA"){f.append(encodeURIComponent(o));f.append(h);f.append(encodeURIComponent(l.value));f.append("&")}}f.append("__ASYNCPOST=true&");if(e._additionalInput){f.append(e._additionalInput);e._additionalInput=a}var i=new Sys.Net.WebRequest,j=w.action;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var y=j.indexOf("#");if(y!==d)j=j.substr(0,y);var u=j.indexOf("?");if(u!==d){var B=j.substr(0,u);if(B.indexOf("%")===d)j=encodeURI(B)+j.substr(u)}else if(j.indexOf("%")===d)j=encodeURI(j)}i.set_url(j);i.get_headers()["X-MicrosoftAjax"]="Delta=true";i.get_headers()["Cache-Control"]="no-cache";i.set_timeout(e._asyncPostBackTimeout);i.add_completed(Function.createDelegate(e,e._onFormSubmitCompleted));i.set_body(f.toString());var s,k;s=e._postBackSettings.panelsToUpdate;k=new Sys.WebForms.InitializeRequestEventArgs(i,e._postBackSettings.sourceElement,s);Sys.Observer.raiseEvent(e,p,k);q=!k.get_cancel();if(!q){r&&r.preventDefault();return}if(k&&k._updated){s=k.get_updatePanelsToUpdate();i.set_body(i.get_body().replace(z,e._createPanelID(s,e._postBackSettings)))}e._scrollPosition=e._getScrollPosition();e.abortPostBack();k=new Sys.WebForms.BeginRequestEventArgs(i,e._postBackSettings.sourceElement,s||e._postBackSettings.panelsToUpdate);Sys.Observer.raiseEvent(e,n,k);e._originalDoCallback&&e._cancelPendingCallbacks();e._request=i;e._processingRequest=b;i.invoke();r&&r.preventDefault()},_onFormSubmitCompleted:function(h){var d=this;d._processingRequest=c;if(h.get_timedOut()){d._endPostBack(d._createPageRequestManagerTimeoutError(),h,a);return}if(h.get_aborted()){d._endPostBack(a,h,a);return}if(!d._request||h.get_webRequest()!==d._request)return;if(h.get_statusCode()!==200){d._endPostBack(d._createPageRequestManagerServerError(h.get_statusCode()),h,a);return}var e=d._parseDelta(h);if(!e)return;var g,j;if(e.asyncPostBackControlIDsNode&&e.postBackControlIDsNode&&e.updatePanelIDsNode&&e.panelsToRefreshNode&&e.childUpdatePanelIDsNode){var x=d._updatePanelIDs,t=d._updatePanelClientIDs,n=e.childUpdatePanelIDsNode.content,v=n.length?n.split(","):[],s=d._splitNodeIntoArray(e.asyncPostBackControlIDsNode),u=d._splitNodeIntoArray(e.postBackControlIDsNode),w=d._splitNodeIntoArray(e.updatePanelIDsNode),l=d._splitNodeIntoArray(e.panelsToRefreshNode),m=e.version4;for(g=0,j=l.length;g<j;g+=m?2:1){var o=(m?l[g+1]:f)||d._uniqueIDToClientID(l[g]);if(!document.getElementById(o)){d._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,o)),h,e);return}}var k=d._processUpdatePanelArrays(w,s,u,m);k.oldUpdatePanelIDs=x;k.oldUpdatePanelClientIDs=t;k.childUpdatePanelIDs=v;k.panelsToRefreshIDs=l;e.updatePanelData=k}e.dataItems={};var i;for(g=0,j=e.dataItemNodes.length;g<j;g++){i=e.dataItemNodes[g];e.dataItems[i.id]=i.content}for(g=0,j=e.dataItemJsonNodes.length;g<j;g++){i=e.dataItemJsonNodes[g];e.dataItems[i.id]=Sys.Serialization.JavaScriptSerializer.deserialize(i.content)}var q=Sys.Observer._getContext(d,c).events.getHandler(r);q&&q(d,d._getPageLoadingEventArgs(e));Sys._ScriptLoader.readLoadedScripts();Sys.Application.beginCreateComponents();var p=Sys._ScriptLoader.getInstance();d._queueScripts(p,e.scriptBlockNodes,c,b);d._processingRequest=c;p.loadScripts(0,Function.createDelegate(d,Function.createCallback(d._scriptIncludesLoadComplete,e)),Function.createDelegate(d,Function.createCallback(d._scriptIncludesLoadFailed,e)),a)},_onWindowUnload:function(){this.dispose()},_pageLoaded:function(a,b){Sys.Observer.raiseEvent(this,q,this._getPageLoadedEventArgs(a,b));!a&&Sys.Application.raiseLoad()},_pageLoadedInitialLoad:function(){this._pageLoaded(c,a)},_parseDelta:function(n){var h=this,g=n.get_responseData(),i,o,K,L,J,f=0,j=a,p=[];while(f<g.length){i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}o=parseInt(g.substring(f,i),10);if(o%1!==0){j=h._findText(g,f);break}f=i+1;i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}K=g.substring(f,i);f=i+1;i=g.indexOf("|",f);if(i===d){j=h._findText(g,f);break}L=g.substring(f,i);f=i+1;if(f+o>=g.length){j=h._findText(g,g.length);break}J=g.substr(f,o);f+=o;if(g.charAt(f)!=="|"){j=h._findText(g,f);break}f++;Array.add(p,{type:K,id:L,content:J})}if(j){h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails,j)),n,a);return a}for(var D=[],B=[],v=[],C=[],y=[],I=[],G=[],F=[],A=[],x=[],r,u,z,s,t,w,E,m,q=0,M=p.length;q<M;q++){var e=p[q];switch(e.type){case"#":m=e;break;case"updatePanel":Array.add(D,e);break;case"hiddenField":Array.add(B,e);break;case"arrayDeclaration":Array.add(v,e);break;case"scriptBlock":Array.add(C,e);break;case"scriptStartupBlock":Array.add(y,e);break;case"expando":Array.add(I,e);break;case"onSubmit":Array.add(G,e);break;case"asyncPostBackControlIDs":r=e;break;case"postBackControlIDs":u=e;break;case"updatePanelIDs":z=e;break;case"asyncPostBackTimeout":s=e;break;case"childUpdatePanelIDs":t=e;break;case"panelsToRefreshIDs":w=e;break;case"formAction":E=e;break;case"dataItem":Array.add(F,e);break;case"dataItemJson":Array.add(A,e);break;case"scriptDispose":Array.add(x,e);break;case"pageRedirect":if(m&&parseFloat(m.content)>=4)e.content=unescape(e.content);if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var k=document.createElement("a");k.style.display="none";k.attachEvent("onclick",H);k.href=e.content;h._form.parentNode.insertBefore(k,h._form);k.click();k.detachEvent("onclick",H);h._form.parentNode.removeChild(k);function H(a){a.cancelBubble=c}}else window.location.href=e.content;return a;case l:h._endPostBack(h._createPageRequestManagerServerError(Number.parseInvariant(e.id),e.content),n,a);return a;case"pageTitle":document.title=e.content;break;case"focus":h._controlIDToFocus=e.content;break;default:h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_UnknownToken,e.type)),n,a);return a}}return{version4:m?parseFloat(m.content)>=4:b,executor:n,updatePanelNodes:D,hiddenFieldNodes:B,arrayDeclarationNodes:v,scriptBlockNodes:C,scriptStartupNodes:y,expandoNodes:I,onSubmitNodes:G,dataItemNodes:F,dataItemJsonNodes:A,scriptDisposeNodes:x,asyncPostBackControlIDsNode:r,postBackControlIDsNode:u,updatePanelIDsNode:z,asyncPostBackTimeoutNode:s,childUpdatePanelIDsNode:t,panelsToRefreshNode:w,formActionNode:E}},_processUpdatePanelArrays:function(e,r,s,g){var d,c,b;if(e){var j=e.length,k=g?2:1;d=new Array(j/k);c=new Array(j/k);b=new Array(j/k);for(var h=0,i=0;h<j;h+=k,i++){var q,a=e[h],l=g?e[h+1]:f;q=a.charAt(0)==="t";a=a.substr(1);if(!l)l=this._uniqueIDToClientID(a);b[i]=q;d[i]=a;c[i]=l}}else{d=[];c=[];b=[]}var o=[],m=[];this._convertToClientIDs(r,o,m,g);var p=[],n=[];this._convertToClientIDs(s,p,n,g);return{updatePanelIDs:d,updatePanelClientIDs:c,updatePanelHasChildrenAsTriggers:b,asyncPostBackControlIDs:o,asyncPostBackControlClientIDs:m,postBackControlIDs:p,postBackControlClientIDs:n}},_queueScripts:function(d,b,e,f){for(var a=0,h=b.length;a<h;a++){var g=b[a].id;switch(g){case"ScriptContentNoTags":if(!f)continue;d.queueScriptBlock(b[a].content);break;case"ScriptContentWithTags":var c=window.eval("("+b[a].content+")");if(c.src){if(!e||Sys._ScriptLoader.isScriptLoaded(c.src))continue}else if(!f)continue;d.queueCustomScriptTag(c);break;case"ScriptPath":if(!e||Sys._ScriptLoader.isScriptLoaded(b[a].content))continue;d.queueScriptReference(b[a].content)}}},_registerDisposeScript:function(a,b){if(!this._scriptDisposes[a])this._scriptDisposes[a]=[b];else Array.add(this._scriptDisposes[a],b)},_scriptIncludesLoadComplete:function(j,e){var i=this;if(e.executor.get_webRequest()!==i._request)return;i._commitControls(e.updatePanelData,e.asyncPostBackTimeoutNode?e.asyncPostBackTimeoutNode.content:a);if(e.formActionNode)i._form.action=e.formActionNode.content;var d,h,g;for(d=0,h=e.updatePanelNodes.length;d<h;d++){g=e.updatePanelNodes[d];var o=document.getElementById(g.id);if(!o){i._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,g.id)),e.executor,e);return}i._updatePanel(o,g.content)}for(d=0,h=e.scriptDisposeNodes.length;d<h;d++){g=e.scriptDisposeNodes[d];i._registerDisposeScript(g.id,g.content)}for(d=0,h=i._transientFields.length;d<h;d++){var l=document.getElementById(i._transientFields[d]);if(l){var p=l._isContained?l.parentNode:l;p.parentNode.removeChild(p)}}for(d=0,h=e.hiddenFieldNodes.length;d<h;d++){g=e.hiddenFieldNodes[d];i._createHiddenField(g.id,g.content)}if(e.scriptsFailed)throw Sys._ScriptLoader._errorScriptLoadFailed(e.scriptsFailed.src,e.scriptsFailed.multipleCallbacks);i._queueScripts(j,e.scriptBlockNodes,b,c);var n=f;for(d=0,h=e.arrayDeclarationNodes.length;d<h;d++){g=e.arrayDeclarationNodes[d];n+="Sys.WebForms.PageRequestManager._addArrayElement('"+g.id+"', "+g.content+");\r\n"}var m=f;for(d=0,h=e.expandoNodes.length;d<h;d++){g=e.expandoNodes[d];m+=g.id+" = "+g.content+"\r\n"}n.length&&j.queueScriptBlock(n);m.length&&j.queueScriptBlock(m);i._queueScripts(j,e.scriptStartupNodes,c,c);var k=f;for(d=0,h=e.onSubmitNodes.length;d<h;d++){if(d===0)k="Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, function() {\r\n";k+=e.onSubmitNodes[d].content+"\r\n"}if(k.length){k+="\r\nreturn true;\r\n});\r\n";j.queueScriptBlock(k)}j.loadScripts(0,Function.createDelegate(i,Function.createCallback(i._scriptsLoadComplete,e)),a,a)},_scriptIncludesLoadFailed:function(d,c,b,a){a.scriptsFailed={src:c.src,multipleCallbacks:b};this._scriptIncludesLoadComplete(d,a)},_scriptsLoadComplete:function(k,h){var c=this,j=h.executor;if(window.__theFormPostData)window.__theFormPostData=f;if(window.__theFormPostCollection)window.__theFormPostCollection=[];window.WebForm_InitCallback&&window.WebForm_InitCallback();if(c._scrollPosition){window.scrollTo&&window.scrollTo(c._scrollPosition.x,c._scrollPosition.y);c._scrollPosition=a}Sys.Application.endCreateComponents();c._pageLoaded(b,h);c._endPostBack(a,j,h);if(c._controlIDToFocus){var d,i;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var e=$get(c._controlIDToFocus);d=e;if(e&&!WebForm_CanFocus(e))d=WebForm_FindFirstFocusableChild(e);if(d&&typeof d.contentEditable!==g){i=d.contentEditable;d.contentEditable=b}else d=a}WebForm_AutoFocus(c._controlIDToFocus);if(d)d.contentEditable=i;c._controlIDToFocus=a}},_splitNodeIntoArray:function(b){var a=b.content,c=a.length?a.split(","):[];return c},_uniqueIDToClientID:function(a){return a.replace(/\$/g,"_")},_updateControls:function(d,a,c,b,e){this._commitControls(this._processUpdatePanelArrays(d,a,c,e),b)},_updatePanel:function(b,g){var a=this;for(var d in a._scriptDisposes)if(a._elementContains(b,document.getElementById(d))){for(var f=a._scriptDisposes[d],e=0,h=f.length;e<h;e++)window.eval(f[e]);delete a._scriptDisposes[d]}Sys.Application.disposeElement(b,c);b.innerHTML=g},_validPosition:function(b){return typeof b!==g&&b!==a&&b!==0}};e.getInstance=function(){var a=Sys.WebForms.PageRequestManager._instance;if(!a)a=Sys.WebForms.PageRequestManager._instance=new Sys.WebForms.PageRequestManager;return a};e._addArrayElement=function(a){if(!window[a])window[a]=[];for(var b=1,c=arguments.length;b<c;b++)Array.add(window[a],arguments[b])};e._initialize=function(){var a=Sys.WebForms.PageRequestManager.getInstance();a._initializeInternal.apply(a,arguments)};e.registerClass("Sys.WebForms.PageRequestManager");e=Sys.UI._UpdateProgress=function(d){var b=this;Sys.UI._UpdateProgress.initializeBase(b,[d]);b._displayAfter=500;b._dynamicLayout=c;b._associatedUpdatePanelId=a;b._beginRequestHandlerDelegate=a;b._startDelegate=a;b._endRequestHandlerDelegate=a;b._pageRequestManager=a;b._timerCookie=a};e.prototype={get_displayAfter:function(){return this._displayAfter},set_displayAfter:function(a){this._displayAfter=a},get_dynamicLayout:function(){return this._dynamicLayout},set_dynamicLayout:function(a){this._dynamicLayout=a},get_associatedUpdatePanelId:function(){return this._associatedUpdatePanelId},set_associatedUpdatePanelId:function(a){this._associatedUpdatePanelId=a},get_role:function(){return k},_clearTimeout:function(){if(this._timerCookie){window.clearTimeout(this._timerCookie);this._timerCookie=a}},_getUniqueID:function(c){var b=Array.indexOf(this._pageRequestManager._updatePanelClientIDs,c);return b===d?a:this._pageRequestManager._updatePanelIDs[b]},_handleBeginRequest:function(i,h){var a=this,e=h.get_postBackElement(),d=c,g=a._associatedUpdatePanelId;if(a._associatedUpdatePanelId){var f=h.get_updatePanelsToUpdate();if(f&&f.length)d=Array.contains(f,g)||Array.contains(f,a._getUniqueID(g));else d=b}while(!d&&e){if(e.id&&a._associatedUpdatePanelId===e.id)d=c;e=e.parentNode}if(d)a._timerCookie=window.setTimeout(a._startDelegate,a._displayAfter)},_startRequest:function(){var b=this;if(b._pageRequestManager.get_isInAsyncPostBack()){var c=b.get_element();if(b._dynamicLayout)c.style.display="block";else c.style.visibility="visible";b.get_role()===k&&c.setAttribute(s,"false")}b._timerCookie=a},_handleEndRequest:function(){var a=this,b=a.get_element();if(a._dynamicLayout)b.style.display="none";else b.style.visibility="hidden";a.get_role()===k&&b.setAttribute(s,"true");a._clearTimeout()},dispose:function(){var b=this;if(b._beginRequestHandlerDelegate!==a){b._pageRequestManager.remove_beginRequest(b._beginRequestHandlerDelegate);b._pageRequestManager.remove_endRequest(b._endRequestHandlerDelegate);b._beginRequestHandlerDelegate=a;b._endRequestHandlerDelegate=a}b._clearTimeout();Sys.UI._UpdateProgress.callBaseMethod(b,"dispose")},initialize:function(){var b=this;Sys.UI._UpdateProgress.callBaseMethod(b,"initialize");b.get_role()===k&&b.get_element().setAttribute(s,"true");b._beginRequestHandlerDelegate=Function.createDelegate(b,b._handleBeginRequest);b._endRequestHandlerDelegate=Function.createDelegate(b,b._handleEndRequest);b._startDelegate=Function.createDelegate(b,b._startRequest);if(Sys.WebForms&&Sys.WebForms.PageRequestManager)b._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(b._pageRequestManager!==a){b._pageRequestManager.add_beginRequest(b._beginRequestHandlerDelegate);b._pageRequestManager.add_endRequest(b._endRequestHandlerDelegate)}}};e.registerClass("Sys.UI._UpdateProgress",Sys.UI.Control)}if(window.Sys&&Sys.loader)Sys.loader.registerScript("WebForms",["ComponentModel","Serialization","Network"],a);else a()})();
Type.registerNamespace('Sys.WebForms');Sys.WebForms.Res={"PRM_UnknownToken":"Unknown token: \u0027{0}\u0027.","PRM_MissingPanel":"Could not find UpdatePanel with ID \u0027{0}\u0027. If it is being updated dynamically then it must be inside another UpdatePanel.","PRM_ServerError":"An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}","PRM_ParserError":"The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.\r\nDetails: {0}","PRM_TimeoutError":"The server request timed out.","PRM_ParserErrorDetails":"Error parsing near \u0027{0}\u0027.","PRM_CannotRegisterTwice":"The PageRequestManager cannot be initialized more than once."};