Advertisement
Guest User

ScriptResource.axd 1

a guest
Jun 7th, 2016
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // (c) 2010 CodePlex Foundation
  2. (function() {
  3.     function a() {
  4.         var s = "aria-hidden",
  5.             k = "status",
  6.             j = "submit",
  7.             h = "=",
  8.             g = "undefined",
  9.             d = -1,
  10.             f = "",
  11.             u = "function",
  12.             r = "pageLoading",
  13.             q = "pageLoaded",
  14.             p = "initializeRequest",
  15.             o = "endRequest",
  16.             n = "beginRequest",
  17.             m = "script",
  18.             l = "error",
  19.             t = "readystatechange",
  20.             i = "load",
  21.             a = null,
  22.             c = true,
  23.             b = false;
  24.         Type._registerScript("MicrosoftAjaxWebForms.js", ["MicrosoftAjaxCore.js", "MicrosoftAjaxSerialization.js", "MicrosoftAjaxNetwork.js", "MicrosoftAjaxComponentModel.js"]);
  25.         var e, v;
  26.         Type.registerNamespace("Sys.WebForms");
  27.         e = Sys.WebForms.BeginRequestEventArgs = function(d, c, b) {
  28.             var a = this;
  29.             Sys.WebForms.BeginRequestEventArgs.initializeBase(a);
  30.             a._request = d;
  31.             a._postBackElement = c;
  32.             a._updatePanelsToUpdate = b
  33.         };
  34.         e.prototype = {
  35.             get_postBackElement: function() {
  36.                 return this._postBackElement
  37.             },
  38.             get_request: function() {
  39.                 return this._request
  40.             },
  41.             get_updatePanelsToUpdate: function() {
  42.                 return this._updatePanelsToUpdate ? Array.clone(this._updatePanelsToUpdate) : []
  43.             }
  44.         };
  45.         e.registerClass("Sys.WebForms.BeginRequestEventArgs", Sys.EventArgs);
  46.         e = Sys.WebForms.EndRequestEventArgs = function(e, c, d) {
  47.             var a = this;
  48.             Sys.WebForms.EndRequestEventArgs.initializeBase(a);
  49.             a._errorHandled = b;
  50.             a._error = e;
  51.             a._dataItems = c || {};
  52.             a._response = d
  53.         };
  54.         e.prototype = {
  55.             get_dataItems: function() {
  56.                 return this._dataItems
  57.             },
  58.             get_error: function() {
  59.                 return this._error
  60.             },
  61.             get_errorHandled: function() {
  62.                 return this._errorHandled
  63.             },
  64.             set_errorHandled: function(a) {
  65.                 this._errorHandled = a
  66.             },
  67.             get_response: function() {
  68.                 return this._response
  69.             }
  70.         };
  71.         e.registerClass("Sys.WebForms.EndRequestEventArgs", Sys.EventArgs);
  72.         e = Sys.WebForms.InitializeRequestEventArgs = function(d, c, b) {
  73.             var a = this;
  74.             Sys.WebForms.InitializeRequestEventArgs.initializeBase(a);
  75.             a._request = d;
  76.             a._postBackElement = c;
  77.             a._updatePanelsToUpdate = b
  78.         };
  79.         e.prototype = {
  80.             get_postBackElement: function() {
  81.                 return this._postBackElement
  82.             },
  83.             get_request: function() {
  84.                 return this._request
  85.             },
  86.             get_updatePanelsToUpdate: function() {
  87.                 return this._updatePanelsToUpdate ? Array.clone(this._updatePanelsToUpdate) : []
  88.             },
  89.             set_updatePanelsToUpdate: function(a) {
  90.                 this._updated = c;
  91.                 this._updatePanelsToUpdate = a
  92.             }
  93.         };
  94.         e.registerClass("Sys.WebForms.InitializeRequestEventArgs", Sys.CancelEventArgs);
  95.         e = Sys.WebForms.PageLoadedEventArgs = function(c, b, d) {
  96.             var a = this;
  97.             Sys.WebForms.PageLoadedEventArgs.initializeBase(a);
  98.             a._panelsUpdated = c;
  99.             a._panelsCreated = b;
  100.             a._dataItems = d || {}
  101.         };
  102.         e.prototype = {
  103.             get_dataItems: function() {
  104.                 return this._dataItems
  105.             },
  106.             get_panelsCreated: function() {
  107.                 return this._panelsCreated
  108.             },
  109.             get_panelsUpdated: function() {
  110.                 return this._panelsUpdated
  111.             }
  112.         };
  113.         e.registerClass("Sys.WebForms.PageLoadedEventArgs", Sys.EventArgs);
  114.         e = Sys.WebForms.PageLoadingEventArgs = function(c, b, d) {
  115.             var a = this;
  116.             Sys.WebForms.PageLoadingEventArgs.initializeBase(a);
  117.             a._panelsUpdating = c;
  118.             a._panelsDeleting = b;
  119.             a._dataItems = d || {}
  120.         };
  121.         e.prototype = {
  122.             get_dataItems: function() {
  123.                 return this._dataItems
  124.             },
  125.             get_panelsDeleting: function() {
  126.                 return this._panelsDeleting
  127.             },
  128.             get_panelsUpdating: function() {
  129.                 return this._panelsUpdating
  130.             }
  131.         };
  132.         e.registerClass("Sys.WebForms.PageLoadingEventArgs", Sys.EventArgs);
  133.         e = Sys._ScriptLoaderTask = function(b, a) {
  134.             this._scriptElement = b;
  135.             this._completedCallback = a
  136.         };
  137.         e.prototype = {
  138.             get_scriptElement: function() {
  139.                 return this._scriptElement
  140.             },
  141.             dispose: function() {
  142.                 var b = this;
  143.                 if (b._disposed) return;
  144.                 b._disposed = c;
  145.                 b._removeScriptElementHandlers();
  146.                 Sys._ScriptLoaderTask._clearScript(b._scriptElement);
  147.                 b._scriptElement = a
  148.             },
  149.             execute: function() {
  150.                 this._addScriptElementHandlers();
  151.                 document.getElementsByTagName("head")[0].appendChild(this._scriptElement)
  152.             },
  153.             _addScriptElementHandlers: function() {
  154.                 var a = this;
  155.                 a._scriptLoadDelegate = Function.createDelegate(a, a._scriptLoadHandler);
  156.                 if (document.addEventListener) {
  157.                     if (!a._scriptElement.readyState) a._scriptElement.readyState = "loaded";
  158.                     $addHandler(a._scriptElement, i, a._scriptLoadDelegate)
  159.                 } else $addHandler(a._scriptElement, t, a._scriptLoadDelegate);
  160.                 if (a._scriptElement.addEventListener) {
  161.                     a._scriptErrorDelegate = Function.createDelegate(a, a._scriptErrorHandler);
  162.                     a._scriptElement.addEventListener(l, a._scriptErrorDelegate, b)
  163.                 }
  164.             },
  165.             _removeScriptElementHandlers: function() {
  166.                 var c = this;
  167.                 if (c._scriptLoadDelegate) {
  168.                     var d = c.get_scriptElement();
  169.                     if (document.addEventListener) $removeHandler(d, i, c._scriptLoadDelegate);
  170.                     else $removeHandler(d, t, c._scriptLoadDelegate);
  171.                     if (c._scriptErrorDelegate) {
  172.                         c._scriptElement.removeEventListener(l, c._scriptErrorDelegate, b);
  173.                         c._scriptErrorDelegate = a
  174.                     }
  175.                     c._scriptLoadDelegate = a
  176.                 }
  177.             },
  178.             _scriptErrorHandler: function() {
  179.                 if (this._disposed) return;
  180.                 this._completedCallback(this.get_scriptElement(), b)
  181.             },
  182.             _scriptLoadHandler: function() {
  183.                 if (this._disposed) return;
  184.                 var a = this.get_scriptElement();
  185.                 if (a.readyState !== "loaded" && a.readyState !== "complete") return;
  186.                 this._completedCallback(a, c)
  187.             }
  188.         };
  189.         e.registerClass("Sys._ScriptLoaderTask", a, Sys.IDisposable);
  190.         e._clearScript = function(a) {
  191.             !Sys.Debug.isDebug && a.parentNode.removeChild(a)
  192.         };
  193.         e = Sys._ScriptLoader = function() {
  194.             var b = this;
  195.             b._scriptsToLoad = a;
  196.             b._sessions = [];
  197.             b._scriptLoadedDelegate = Function.createDelegate(b, b._scriptLoadedHandler)
  198.         };
  199.         e.prototype = {
  200.             dispose: function() {
  201.                 var c = this;
  202.                 c._stopSession();
  203.                 c._loading = b;
  204.                 if (c._events) delete c._events;
  205.                 c._sessions = a;
  206.                 c._currentSession = a;
  207.                 c._scriptLoadedDelegate = a
  208.             },
  209.             loadScripts: function(f, d, e, c) {
  210.                 var b = this,
  211.                     g = {
  212.                         allScriptsLoadedCallback: d,
  213.                         scriptLoadFailedCallback: e,
  214.                         scriptLoadTimeoutCallback: c,
  215.                         scriptsToLoad: b._scriptsToLoad,
  216.                         scriptTimeout: f
  217.                     };
  218.                 b._scriptsToLoad = a;
  219.                 b._sessions.push(g);
  220.                 !b._loading && b._nextSession()
  221.             },
  222.             queueCustomScriptTag: function(a) {
  223.                 if (!this._scriptsToLoad) this._scriptsToLoad = [];
  224.                 Array.add(this._scriptsToLoad, a)
  225.             },
  226.             queueScriptBlock: function(a) {
  227.                 if (!this._scriptsToLoad) this._scriptsToLoad = [];
  228.                 Array.add(this._scriptsToLoad, {
  229.                     text: a
  230.                 })
  231.             },
  232.             queueScriptReference: function(a) {
  233.                 if (!this._scriptsToLoad) this._scriptsToLoad = [];
  234.                 Array.add(this._scriptsToLoad, {
  235.                     src: a
  236.                 })
  237.             },
  238.             _createScriptElement: function(b) {
  239.                 var a = document.createElement(m);
  240.                 a.type = "text/javascript";
  241.                 for (var c in b) a[c] = b[c];
  242.                 return a
  243.             },
  244.             _loadScriptsInternal: function() {
  245.                 var a = this,
  246.                     c = a._currentSession;
  247.                 if (c.scriptsToLoad && c.scriptsToLoad.length > 0) {
  248.                     var d = Array.dequeue(c.scriptsToLoad),
  249.                         b = a._createScriptElement(d);
  250.                     if (b.text && Sys.Browser.agent === Sys.Browser.Safari) {
  251.                         b.innerHTML = b.text;
  252.                         delete b.text
  253.                     }
  254.                     if (typeof d.src === "string") {
  255.                         a._currentTask = new Sys._ScriptLoaderTask(b, a._scriptLoadedDelegate);
  256.                         a._currentTask.execute()
  257.                     } else {
  258.                         document.getElementsByTagName("head")[0].appendChild(b);
  259.                         Sys._ScriptLoaderTask._clearScript(b);
  260.                         a._loadScriptsInternal()
  261.                     }
  262.                 } else {
  263.                     a._stopSession();
  264.                     var e = c.allScriptsLoadedCallback;
  265.                     e && e(a);
  266.                     a._nextSession()
  267.                 }
  268.             },
  269.             _nextSession: function() {
  270.                 var d = this;
  271.                 if (d._sessions.length === 0) {
  272.                     d._loading = b;
  273.                     d._currentSession = a;
  274.                     return
  275.                 }
  276.                 d._loading = c;
  277.                 var e = Array.dequeue(d._sessions);
  278.                 d._currentSession = e;
  279.                 if (e.scriptTimeout > 0) d._timeoutCookie = window.setTimeout(Function.createDelegate(d, d._scriptLoadTimeoutHandler), e.scriptTimeout * 1e3);
  280.                 d._loadScriptsInternal()
  281.             },
  282.             _raiseError: function() {
  283.                 var a = this,
  284.                     d = a._currentSession.scriptLoadFailedCallback,
  285.                     c = a._currentTask.get_scriptElement();
  286.                 a._stopSession();
  287.                 if (d) {
  288.                     d(a, c);
  289.                     a._nextSession()
  290.                 } else {
  291.                     a._loading = b;
  292.                     throw Sys._ScriptLoader._errorScriptLoadFailed(c.src);
  293.                 }
  294.             },
  295.             _scriptLoadedHandler: function(c, d) {
  296.                 var b = this;
  297.                 if (d) {
  298.                     Array.add(Sys._ScriptLoader._getLoadedScripts(), c.src);
  299.                     b._currentTask.dispose();
  300.                     b._currentTask = a;
  301.                     b._loadScriptsInternal()
  302.                 } else b._raiseError()
  303.             },
  304.             _scriptLoadTimeoutHandler: function() {
  305.                 var a = this,
  306.                     b = a._currentSession.scriptLoadTimeoutCallback;
  307.                 a._stopSession();
  308.                 b && b(a);
  309.                 a._nextSession()
  310.             },
  311.             _stopSession: function() {
  312.                 var b = this;
  313.                 if (b._timeoutCookie) {
  314.                     window.clearTimeout(b._timeoutCookie);
  315.                     b._timeoutCookie = a
  316.                 }
  317.                 if (b._currentTask) {
  318.                     b._currentTask.dispose();
  319.                     b._currentTask = a
  320.                 }
  321.             }
  322.         };
  323.         e.registerClass("Sys._ScriptLoader", a, Sys.IDisposable);
  324.         e.getInstance = function() {
  325.             var a = Sys._ScriptLoader._activeInstance;
  326.             if (!a) a = Sys._ScriptLoader._activeInstance = new Sys._ScriptLoader;
  327.             return a
  328.         };
  329.         e.isScriptLoaded = function(b) {
  330.             var a = document.createElement(m);
  331.             a.src = b;
  332.             return Array.contains(Sys._ScriptLoader._getLoadedScripts(), a.src)
  333.         };
  334.         e.readLoadedScripts = function() {
  335.             if (!Sys._ScriptLoader._referencedScripts)
  336.                 for (var c = Sys._ScriptLoader._referencedScripts = [], d = document.getElementsByTagName(m), b = d.length - 1; b >= 0; b--) {
  337.                     var e = d[b],
  338.                         a = e.src;
  339.                     if (a.length) !Array.contains(c, a) && Array.add(c, a)
  340.                 }
  341.         };
  342.         e._errorScriptLoadFailed = function(b) {
  343.             var a;
  344.             a = Sys.Res.scriptLoadFailed;
  345.             var d = "Sys.ScriptLoadFailedException: " + String.format(a, b),
  346.                 c = Error.create(d, {
  347.                     name: "Sys.ScriptLoadFailedException",
  348.                     scriptUrl: b
  349.                 });
  350.             c.popStackFrame();
  351.             return c
  352.         };
  353.         e._getLoadedScripts = function() {
  354.             if (!Sys._ScriptLoader._referencedScripts) {
  355.                 Sys._ScriptLoader._referencedScripts = [];
  356.                 Sys._ScriptLoader.readLoadedScripts()
  357.             }
  358.             return Sys._ScriptLoader._referencedScripts
  359.         };
  360.         e = Sys.WebForms.PageRequestManager = function() {
  361.             var c = this;
  362.             c._form = a;
  363.             c._activeDefaultButton = a;
  364.             c._activeDefaultButtonClicked = b;
  365.             c._updatePanelIDs = a;
  366.             c._updatePanelClientIDs = a;
  367.             c._updatePanelHasChildrenAsTriggers = a;
  368.             c._asyncPostBackControlIDs = a;
  369.             c._asyncPostBackControlClientIDs = a;
  370.             c._postBackControlIDs = a;
  371.             c._postBackControlClientIDs = a;
  372.             c._scriptManagerID = a;
  373.             c._pageLoadedHandler = a;
  374.             c._additionalInput = a;
  375.             c._onsubmit = a;
  376.             c._onSubmitStatements = [];
  377.             c._originalDoPostBack = a;
  378.             c._originalDoPostBackWithOptions = a;
  379.             c._originalFireDefaultButton = a;
  380.             c._originalDoCallback = a;
  381.             c._isCrossPost = b;
  382.             c._postBackSettings = a;
  383.             c._request = a;
  384.             c._onFormSubmitHandler = a;
  385.             c._onFormElementClickHandler = a;
  386.             c._onWindowUnloadHandler = a;
  387.             c._asyncPostBackTimeout = a;
  388.             c._controlIDToFocus = a;
  389.             c._scrollPosition = a;
  390.             c._processingRequest = b;
  391.             c._scriptDisposes = {};
  392.             c._transientFields = ["__VIEWSTATEENCRYPTED", "__VIEWSTATEFIELDCOUNT"];
  393.             c._textTypes = /^(text|password|hidden|search|tel|url|email|number|range|color|datetime|date|month|week|time|datetime-local)$/i
  394.         };
  395.         e.prototype = {
  396.             get_isInAsyncPostBack: function() {
  397.                 return this._request !== a
  398.             },
  399.             add_beginRequest: function(a) {
  400.                 Sys.Observer.addEventHandler(this, n, a)
  401.             },
  402.             remove_beginRequest: function(a) {
  403.                 Sys.Observer.removeEventHandler(this, n, a)
  404.             },
  405.             add_endRequest: function(a) {
  406.                 Sys.Observer.addEventHandler(this, o, a)
  407.             },
  408.             remove_endRequest: function(a) {
  409.                 Sys.Observer.removeEventHandler(this, o, a)
  410.             },
  411.             add_initializeRequest: function(a) {
  412.                 Sys.Observer.addEventHandler(this, p, a)
  413.             },
  414.             remove_initializeRequest: function(a) {
  415.                 Sys.Observer.removeEventHandler(this, p, a)
  416.             },
  417.             add_pageLoaded: function(a) {
  418.                 Sys.Observer.addEventHandler(this, q, a)
  419.             },
  420.             remove_pageLoaded: function(a) {
  421.                 Sys.Observer.removeEventHandler(this, q, a)
  422.             },
  423.             add_pageLoading: function(a) {
  424.                 Sys.Observer.addEventHandler(this, r, a)
  425.             },
  426.             remove_pageLoading: function(a) {
  427.                 Sys.Observer.removeEventHandler(this, r, a)
  428.             },
  429.             abortPostBack: function() {
  430.                 var b = this;
  431.                 if (!b._processingRequest && b._request) {
  432.                     b._request.get_executor().abort();
  433.                     b._request = a
  434.                 }
  435.             },
  436.             beginAsyncPostBack: function(h, e, k, i, j) {
  437.                 var d = this;
  438.                 if (i && typeof Page_ClientValidate === u && !Page_ClientValidate(j || a)) return;
  439.                 d._postBackSettings = d._createPostBackSettings(c, h, e);
  440.                 var g = d._form;
  441.                 g.__EVENTTARGET.value = e || f;
  442.                 g.__EVENTARGUMENT.value = k || f;
  443.                 d._isCrossPost = b;
  444.                 d._additionalInput = a;
  445.                 d._onFormSubmit()
  446.             },
  447.             _cancelPendingCallbacks: function() {
  448.                 for (var b = 0, g = window.__pendingCallbacks.length; b < g; b++) {
  449.                     var e = window.__pendingCallbacks[b];
  450.                     if (e) {
  451.                         if (!e.async) window.__synchronousCallBackIndex = d;
  452.                         window.__pendingCallbacks[b] = a;
  453.                         var f = "__CALLBACKFRAME" + b,
  454.                             c = document.getElementById(f);
  455.                         c && c.parentNode.removeChild(c)
  456.                     }
  457.                 }
  458.             },
  459.             _commitControls: function(b, d) {
  460.                 var c = this;
  461.                 if (b) {
  462.                     c._updatePanelIDs = b.updatePanelIDs;
  463.                     c._updatePanelClientIDs = b.updatePanelClientIDs;
  464.                     c._updatePanelHasChildrenAsTriggers = b.updatePanelHasChildrenAsTriggers;
  465.                     c._asyncPostBackControlIDs = b.asyncPostBackControlIDs;
  466.                     c._asyncPostBackControlClientIDs = b.asyncPostBackControlClientIDs;
  467.                     c._postBackControlIDs = b.postBackControlIDs;
  468.                     c._postBackControlClientIDs = b.postBackControlClientIDs
  469.                 }
  470.                 if (typeof d !== g && d !== a) c._asyncPostBackTimeout = d * 1e3
  471.             },
  472.             _createHiddenField: function(d, e) {
  473.                 var b, a = document.getElementById(d);
  474.                 if (a)
  475.                     if (!a._isContained) a.parentNode.removeChild(a);
  476.                     else b = a.parentNode;
  477.                 if (!b) {
  478.                     b = document.createElement("span");
  479.                     b.style.cssText = "display:none !important";
  480.                     this._form.appendChild(b)
  481.                 }
  482.                 b.innerHTML = "<input type='hidden' />";
  483.                 a = b.childNodes[0];
  484.                 a._isContained = c;
  485.                 a.id = a.name = d;
  486.                 a.value = e
  487.             },
  488.             _createPageRequestManagerTimeoutError: function() {
  489.                 var b = "Sys.WebForms.PageRequestManagerTimeoutException: " + Sys.WebForms.Res.PRM_TimeoutError,
  490.                     a = Error.create(b, {
  491.                         name: "Sys.WebForms.PageRequestManagerTimeoutException"
  492.                     });
  493.                 a.popStackFrame();
  494.                 return a
  495.             },
  496.             _createPageRequestManagerServerError: function(a, d) {
  497.                 var c = "Sys.WebForms.PageRequestManagerServerErrorException: " + (d || String.format(Sys.WebForms.Res.PRM_ServerError, a)),
  498.                     b = Error.create(c, {
  499.                         name: "Sys.WebForms.PageRequestManagerServerErrorException",
  500.                         httpStatusCode: a
  501.                     });
  502.                 b.popStackFrame();
  503.                 return b
  504.             },
  505.             _createPageRequestManagerParserError: function(b) {
  506.                 var c = "Sys.WebForms.PageRequestManagerParserErrorException: " + String.format(Sys.WebForms.Res.PRM_ParserError, b),
  507.                     a = Error.create(c, {
  508.                         name: "Sys.WebForms.PageRequestManagerParserErrorException"
  509.                     });
  510.                 a.popStackFrame();
  511.                 return a
  512.             },
  513.             _createPanelID: function(e, b) {
  514.                 var c = b.asyncTarget,
  515.                     a = this._ensureUniqueIds(e || b.panelsToUpdate),
  516.                     d = a instanceof Array ? a.join(",") : a || this._scriptManagerID;
  517.                 if (c) d += "|" + c;
  518.                 return encodeURIComponent(this._scriptManagerID) + h + encodeURIComponent(d) + "&"
  519.             },
  520.             _createPostBackSettings: function(d, a, c, b) {
  521.                 return {
  522.                     async: d,
  523.                     asyncTarget: c,
  524.                     panelsToUpdate: a,
  525.                     sourceElement: b
  526.                 }
  527.             },
  528.             _convertToClientIDs: function(a, g, e, d) {
  529.                 if (a)
  530.                     for (var b = 0, i = a.length; b < i; b += d ? 2 : 1) {
  531.                         var c = a[b],
  532.                             h = (d ? a[b + 1] : f) || this._uniqueIDToClientID(c);
  533.                         Array.add(g, c);
  534.                         Array.add(e, h)
  535.                     }
  536.             },
  537.             dispose: function() {
  538.                 var b = this;
  539.                 Sys.Observer.clearEventHandlers(b);
  540.                 if (b._form) {
  541.                     Sys.UI.DomEvent.removeHandler(b._form, j, b._onFormSubmitHandler);
  542.                     Sys.UI.DomEvent.removeHandler(b._form, "click", b._onFormElementClickHandler);
  543.                     Sys.UI.DomEvent.removeHandler(window, "unload", b._onWindowUnloadHandler);
  544.                     Sys.UI.DomEvent.removeHandler(window, i, b._pageLoadedHandler)
  545.                 }
  546.                 if (b._originalDoPostBack) {
  547.                     window.__doPostBack = b._originalDoPostBack;
  548.                     b._originalDoPostBack = a
  549.                 }
  550.                 if (b._originalDoPostBackWithOptions) {
  551.                     window.WebForm_DoPostBackWithOptions = b._originalDoPostBackWithOptions;
  552.                     b._originalDoPostBackWithOptions = a
  553.                 }
  554.                 if (b._originalFireDefaultButton) {
  555.                     window.WebForm_FireDefaultButton = b._originalFireDefaultButton;
  556.                     b._originalFireDefaultButton = a
  557.                 }
  558.                 if (b._originalDoCallback) {
  559.                     window.WebForm_DoCallback = b._originalDoCallback;
  560.                     b._originalDoCallback = a
  561.                 }
  562.                 b._form = a;
  563.                 b._updatePanelIDs = a;
  564.                 b._updatePanelClientIDs = a;
  565.                 b._asyncPostBackControlIDs = a;
  566.                 b._asyncPostBackControlClientIDs = a;
  567.                 b._postBackControlIDs = a;
  568.                 b._postBackControlClientIDs = a;
  569.                 b._asyncPostBackTimeout = a;
  570.                 b._scrollPosition = a
  571.             },
  572.             _doCallback: function(d, b, c, f, a, e) {
  573.                 !this.get_isInAsyncPostBack() && this._originalDoCallback(d, b, c, f, a, e)
  574.             },
  575.             _doPostBack: function(e, l) {
  576.                 var d = this;
  577.                 d._additionalInput = a;
  578.                 var j = d._form;
  579.                 if (e === a || typeof e === g || d._isCrossPost) {
  580.                     d._postBackSettings = d._createPostBackSettings(b);
  581.                     d._isCrossPost = b
  582.                 } else {
  583.                     var f = d._masterPageUniqueID,
  584.                         k = d._uniqueIDToClientID(e),
  585.                         i = document.getElementById(k);
  586.                     if (!i && f)
  587.                         if (k.indexOf(f + "$") === 0) i = document.getElementById(k.substr(f.length + 1));
  588.                     if (!i)
  589.                         if (Array.contains(d._asyncPostBackControlIDs, e)) d._postBackSettings = d._createPostBackSettings(c, a, e);
  590.                         else if (Array.contains(d._postBackControlIDs, e)) d._postBackSettings = d._createPostBackSettings(b);
  591.                     else {
  592.                         var h = d._findNearestElement(e);
  593.                         if (h) d._postBackSettings = d._getPostBackSettings(h, e);
  594.                         else {
  595.                             if (f) {
  596.                                 f += "$";
  597.                                 if (e.indexOf(f) === 0) h = d._findNearestElement(e.substr(f.length))
  598.                             }
  599.                             if (h) d._postBackSettings = d._getPostBackSettings(h, e);
  600.                             else d._postBackSettings = d._createPostBackSettings(b)
  601.                         }
  602.                     } else d._postBackSettings = d._getPostBackSettings(i, e)
  603.                 }
  604.                 if (!d._postBackSettings.async) {
  605.                     j.onsubmit = d._onsubmit;
  606.                     d._originalDoPostBack(e, l);
  607.                     j.onsubmit = a;
  608.                     return
  609.                 }
  610.                 j.__EVENTTARGET.value = e;
  611.                 j.__EVENTARGUMENT.value = l;
  612.                 d._onFormSubmit()
  613.             },
  614.             _doPostBackWithOptions: function(a) {
  615.                 this._isCrossPost = a && a.actionUrl;
  616.                 this._originalDoPostBackWithOptions(a)
  617.             },
  618.             _elementContains: function(d, a) {
  619.                 while (a) {
  620.                     if (a === d) return c;
  621.                     a = a.parentNode
  622.                 }
  623.                 return b
  624.             },
  625.             _endPostBack: function(d, f, g) {
  626.                 var c = this;
  627.                 if (c._request === f.get_webRequest()) {
  628.                     c._processingRequest = b;
  629.                     c._additionalInput = a;
  630.                     c._request = a
  631.                 }
  632.                 var e = new Sys.WebForms.EndRequestEventArgs(d, g ? g.dataItems : {}, f);
  633.                 Sys.Observer.raiseEvent(c, o, e);
  634.                 if (d && !e.get_errorHandled()) throw d;
  635.             },
  636.             _ensureUniqueIds: function(a) {
  637.                 if (!a) return a;
  638.                 a = a instanceof Array ? a : [a];
  639.                 for (var c = [], b = 0, g = a.length; b < g; b++) {
  640.                     var f = a[b],
  641.                         e = Array.indexOf(this._updatePanelClientIDs, f);
  642.                     c.push(e > d ? this._updatePanelIDs[e] : f)
  643.                 }
  644.                 return c
  645.             },
  646.             _findNearestElement: function(b) {
  647.                 while (b.length > 0) {
  648.                     var f = this._uniqueIDToClientID(b),
  649.                         e = document.getElementById(f);
  650.                     if (e) return e;
  651.                     var c = b.lastIndexOf("$");
  652.                     if (c === d) return a;
  653.                     b = b.substring(0, c)
  654.                 }
  655.                 return a
  656.             },
  657.             _findText: function(b, a) {
  658.                 var c = Math.max(0, a - 20),
  659.                     d = Math.min(b.length, a + 20);
  660.                 return b.substring(c, d)
  661.             },
  662.             _fireDefaultButton: function(d, h) {
  663.                 if (d.keyCode === 13) {
  664.                     var f = d.srcElement || d.target;
  665.                     if (!f || f.tagName.toLowerCase() !== "textarea") {
  666.                         var e = document.getElementById(h);
  667.                         if (e && typeof e.click !== g) {
  668.                             this._activeDefaultButton = e;
  669.                             this._activeDefaultButtonClicked = b;
  670.                             try {
  671.                                 e.click()
  672.                             } finally {
  673.                                 this._activeDefaultButton = a
  674.                             }
  675.                             d.cancelBubble = c;
  676.                             typeof d.stopPropagation === u && d.stopPropagation();
  677.                             return b
  678.                         }
  679.                     }
  680.                 }
  681.                 return c
  682.             },
  683.             _getPageLoadedEventArgs: function(r, g) {
  684.                 var q = [],
  685.                     p = [],
  686.                     o = g ? g.version4 : b,
  687.                     h = g ? g.updatePanelData : a,
  688.                     i, k, l, e;
  689.                 if (!h) {
  690.                     i = this._updatePanelIDs;
  691.                     k = this._updatePanelClientIDs;
  692.                     l = a;
  693.                     e = a
  694.                 } else {
  695.                     i = h.updatePanelIDs;
  696.                     k = h.updatePanelClientIDs;
  697.                     l = h.childUpdatePanelIDs;
  698.                     e = h.panelsToRefreshIDs
  699.                 }
  700.                 var c, j, n, m;
  701.                 if (e)
  702.                     for (c = 0, j = e.length; c < j; c += o ? 2 : 1) {
  703.                         n = e[c];
  704.                         m = (o ? e[c + 1] : f) || this._uniqueIDToClientID(n);
  705.                         Array.add(q, document.getElementById(m))
  706.                     }
  707.                 for (c = 0, j = i.length; c < j; c++)(r || Array.indexOf(l, i[c]) !== d) && Array.add(p, document.getElementById(k[c]));
  708.                 return new Sys.WebForms.PageLoadedEventArgs(q, p, g ? g.dataItems : {})
  709.             },
  710.             _getPageLoadingEventArgs: function(h) {
  711.                 var l = [],
  712.                     k = [],
  713.                     c = h.updatePanelData,
  714.                     m = c.oldUpdatePanelIDs,
  715.                     n = c.oldUpdatePanelClientIDs,
  716.                     p = c.updatePanelIDs,
  717.                     o = c.childUpdatePanelIDs,
  718.                     e = c.panelsToRefreshIDs,
  719.                     a, g, b, i, j = h.version4;
  720.                 for (a = 0, g = e.length; a < g; a += j ? 2 : 1) {
  721.                     b = e[a];
  722.                     i = (j ? e[a + 1] : f) || this._uniqueIDToClientID(b);
  723.                     Array.add(l, document.getElementById(i))
  724.                 }
  725.                 for (a = 0, g = m.length; a < g; a++) {
  726.                     b = m[a];
  727.                     Array.indexOf(e, b) === d && (Array.indexOf(p, b) === d || Array.indexOf(o, b) > d) && Array.add(k, document.getElementById(n[a]))
  728.                 }
  729.                 return new Sys.WebForms.PageLoadingEventArgs(l, k, h.dataItems)
  730.             },
  731.             _getPostBackSettings: function(f, h) {
  732.                 var e = this,
  733.                     i = f,
  734.                     g = a;
  735.                 while (f) {
  736.                     if (f.id) {
  737.                         if (!g && Array.contains(e._asyncPostBackControlClientIDs, f.id)) g = e._createPostBackSettings(c, a, h, i);
  738.                         else if (!g && Array.contains(e._postBackControlClientIDs, f.id)) return e._createPostBackSettings(b);
  739.                         else {
  740.                             var j = Array.indexOf(e._updatePanelClientIDs, f.id);
  741.                             if (j !== d) return e._updatePanelHasChildrenAsTriggers[j] ? e._createPostBackSettings(c, [e._updatePanelIDs[j]], h, i) : e._createPostBackSettings(c, a, h, i)
  742.                         }
  743.                         if (!g && e._matchesParentIDInList(f.id, e._asyncPostBackControlClientIDs)) g = e._createPostBackSettings(c, a, h, i);
  744.                         else if (!g && e._matchesParentIDInList(f.id, e._postBackControlClientIDs)) return e._createPostBackSettings(b)
  745.                     }
  746.                     f = f.parentNode
  747.                 }
  748.                 return !g ? e._createPostBackSettings(b) : g
  749.             },
  750.             _getScrollPosition: function() {
  751.                 var b = this,
  752.                     a = document.documentElement;
  753.                 if (a && (b._validPosition(a.scrollLeft) || b._validPosition(a.scrollTop))) return {
  754.                     x: a.scrollLeft,
  755.                     y: a.scrollTop
  756.                 };
  757.                 else {
  758.                     a = document.body;
  759.                     return a && (b._validPosition(a.scrollLeft) || b._validPosition(a.scrollTop)) ? {
  760.                         x: a.scrollLeft,
  761.                         y: a.scrollTop
  762.                     } : b._validPosition(window.pageXOffset) || b._validPosition(window.pageYOffset) ? {
  763.                         x: window.pageXOffset,
  764.                         y: window.pageYOffset
  765.                     } : {
  766.                         x: 0,
  767.                         y: 0
  768.                     }
  769.                 }
  770.             },
  771.             _initializeInternal: function(k, l, d, e, h, f, g) {
  772.                 var b = this;
  773.                 if (b._prmInitialized) throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice);
  774.                 b._prmInitialized = c;
  775.                 b._masterPageUniqueID = g;
  776.                 b._scriptManagerID = k;
  777.                 b._form = Sys.UI.DomElement.resolveElement(l);
  778.                 b._onsubmit = b._form.onsubmit;
  779.                 b._form.onsubmit = a;
  780.                 b._onFormSubmitHandler = Function.createDelegate(b, b._onFormSubmit);
  781.                 b._onFormElementClickHandler = Function.createDelegate(b, b._onFormElementClick);
  782.                 b._onWindowUnloadHandler = Function.createDelegate(b, b._onWindowUnload);
  783.                 Sys.UI.DomEvent.addHandler(b._form, j, b._onFormSubmitHandler);
  784.                 Sys.UI.DomEvent.addHandler(b._form, "click", b._onFormElementClickHandler);
  785.                 Sys.UI.DomEvent.addHandler(window, "unload", b._onWindowUnloadHandler);
  786.                 b._originalDoPostBack = window.__doPostBack;
  787.                 if (b._originalDoPostBack) window.__doPostBack = Function.createDelegate(b, b._doPostBack);
  788.                 b._originalDoPostBackWithOptions = window.WebForm_DoPostBackWithOptions;
  789.                 if (b._originalDoPostBackWithOptions) window.WebForm_DoPostBackWithOptions = Function.createDelegate(b, b._doPostBackWithOptions);
  790.                 b._originalFireDefaultButton = window.WebForm_FireDefaultButton;
  791.                 if (b._originalFireDefaultButton) window.WebForm_FireDefaultButton = Function.createDelegate(b, b._fireDefaultButton);
  792.                 b._originalDoCallback = window.WebForm_DoCallback;
  793.                 if (b._originalDoCallback) window.WebForm_DoCallback = Function.createDelegate(b, b._doCallback);
  794.                 b._pageLoadedHandler = Function.createDelegate(b, b._pageLoadedInitialLoad);
  795.                 Sys.UI.DomEvent.addHandler(window, i, b._pageLoadedHandler);
  796.                 d && b._updateControls(d, e, h, f, c)
  797.             },
  798.             _matchesParentIDInList: function(e, d) {
  799.                 for (var a = 0, f = d.length; a < f; a++)
  800.                     if (e.startsWith(d[a] + "_")) return c;
  801.                 return b
  802.             },
  803.             _onFormElementActive: function(a, e, f) {
  804.                 var b = this;
  805.                 if (a.disabled) return;
  806.                 b._postBackSettings = b._getPostBackSettings(a, a.name);
  807.                 if (a.name) {
  808.                     var c = a.tagName.toUpperCase();
  809.                     if (c === "INPUT") {
  810.                         var d = a.type;
  811.                         if (d === j) b._additionalInput = encodeURIComponent(a.name) + h + encodeURIComponent(a.value);
  812.                         else if (d === "image") b._additionalInput = encodeURIComponent(a.name) + ".x=" + e + "&" + encodeURIComponent(a.name) + ".y=" + f
  813.                     } else if (c === "BUTTON" && a.name.length !== 0 && a.type === j) b._additionalInput = encodeURIComponent(a.name) + h + encodeURIComponent(a.value)
  814.                 }
  815.             },
  816.             _onFormElementClick: function(a) {
  817.                 this._activeDefaultButtonClicked = a.target === this._activeDefaultButton;
  818.                 this._onFormElementActive(a.target, a.offsetX, a.offsetY)
  819.             },
  820.             _onFormSubmit: function(r) {
  821.                 var e = this,
  822.                     m, C, q = c,
  823.                     D = e._isCrossPost;
  824.                 e._isCrossPost = b;
  825.                 if (e._onsubmit) q = e._onsubmit();
  826.                 if (q)
  827.                     for (m = 0, C = e._onSubmitStatements.length; m < C; m++)
  828.                         if (!e._onSubmitStatements[m]()) {
  829.                             q = b;
  830.                             break
  831.                         }
  832.                 if (!q) {
  833.                     r && r.preventDefault();
  834.                     return
  835.                 }
  836.                 var v = e._form;
  837.                 if (D) return;
  838.                 e._activeDefaultButton && !e._activeDefaultButtonClicked && e._onFormElementActive(e._activeDefaultButton, 0, 0);
  839.                 if (!e._postBackSettings || !e._postBackSettings.async) return;
  840.                 var f = new Sys.StringBuilder,
  841.                     F = v.elements.length,
  842.                     z = e._createPanelID(a, e._postBackSettings);
  843.                 f.append(z);
  844.                 for (m = 0; m < F; m++) {
  845.                     var l = v.elements[m],
  846.                         o = l.name;
  847.                     if (typeof o === g || o === a || o.length === 0 || o === e._scriptManagerID) continue;
  848.                     var u = l.tagName.toUpperCase();
  849.                     if (u === "INPUT") {
  850.                         var w = l.type;
  851.                         if (e._textTypes.test(w) || (w === "checkbox" || w === "radio") && l.checked) {
  852.                             f.append(encodeURIComponent(o));
  853.                             f.append(h);
  854.                             f.append(encodeURIComponent(l.value));
  855.                             f.append("&")
  856.                         }
  857.                     } else if (u === "SELECT")
  858.                         for (var E = l.options.length, x = 0; x < E; x++) {
  859.                             var A = l.options[x];
  860.                             if (A.selected) {
  861.                                 f.append(encodeURIComponent(o));
  862.                                 f.append(h);
  863.                                 f.append(encodeURIComponent(A.value));
  864.                                 f.append("&")
  865.                             }
  866.                         } else if (u === "TEXTAREA") {
  867.                             f.append(encodeURIComponent(o));
  868.                             f.append(h);
  869.                             f.append(encodeURIComponent(l.value));
  870.                             f.append("&")
  871.                         }
  872.                 }
  873.                 f.append("__ASYNCPOST=true&");
  874.                 if (e._additionalInput) {
  875.                     f.append(e._additionalInput);
  876.                     e._additionalInput = a
  877.                 }
  878.                 var i = new Sys.Net.WebRequest,
  879.                     j = v.action;
  880.                 if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
  881.                     var y = j.indexOf("#");
  882.                     if (y !== d) j = j.substr(0, y);
  883.                     var t = j.indexOf("?");
  884.                     if (t !== d) {
  885.                         var B = j.substr(0, t);
  886.                         if (B.indexOf("%") === d) j = encodeURI(B) + j.substr(t)
  887.                     } else if (j.indexOf("%") === d) j = encodeURI(j)
  888.                 }
  889.                 i.set_url(j);
  890.                 i.get_headers()["X-MicrosoftAjax"] = "Delta=true";
  891.                 i.get_headers()["Cache-Control"] = "no-cache";
  892.                 i.set_timeout(e._asyncPostBackTimeout);
  893.                 i.add_completed(Function.createDelegate(e, e._onFormSubmitCompleted));
  894.                 i.set_body(f.toString());
  895.                 var s, k;
  896.                 s = e._postBackSettings.panelsToUpdate;
  897.                 k = new Sys.WebForms.InitializeRequestEventArgs(i, e._postBackSettings.sourceElement, s);
  898.                 Sys.Observer.raiseEvent(e, p, k);
  899.                 q = !k.get_cancel();
  900.                 if (!q) {
  901.                     r && r.preventDefault();
  902.                     return
  903.                 }
  904.                 if (k && k._updated) {
  905.                     s = k.get_updatePanelsToUpdate();
  906.                     i.set_body(i.get_body().replace(z, e._createPanelID(s, e._postBackSettings)))
  907.                 }
  908.                 e._scrollPosition = e._getScrollPosition();
  909.                 e.abortPostBack();
  910.                 k = new Sys.WebForms.BeginRequestEventArgs(i, e._postBackSettings.sourceElement, s || e._postBackSettings.panelsToUpdate);
  911.                 Sys.Observer.raiseEvent(e, n, k);
  912.                 e._originalDoCallback && e._cancelPendingCallbacks();
  913.                 e._request = i;
  914.                 e._processingRequest = b;
  915.                 i.invoke();
  916.                 r && r.preventDefault()
  917.             },
  918.             _onFormSubmitCompleted: function(h) {
  919.                 var d = this;
  920.                 d._processingRequest = c;
  921.                 if (h.get_timedOut()) {
  922.                     d._endPostBack(d._createPageRequestManagerTimeoutError(), h, a);
  923.                     return
  924.                 }
  925.                 if (h.get_aborted()) {
  926.                     d._endPostBack(a, h, a);
  927.                     return
  928.                 }
  929.                 if (!d._request || h.get_webRequest() !== d._request) return;
  930.                 if (h.get_statusCode() !== 200) {
  931.                     d._endPostBack(d._createPageRequestManagerServerError(h.get_statusCode()), h, a);
  932.                     return
  933.                 }
  934.                 var e = d._parseDelta(h);
  935.                 if (!e) return;
  936.                 var g, j;
  937.                 if (e.asyncPostBackControlIDsNode && e.postBackControlIDsNode && e.updatePanelIDsNode && e.panelsToRefreshNode && e.childUpdatePanelIDsNode) {
  938.                     var x = d._updatePanelIDs,
  939.                         t = d._updatePanelClientIDs,
  940.                         n = e.childUpdatePanelIDsNode.content,
  941.                         v = n.length ? n.split(",") : [],
  942.                         s = d._splitNodeIntoArray(e.asyncPostBackControlIDsNode),
  943.                         u = d._splitNodeIntoArray(e.postBackControlIDsNode),
  944.                         w = d._splitNodeIntoArray(e.updatePanelIDsNode),
  945.                         l = d._splitNodeIntoArray(e.panelsToRefreshNode),
  946.                         m = e.version4;
  947.                     for (g = 0, j = l.length; g < j; g += m ? 2 : 1) {
  948.                         var o = (m ? l[g + 1] : f) || d._uniqueIDToClientID(l[g]);
  949.                         if (!document.getElementById(o)) {
  950.                             d._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel, o)), h, e);
  951.                             return
  952.                         }
  953.                     }
  954.                     var k = d._processUpdatePanelArrays(w, s, u, m);
  955.                     k.oldUpdatePanelIDs = x;
  956.                     k.oldUpdatePanelClientIDs = t;
  957.                     k.childUpdatePanelIDs = v;
  958.                     k.panelsToRefreshIDs = l;
  959.                     e.updatePanelData = k
  960.                 }
  961.                 e.dataItems = {};
  962.                 var i;
  963.                 for (g = 0, j = e.dataItemNodes.length; g < j; g++) {
  964.                     i = e.dataItemNodes[g];
  965.                     e.dataItems[i.id] = i.content
  966.                 }
  967.                 for (g = 0, j = e.dataItemJsonNodes.length; g < j; g++) {
  968.                     i = e.dataItemJsonNodes[g];
  969.                     e.dataItems[i.id] = Sys.Serialization.JavaScriptSerializer.deserialize(i.content)
  970.                 }
  971.                 var q = Sys.Observer._getContext(d, c).events.getHandler(r);
  972.                 q && q(d, d._getPageLoadingEventArgs(e));
  973.                 Sys._ScriptLoader.readLoadedScripts();
  974.                 Sys.Application.beginCreateComponents();
  975.                 var p = Sys._ScriptLoader.getInstance();
  976.                 d._queueScripts(p, e.scriptBlockNodes, c, b);
  977.                 d._processingRequest = c;
  978.                 p.loadScripts(0, Function.createDelegate(d, Function.createCallback(d._scriptIncludesLoadComplete, e)), Function.createDelegate(d, Function.createCallback(d._scriptIncludesLoadFailed, e)), a)
  979.             },
  980.             _onWindowUnload: function() {
  981.                 this.dispose()
  982.             },
  983.             _pageLoaded: function(a, b) {
  984.                 Sys.Observer.raiseEvent(this, q, this._getPageLoadedEventArgs(a, b));
  985.                 !a && Sys.Application.raiseLoad()
  986.             },
  987.             _pageLoadedInitialLoad: function() {
  988.                 this._pageLoaded(c, a)
  989.             },
  990.             _parseDelta: function(n) {
  991.                 var h = this,
  992.                     g = n.get_responseData(),
  993.                     i, o, K, L, J, f = 0,
  994.                     j = a,
  995.                     p = [];
  996.                 while (f < g.length) {
  997.                     i = g.indexOf("|", f);
  998.                     if (i === d) {
  999.                         j = h._findText(g, f);
  1000.                         break
  1001.                     }
  1002.                     o = parseInt(g.substring(f, i), 10);
  1003.                     if (o % 1 !== 0) {
  1004.                         j = h._findText(g, f);
  1005.                         break
  1006.                     }
  1007.                     f = i + 1;
  1008.                     i = g.indexOf("|", f);
  1009.                     if (i === d) {
  1010.                         j = h._findText(g, f);
  1011.                         break
  1012.                     }
  1013.                     K = g.substring(f, i);
  1014.                     f = i + 1;
  1015.                     i = g.indexOf("|", f);
  1016.                     if (i === d) {
  1017.                         j = h._findText(g, f);
  1018.                         break
  1019.                     }
  1020.                     L = g.substring(f, i);
  1021.                     f = i + 1;
  1022.                     if (f + o >= g.length) {
  1023.                         j = h._findText(g, g.length);
  1024.                         break
  1025.                     }
  1026.                     J = g.substr(f, o);
  1027.                     f += o;
  1028.                     if (g.charAt(f) !== "|") {
  1029.                         j = h._findText(g, f);
  1030.                         break
  1031.                     }
  1032.                     f++;
  1033.                     Array.add(p, {
  1034.                         type: K,
  1035.                         id: L,
  1036.                         content: J
  1037.                     })
  1038.                 }
  1039.                 if (j) {
  1040.                     h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails, j)), n, a);
  1041.                     return a
  1042.                 }
  1043.                 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++) {
  1044.                     var e = p[q];
  1045.                     switch (e.type) {
  1046.                         case "#":
  1047.                             m = e;
  1048.                             break;
  1049.                         case "updatePanel":
  1050.                             Array.add(D, e);
  1051.                             break;
  1052.                         case "hiddenField":
  1053.                             Array.add(B, e);
  1054.                             break;
  1055.                         case "arrayDeclaration":
  1056.                             Array.add(v, e);
  1057.                             break;
  1058.                         case "scriptBlock":
  1059.                             Array.add(C, e);
  1060.                             break;
  1061.                         case "scriptStartupBlock":
  1062.                             Array.add(y, e);
  1063.                             break;
  1064.                         case "expando":
  1065.                             Array.add(I, e);
  1066.                             break;
  1067.                         case "onSubmit":
  1068.                             Array.add(G, e);
  1069.                             break;
  1070.                         case "asyncPostBackControlIDs":
  1071.                             r = e;
  1072.                             break;
  1073.                         case "postBackControlIDs":
  1074.                             u = e;
  1075.                             break;
  1076.                         case "updatePanelIDs":
  1077.                             z = e;
  1078.                             break;
  1079.                         case "asyncPostBackTimeout":
  1080.                             s = e;
  1081.                             break;
  1082.                         case "childUpdatePanelIDs":
  1083.                             t = e;
  1084.                             break;
  1085.                         case "panelsToRefreshIDs":
  1086.                             w = e;
  1087.                             break;
  1088.                         case "formAction":
  1089.                             E = e;
  1090.                             break;
  1091.                         case "dataItem":
  1092.                             Array.add(F, e);
  1093.                             break;
  1094.                         case "dataItemJson":
  1095.                             Array.add(A, e);
  1096.                             break;
  1097.                         case "scriptDispose":
  1098.                             Array.add(x, e);
  1099.                             break;
  1100.                         case "pageRedirect":
  1101.                             if (m && parseFloat(m.content) >= 4) e.content = unescape(e.content);
  1102.                             if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
  1103.                                 var k = document.createElement("a");
  1104.                                 k.style.display = "none";
  1105.                                 k.attachEvent("onclick", H);
  1106.                                 k.href = e.content;
  1107.                                 h._form.parentNode.insertBefore(k, h._form);
  1108.                                 k.click();
  1109.                                 k.detachEvent("onclick", H);
  1110.                                 h._form.parentNode.removeChild(k);
  1111.  
  1112.                                 function H(a) {
  1113.                                     a.cancelBubble = c
  1114.                                 }
  1115.                             } else window.location.href = e.content;
  1116.                             return a;
  1117.                         case l:
  1118.                             h._endPostBack(h._createPageRequestManagerServerError(Number.parseInvariant(e.id), e.content), n, a);
  1119.                             return a;
  1120.                         case "pageTitle":
  1121.                             document.title = e.content;
  1122.                             break;
  1123.                         case "focus":
  1124.                             h._controlIDToFocus = e.content;
  1125.                             break;
  1126.                         default:
  1127.                             h._endPostBack(h._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_UnknownToken, e.type)), n, a);
  1128.                             return a
  1129.                     }
  1130.                 }
  1131.                 return {
  1132.                     version4: m ? parseFloat(m.content) >= 4 : b,
  1133.                     executor: n,
  1134.                     updatePanelNodes: D,
  1135.                     hiddenFieldNodes: B,
  1136.                     arrayDeclarationNodes: v,
  1137.                     scriptBlockNodes: C,
  1138.                     scriptStartupNodes: y,
  1139.                     expandoNodes: I,
  1140.                     onSubmitNodes: G,
  1141.                     dataItemNodes: F,
  1142.                     dataItemJsonNodes: A,
  1143.                     scriptDisposeNodes: x,
  1144.                     asyncPostBackControlIDsNode: r,
  1145.                     postBackControlIDsNode: u,
  1146.                     updatePanelIDsNode: z,
  1147.                     asyncPostBackTimeoutNode: s,
  1148.                     childUpdatePanelIDsNode: t,
  1149.                     panelsToRefreshNode: w,
  1150.                     formActionNode: E
  1151.                 }
  1152.             },
  1153.             _processUpdatePanelArrays: function(e, r, s, g) {
  1154.                 var d, c, b;
  1155.                 if (e) {
  1156.                     var j = e.length,
  1157.                         k = g ? 2 : 1;
  1158.                     d = new Array(j / k);
  1159.                     c = new Array(j / k);
  1160.                     b = new Array(j / k);
  1161.                     for (var h = 0, i = 0; h < j; h += k, i++) {
  1162.                         var q, a = e[h],
  1163.                             l = g ? e[h + 1] : f;
  1164.                         q = a.charAt(0) === "t";
  1165.                         a = a.substr(1);
  1166.                         if (!l) l = this._uniqueIDToClientID(a);
  1167.                         b[i] = q;
  1168.                         d[i] = a;
  1169.                         c[i] = l
  1170.                     }
  1171.                 } else {
  1172.                     d = [];
  1173.                     c = [];
  1174.                     b = []
  1175.                 }
  1176.                 var o = [],
  1177.                     m = [];
  1178.                 this._convertToClientIDs(r, o, m, g);
  1179.                 var p = [],
  1180.                     n = [];
  1181.                 this._convertToClientIDs(s, p, n, g);
  1182.                 return {
  1183.                     updatePanelIDs: d,
  1184.                     updatePanelClientIDs: c,
  1185.                     updatePanelHasChildrenAsTriggers: b,
  1186.                     asyncPostBackControlIDs: o,
  1187.                     asyncPostBackControlClientIDs: m,
  1188.                     postBackControlIDs: p,
  1189.                     postBackControlClientIDs: n
  1190.                 }
  1191.             },
  1192.             _queueScripts: function(d, b, e, f) {
  1193.                 for (var a = 0, h = b.length; a < h; a++) {
  1194.                     var g = b[a].id;
  1195.                     switch (g) {
  1196.                         case "ScriptContentNoTags":
  1197.                             if (!f) continue;
  1198.                             d.queueScriptBlock(b[a].content);
  1199.                             break;
  1200.                         case "ScriptContentWithTags":
  1201.                             var c = window.eval("(" + b[a].content + ")");
  1202.                             if (c.src) {
  1203.                                 if (!e || Sys._ScriptLoader.isScriptLoaded(c.src)) continue
  1204.                             } else if (!f) continue;
  1205.                             d.queueCustomScriptTag(c);
  1206.                             break;
  1207.                         case "ScriptPath":
  1208.                             if (!e || Sys._ScriptLoader.isScriptLoaded(b[a].content)) continue;
  1209.                             d.queueScriptReference(b[a].content)
  1210.                     }
  1211.                 }
  1212.             },
  1213.             _registerDisposeScript: function(a, b) {
  1214.                 if (!this._scriptDisposes[a]) this._scriptDisposes[a] = [b];
  1215.                 else Array.add(this._scriptDisposes[a], b)
  1216.             },
  1217.             _scriptIncludesLoadComplete: function(j, e) {
  1218.                 var i = this;
  1219.                 if (e.executor.get_webRequest() !== i._request) return;
  1220.                 i._commitControls(e.updatePanelData, e.asyncPostBackTimeoutNode ? e.asyncPostBackTimeoutNode.content : a);
  1221.                 if (e.formActionNode) i._form.action = e.formActionNode.content;
  1222.                 var d, h, g;
  1223.                 for (d = 0, h = e.updatePanelNodes.length; d < h; d++) {
  1224.                     g = e.updatePanelNodes[d];
  1225.                     var o = document.getElementById(g.id);
  1226.                     if (!o) {
  1227.                         i._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel, g.id)), e.executor, e);
  1228.                         return
  1229.                     }
  1230.                     i._updatePanel(o, g.content)
  1231.                 }
  1232.                 for (d = 0, h = e.scriptDisposeNodes.length; d < h; d++) {
  1233.                     g = e.scriptDisposeNodes[d];
  1234.                     i._registerDisposeScript(g.id, g.content)
  1235.                 }
  1236.                 for (d = 0, h = i._transientFields.length; d < h; d++) {
  1237.                     var l = document.getElementById(i._transientFields[d]);
  1238.                     if (l) {
  1239.                         var p = l._isContained ? l.parentNode : l;
  1240.                         p.parentNode.removeChild(p)
  1241.                     }
  1242.                 }
  1243.                 for (d = 0, h = e.hiddenFieldNodes.length; d < h; d++) {
  1244.                     g = e.hiddenFieldNodes[d];
  1245.                     i._createHiddenField(g.id, g.content)
  1246.                 }
  1247.                 if (e.scriptsFailed) throw Sys._ScriptLoader._errorScriptLoadFailed(e.scriptsFailed.src, e.scriptsFailed.multipleCallbacks);
  1248.                 i._queueScripts(j, e.scriptBlockNodes, b, c);
  1249.                 var n = f;
  1250.                 for (d = 0, h = e.arrayDeclarationNodes.length; d < h; d++) {
  1251.                     g = e.arrayDeclarationNodes[d];
  1252.                     n += "Sys.WebForms.PageRequestManager._addArrayElement('" + g.id + "', " + g.content + ");\r\n"
  1253.                 }
  1254.                 var m = f;
  1255.                 for (d = 0, h = e.expandoNodes.length; d < h; d++) {
  1256.                     g = e.expandoNodes[d];
  1257.                     m += g.id + " = " + g.content + "\r\n"
  1258.                 }
  1259.                 n.length && j.queueScriptBlock(n);
  1260.                 m.length && j.queueScriptBlock(m);
  1261.                 i._queueScripts(j, e.scriptStartupNodes, c, c);
  1262.                 var k = f;
  1263.                 for (d = 0, h = e.onSubmitNodes.length; d < h; d++) {
  1264.                     if (d === 0) k = "Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, function() {\r\n";
  1265.                     k += e.onSubmitNodes[d].content + "\r\n"
  1266.                 }
  1267.                 if (k.length) {
  1268.                     k += "\r\nreturn true;\r\n});\r\n";
  1269.                     j.queueScriptBlock(k)
  1270.                 }
  1271.                 j.loadScripts(0, Function.createDelegate(i, Function.createCallback(i._scriptsLoadComplete, e)), a, a)
  1272.             },
  1273.             _scriptIncludesLoadFailed: function(d, c, b, a) {
  1274.                 a.scriptsFailed = {
  1275.                     src: c.src,
  1276.                     multipleCallbacks: b
  1277.                 };
  1278.                 this._scriptIncludesLoadComplete(d, a)
  1279.             },
  1280.             _scriptsLoadComplete: function(k, h) {
  1281.                 var c = this,
  1282.                     j = h.executor;
  1283.                 if (window.__theFormPostData) window.__theFormPostData = f;
  1284.                 if (window.__theFormPostCollection) window.__theFormPostCollection = [];
  1285.                 window.WebForm_InitCallback && window.WebForm_InitCallback();
  1286.                 if (c._scrollPosition) {
  1287.                     window.scrollTo && window.scrollTo(c._scrollPosition.x, c._scrollPosition.y);
  1288.                     c._scrollPosition = a
  1289.                 }
  1290.                 Sys.Application.endCreateComponents();
  1291.                 c._pageLoaded(b, h);
  1292.                 c._endPostBack(a, j, h);
  1293.                 if (c._controlIDToFocus) {
  1294.                     var d, i;
  1295.                     if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
  1296.                         var e = $get(c._controlIDToFocus);
  1297.                         d = e;
  1298.                         if (e && !WebForm_CanFocus(e)) d = WebForm_FindFirstFocusableChild(e);
  1299.                         if (d && typeof d.contentEditable !== g) {
  1300.                             i = d.contentEditable;
  1301.                             d.contentEditable = b
  1302.                         } else d = a
  1303.                     }
  1304.                     WebForm_AutoFocus(c._controlIDToFocus);
  1305.                     if (d) d.contentEditable = i;
  1306.                     c._controlIDToFocus = a
  1307.                 }
  1308.             },
  1309.             _splitNodeIntoArray: function(b) {
  1310.                 var a = b.content,
  1311.                     c = a.length ? a.split(",") : [];
  1312.                 return c
  1313.             },
  1314.             _uniqueIDToClientID: function(a) {
  1315.                 return a.replace(/\$/g, "_")
  1316.             },
  1317.             _updateControls: function(d, a, c, b, e) {
  1318.                 this._commitControls(this._processUpdatePanelArrays(d, a, c, e), b)
  1319.             },
  1320.             _updatePanel: function(b, g) {
  1321.                 var a = this;
  1322.                 for (var d in a._scriptDisposes)
  1323.                     if (a._elementContains(b, document.getElementById(d))) {
  1324.                         for (var f = a._scriptDisposes[d], e = 0, h = f.length; e < h; e++) window.eval(f[e]);
  1325.                         delete a._scriptDisposes[d]
  1326.                     }
  1327.                 Sys.Application.disposeElement(b, c);
  1328.                 b.innerHTML = g
  1329.             },
  1330.             _validPosition: function(b) {
  1331.                 return typeof b !== g && b !== a && b !== 0
  1332.             }
  1333.         };
  1334.         e.getInstance = function() {
  1335.             var a = Sys.WebForms.PageRequestManager._instance;
  1336.             if (!a) a = Sys.WebForms.PageRequestManager._instance = new Sys.WebForms.PageRequestManager;
  1337.             return a
  1338.         };
  1339.         e._addArrayElement = function(a) {
  1340.             if (!window[a]) window[a] = [];
  1341.             for (var b = 1, c = arguments.length; b < c; b++) Array.add(window[a], arguments[b])
  1342.         };
  1343.         e._initialize = function() {
  1344.             var a = Sys.WebForms.PageRequestManager.getInstance();
  1345.             a._initializeInternal.apply(a, arguments)
  1346.         };
  1347.         e.registerClass("Sys.WebForms.PageRequestManager");
  1348.         e = Sys.UI._UpdateProgress = function(d) {
  1349.             var b = this;
  1350.             Sys.UI._UpdateProgress.initializeBase(b, [d]);
  1351.             b._displayAfter = 500;
  1352.             b._dynamicLayout = c;
  1353.             b._associatedUpdatePanelId = a;
  1354.             b._beginRequestHandlerDelegate = a;
  1355.             b._startDelegate = a;
  1356.             b._endRequestHandlerDelegate = a;
  1357.             b._pageRequestManager = a;
  1358.             b._timerCookie = a
  1359.         };
  1360.         e.prototype = {
  1361.             get_displayAfter: function() {
  1362.                 return this._displayAfter
  1363.             },
  1364.             set_displayAfter: function(a) {
  1365.                 this._displayAfter = a
  1366.             },
  1367.             get_dynamicLayout: function() {
  1368.                 return this._dynamicLayout
  1369.             },
  1370.             set_dynamicLayout: function(a) {
  1371.                 this._dynamicLayout = a
  1372.             },
  1373.             get_associatedUpdatePanelId: function() {
  1374.                 return this._associatedUpdatePanelId
  1375.             },
  1376.             set_associatedUpdatePanelId: function(a) {
  1377.                 this._associatedUpdatePanelId = a
  1378.             },
  1379.             get_role: function() {
  1380.                 return k
  1381.             },
  1382.             _clearTimeout: function() {
  1383.                 if (this._timerCookie) {
  1384.                     window.clearTimeout(this._timerCookie);
  1385.                     this._timerCookie = a
  1386.                 }
  1387.             },
  1388.             _getUniqueID: function(c) {
  1389.                 var b = Array.indexOf(this._pageRequestManager._updatePanelClientIDs, c);
  1390.                 return b === d ? a : this._pageRequestManager._updatePanelIDs[b]
  1391.             },
  1392.             _handleBeginRequest: function(i, h) {
  1393.                 var a = this,
  1394.                     e = h.get_postBackElement(),
  1395.                     d = c,
  1396.                     g = a._associatedUpdatePanelId;
  1397.                 if (a._associatedUpdatePanelId) {
  1398.                     var f = h.get_updatePanelsToUpdate();
  1399.                     if (f && f.length) d = Array.contains(f, g) || Array.contains(f, a._getUniqueID(g));
  1400.                     else d = b
  1401.                 }
  1402.                 while (!d && e) {
  1403.                     if (e.id && a._associatedUpdatePanelId === e.id) d = c;
  1404.                     e = e.parentNode
  1405.                 }
  1406.                 if (d) a._timerCookie = window.setTimeout(a._startDelegate, a._displayAfter)
  1407.             },
  1408.             _startRequest: function() {
  1409.                 var b = this;
  1410.                 if (b._pageRequestManager.get_isInAsyncPostBack()) {
  1411.                     var c = b.get_element();
  1412.                     if (b._dynamicLayout) c.style.display = "block";
  1413.                     else c.style.visibility = "visible";
  1414.                     b.get_role() === k && c.setAttribute(s, "false")
  1415.                 }
  1416.                 b._timerCookie = a
  1417.             },
  1418.             _handleEndRequest: function() {
  1419.                 var a = this,
  1420.                     b = a.get_element();
  1421.                 if (a._dynamicLayout) b.style.display = "none";
  1422.                 else b.style.visibility = "hidden";
  1423.                 a.get_role() === k && b.setAttribute(s, "true");
  1424.                 a._clearTimeout()
  1425.             },
  1426.             dispose: function() {
  1427.                 var b = this;
  1428.                 if (b._beginRequestHandlerDelegate !== a) {
  1429.                     b._pageRequestManager.remove_beginRequest(b._beginRequestHandlerDelegate);
  1430.                     b._pageRequestManager.remove_endRequest(b._endRequestHandlerDelegate);
  1431.                     b._beginRequestHandlerDelegate = a;
  1432.                     b._endRequestHandlerDelegate = a
  1433.                 }
  1434.                 b._clearTimeout();
  1435.                 Sys.UI._UpdateProgress.callBaseMethod(b, "dispose")
  1436.             },
  1437.             initialize: function() {
  1438.                 var b = this;
  1439.                 Sys.UI._UpdateProgress.callBaseMethod(b, "initialize");
  1440.                 b.get_role() === k && b.get_element().setAttribute(s, "true");
  1441.                 b._beginRequestHandlerDelegate = Function.createDelegate(b, b._handleBeginRequest);
  1442.                 b._endRequestHandlerDelegate = Function.createDelegate(b, b._handleEndRequest);
  1443.                 b._startDelegate = Function.createDelegate(b, b._startRequest);
  1444.                 if (Sys.WebForms && Sys.WebForms.PageRequestManager) b._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();
  1445.                 if (b._pageRequestManager !== a) {
  1446.                     b._pageRequestManager.add_beginRequest(b._beginRequestHandlerDelegate);
  1447.                     b._pageRequestManager.add_endRequest(b._endRequestHandlerDelegate)
  1448.                 }
  1449.             }
  1450.         };
  1451.         e.registerClass("Sys.UI._UpdateProgress", Sys.UI.Control)
  1452.     }
  1453.     if (window.Sys && Sys.loader) Sys.loader.registerScript("WebForms", ["ComponentModel", "Serialization", "Network"], a);
  1454.     else a()
  1455. })();
  1456. Type.registerNamespace('Sys.WebForms');
  1457. Sys.WebForms.Res = {
  1458.     "PRM_UnknownToken": "Unknown token: \u0027{0}\u0027.",
  1459.     "PRM_MissingPanel": "Could not find UpdatePanel with ID \u0027{0}\u0027. If it is being updated dynamically then it must be inside another UpdatePanel.",
  1460.     "PRM_ServerError": "An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}",
  1461.     "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.\nDetails: {0}",
  1462.     "PRM_TimeoutError": "The server request timed out.",
  1463.     "PRM_ParserErrorDetails": "Error parsing near \u0027{0}\u0027.",
  1464.     "PRM_CannotRegisterTwice": "The PageRequestManager cannot be initialized more than once."
  1465. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement