ion = ((hashIndex !== -1) ? action.substring(0, hashIndex) : action) + '#' + entry; } if (this._historyFrame && this._historyPointIsNew) { this._ignoreIFrame = true; this._historyPointIsNew = false; var frameDoc = this._historyFrame.contentWindow.document; frameDoc.open("javascript:''"); frameDoc.write("" + (title || document.title) + "parent.Sys.Application._onIFrameLoad('" + entry + "');"); frameDoc.close(); } this._ignoreTimer = false; var currentHash = this.get_stateString(); this._currentEntry = entry; if (entry !== currentHash) { var loc = document.location; if (loc.href.length - loc.hash.length + entry.length > 1024) { throw Error.invalidOperation(Sys.Res.urlMustBeLessThan1024chars); } if (this._isSafari2()) { var history = this._getHistory(); history[window.history.length - this._historyInitialLength + 1] = entry; this._setHistory(history); this._historyLength = window.history.length + 1; var form = document.createElement('form'); form.method = 'get'; form.action = '#' + entry; document.appendChild(form); form.submit(); document.removeChild(form); } else { window.location.hash = entry; } if ((typeof(title) !== 'undefined') && (title !== null)) { document.title = title; } } } } function Sys$_Application$_unloadHandler(event) { this.dispose(); } function Sys$_Application$_updateHiddenField(value) { if (this._clientId) { var serverStateField = document.getElementById(this._clientId); if (serverStateField) { serverStateField.value = value; } } } Sys._Application.prototype = { _creatingComponents: false, _disposing: false, get_isCreatingComponents: Sys$_Application$get_isCreatingComponents, get_stateString: Sys$_Application$get_stateString, get_enableHistory: Sys$_Application$get_enableHistory, set_enableHistory: Sys$_Application$set_enableHistory, add_init: Sys$_Application$add_init, remove_init: Sys$_Application$remove_init, add_load: Sys$_Application$add_load, remove_load: Sys$_Application$remove_load, add_navigate: Sys$_Application$add_navigate, remove_navigate: Sys$_Application$remove_navigate, add_unload: Sys$_Application$add_unload, remove_unload: Sys$_Application$remove_unload, addComponent: Sys$_Application$addComponent, addHistoryPoint: Sys$_Application$addHistoryPoint, beginCreateComponents: Sys$_Application$beginCreateComponents, dispose: Sys$_Application$dispose, endCreateComponents: Sys$_Application$endCreateComponents, findComponent: Sys$_Application$findComponent, getComponents: Sys$_Application$getComponents, initialize: Sys$_Application$initialize, notifyScriptLoaded: Sys$_Application$notifyScriptLoaded, registerDisposableObject: Sys$_Application$registerDisposableObject, raiseLoad: Sys$_Application$raiseLoad, removeComponent: Sys$_Application$removeComponent, setServerId: Sys$_Application$setServerId, setServerState: Sys$_Application$setServerState, unregisterDisposableObject: Sys$_Application$unregisterDisposableObject, _addComponentToSecondPass: Sys$_Application$_addComponentToSecondPass, _deserializeState: Sys$_Application$_deserializeState, _doInitialize: Sys$_Application$_doInitialize, _enableHistoryInScriptManager: Sys$_Application$_enableHistoryInScriptManager, _ensureHistory: Sys$_Application$_ensureHistory, _getHistory: Sys$_Application$_getHistory, _isSafari2: Sys$_Application$_isSafari2, _loadHandler: Sys$_Application$_loadHandler, _navigate: Sys$_Application$_navigate, _onIdle: Sys$_Application$_onIdle, _onIFrameLoad: Sys$_Application$_onIFrameLoad, _onPageRequestManagerBeginRequest: Sys$_Application$_onPageRequestManagerBeginRequest, _onPageRequestManagerEndRequest: Sys$_Application$_onPageRequestManagerEndRequest, _raiseNavigate: Sys$_Application$_raiseNavigate, _serializeState: Sys$_Application$_serializeState, _setHistory: Sys$_Application$_setHistory, _setState: Sys$_Application$_setState, _unloadHandler: Sys$_Application$_unloadHandler, _updateHiddenField: Sys$_Application$_updateHiddenField } Sys._Application.registerClass('Sys._Application', Sys.Component, Sys.IContainer); Sys.Application = new Sys._Application(); var $find = Sys.Application.findComponent; Type.registerNamespace('Sys.Net'); Sys.Net.WebRequestExecutor = function Sys$Net$WebRequestExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = null; this._resultObject = null; } function Sys$Net$WebRequestExecutor$get_webRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._webRequest; } function Sys$Net$WebRequestExecutor$_set_webRequest(value) { if (this.get_started()) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'set_webRequest')); } this._webRequest = value; } function Sys$Net$WebRequestExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseData() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusText() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_xml() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_object() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._resultObject) { this._resultObject = Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData()); } return this._resultObject; } function Sys$Net$WebRequestExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$abort() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getResponseHeader(header) { /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getAllResponseHeaders() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } Sys.Net.WebRequestExecutor.prototype = { get_webRequest: Sys$Net$WebRequestExecutor$get_webRequest, _set_webRequest: Sys$Net$WebRequestExecutor$_set_webRequest, get_started: Sys$Net$WebRequestExecutor$get_started, get_responseAvailable: Sys$Net$WebRequestExecutor$get_responseAvailable, get_timedOut: Sys$Net$WebRequestExecutor$get_timedOut, get_aborted: Sys$Net$WebRequestExecutor$get_aborted, get_responseData: Sys$Net$WebRequestExecutor$get_responseData, get_statusCode: Sys$Net$WebRequestExecutor$get_statusCode, get_statusText: Sys$Net$WebRequestExecutor$get_statusText, get_xml: Sys$Net$WebRequestExecutor$get_xml, get_object: Sys$Net$WebRequestExecutor$get_object, executeRequest: Sys$Net$WebRequestExecutor$executeRequest, abort: Sys$Net$WebRequestExecutor$abort, getResponseHeader: Sys$Net$WebRequestExecutor$getResponseHeader, getAllResponseHeaders: Sys$Net$WebRequestExecutor$getAllResponseHeaders } Sys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor'); Sys.Net.XMLDOM = function Sys$Net$XMLDOM(markup) { /// /// var e = Function._validateParams(arguments, [ {name: "markup", type: String} ]); if (e) throw e; if (!window.DOMParser) { var progIDs = [ 'Msxml2.DOMDocument.3.0', 'Msxml2.DOMDocument' ]; for (var i = 0, l = progIDs.length; i < l; i++) { try { var xmlDOM = new ActiveXObject(progIDs[i]); xmlDOM.async = false; xmlDOM.loadXML(markup); xmlDOM.setProperty('SelectionLanguage', 'XPath'); return xmlDOM; } catch (ex) { } } } else { try { var domParser = new window.DOMParser(); return domParser.parseFromString(markup, 'text/xml'); } catch (ex) { } } return null; } Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Net.XMLHttpExecutor.initializeBase(this); var _this = this; this._xmlHttpRequest = null; this._webRequest = null; this._responseAvailable = false; this._timedOut = false; this._timer = null; this._aborted = false; this._started = false; this._onReadyStateChange = (function () { if (_this._xmlHttpRequest.readyState === 4 ) { try { if (typeof(_this._xmlHttpRequest.status) === "undefined") { return; } } catch(ex) { return; } _this._clearTimer(); _this._responseAvailable = true; try { _this._webRequest.completed(Sys.EventArgs.Empty); } finally { if (_this._xmlHttpRequest != null) { _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest = null; } } } }); this._clearTimer = (function() { if (_this._timer != null) { window.clearTimeout(_this._timer); _this._timer = null; } }); this._onTimeout = (function() { if (!_this._responseAvailable) { _this._clearTimer(); _this._timedOut = true; _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest.abort(); _this._webRequest.completed(Sys.EventArgs.Empty); _this._xmlHttpRequest = null; } }); } function Sys$Net$XMLHttpExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timedOut; } function Sys$Net$XMLHttpExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._started; } function Sys$Net$XMLHttpExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._responseAvailable; } function Sys$Net$XMLHttpExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._aborted; } function Sys$Net$XMLHttpExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = this.get_webRequest(); if (this._started) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'executeRequest')); } if (this._webRequest === null) { throw Error.invalidOperation(Sys.Res.nullWebRequest); } var body = this._webRequest.get_body(); var headers = this._webRequest.get_headers(); this._xmlHttpRequest = new XMLHttpRequest(); this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange; var verb = this._webRequest.get_httpVerb(); this._xmlHttpRequest.open(verb, this._webRequest.getResolvedUrl(), true ); if (headers) { for (var header in headers) { var val = headers[header]; if (typeof(val) !== "function") this._xmlHttpRequest.setRequestHeader(header, val); } } if (verb.toLowerCase() === "post") { if ((headers === null) || !headers['Content-Type']) { this._xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); } if (!body) { body = ""; } } var timeout = this._webRequest.get_timeout(); if (timeout > 0) { this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout); } this._xmlHttpRequest.send(body); this._started = true; } function Sys$Net$XMLHttpExecutor$getResponseHeader(header) { /// /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getResponseHeader')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getResponseHeader')); } var result; try { result = this._xmlHttpRequest.getResponseHeader(header); } catch (e) { } if (!result) result = ""; return result; } function Sys$Net$XMLHttpExecutor$getAllResponseHeaders() {hbin