var getElementsByClassName = function (param) { return $$(param) };

 Type.registerNamespace("Sys.Net"); Sys.Net.XMLHttpSyncExecutor = function () { if (arguments.length !== 0) { throw Error.parameterCount() } Sys.Net.XMLHttpSyncExecutor.initializeBase(this); var c = this; this._xmlHttpRequest = null; this._webRequest = null; this._responseAvailable = false; this._timedOut = false; this._timer = null; this._aborted = false; this._started = false; this._responseData = null; this._statusCode = null; this._statusText = null; this._headers = null; this._onReadyStateChange = function () { if (c._xmlHttpRequest.readyState === 4) { c._clearTimer(); c._responseAvailable = true; c._responseData = c._xmlHttpRequest.responseText; c._statusCode = c._xmlHttpRequest.status; c._statusText = c._xmlHttpRequest.statusText; c._headers = c._xmlHttpRequest.getAllResponseHeaders(); c._webRequest.completed(Sys.EventArgs.Empty); if (c._xmlHttpRequest != null) { c._xmlHttpRequest.onreadystatechange = Function.emptyMethod; c._xmlHttpRequest = null } } }; this._clearTimer = function b() { if (c._timer != null) { window.clearTimeout(c._timer); c._timer = null } }; this._onTimeout = function a() { if (!c._responseAvailable) { c._clearTimer(); c._timedOut = true; c._xmlHttpRequest.onreadystatechange = Function.emptyMethod; c._xmlHttpRequest.abort(); c._webRequest.completed(Sys.EventArgs.Empty); c._xmlHttpRequest = null } } }; function Sys$Net$XMLHttpSyncExecutor$get_timedOut() { if (arguments.length !== 0) { throw Error.parameterCount() } return this._timedOut } function Sys$Net$XMLHttpSyncExecutor$get_started() { if (arguments.length !== 0) { throw Error.parameterCount() } return this._started } function Sys$Net$XMLHttpSyncExecutor$get_responseAvailable() { if (arguments.length !== 0) { throw Error.parameterCount() } return this._responseAvailable } function Sys$Net$XMLHttpSyncExecutor$get_aborted() { if (arguments.length !== 0) { throw Error.parameterCount() } return this._aborted } function Sys$Net$XMLHttpSyncExecutor$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 a = this._webRequest.get_body(); var h = this._webRequest.get_headers(); this._xmlHttpRequest = new XMLHttpRequest(); this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange; var g = this._webRequest.get_httpVerb(); this._xmlHttpRequest.open(g, this._webRequest.getResolvedUrl(), false); if (h) { for (var i in h) { var f = h[i]; if (typeof (f) !== "function") { this._xmlHttpRequest.setRequestHeader(i, f) } } } if (g.toLowerCase() === "post") { if ((h === null) || !h["Content-Type"]) { this._xmlHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") } if (!a) { a = "" } } var c = this._webRequest.get_timeout(); if (c > 0) { this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), c) } this._xmlHttpRequest.send(a); var b = (document.addEventListener) ? true : false; try { if (b) { ExecuteCallBackSJAX(Sys.Serialization.JavaScriptSerializer.deserialize(this._xmlHttpRequest.responseText)); return true } } catch (d) { return false } this._started = true } function Sys$Net$XMLHttpSyncExecutor$getAllResponseHeaders() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, "getAllResponseHeaders")) } return this._headers } function Sys$Net$XMLHttpSyncExecutor$get_responseData() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, "get_responseData")) } return this._responseData } function Sys$Net$XMLHttpSyncExecutor$get_statusCode() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, "get_statusCode")) } return this._statusCode } function Sys$Net$XMLHttpSyncExecutor$get_statusText() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, "get_statusText")) } return this._statusText } function Sys$Net$XMLHttpSyncExecutor$get_xml() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, "get_xml")) } var a = this._responseData; if ((!a) || (!a.documentElement)) { a = new XMLDOM(this._responseData); if ((!a) || (!a.documentElement)) { return null } } else { if (navigator.userAgent.indexOf("MSIE") !== -1) { a.setProperty("SelectionLanguage", "XPath") } } if ((a.documentElement.namespaceURI === "http://www.mozilla.org/newlayout/xml/parsererror.xml") && (a.documentElement.tagName === "parsererror")) { return null } if (a.documentElement.firstChild && a.documentElement.firstChild.tagName === "parsererror") { return null } return a } function Sys$Net$XMLHttpSyncExecutor$abort() { if (arguments.length !== 0) { throw Error.parameterCount() } if (!this._started) { throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart) } if (this._aborted || this._responseAvailable || this._timedOut) { return } this._aborted = true; this._clearTimer(); if (this._xmlHttpRequest && !this._responseAvailable) { this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; this._xmlHttpRequest.abort(); this._xmlHttpRequest = null; var a = this._webRequest._get_eventHandlerList().getHandler("completed"); if (a) { a(this, Sys.EventArgs.Empty) } } } Sys.Net.XMLHttpSyncExecutor.prototype = { get_timedOut: Sys$Net$XMLHttpSyncExecutor$get_timedOut, get_started: Sys$Net$XMLHttpSyncExecutor$get_started, get_responseAvailable: Sys$Net$XMLHttpSyncExecutor$get_responseAvailable, get_aborted: Sys$Net$XMLHttpSyncExecutor$get_aborted, executeRequest: Sys$Net$XMLHttpSyncExecutor$executeRequest, getAllResponseHeaders: Sys$Net$XMLHttpSyncExecutor$getAllResponseHeaders, get_responseData: Sys$Net$XMLHttpSyncExecutor$get_responseData, get_statusCode: Sys$Net$XMLHttpSyncExecutor$get_statusCode, get_statusText: Sys$Net$XMLHttpSyncExecutor$get_statusText, get_xml: Sys$Net$XMLHttpSyncExecutor$get_xml, abort: Sys$Net$XMLHttpSyncExecutor$abort }; Sys.Net.XMLHttpSyncExecutor.registerClass("Sys.Net.XMLHttpSyncExecutor", Sys.Net.WebRequestExecutor); if (typeof (Sys) != "undefined") { Sys.Application.notifyScriptLoaded() } var callBackSJAX; function SetCallBackSJAX(a) { callBackSJAX = a } function ExecuteCallBackSJAX(a) { if (callBackSJAX) { callBackSJAX(a); SetCallBackSJAX(null) } } function SJAX(c, d, e) { SetCallBackSJAX(e); var b = new Sys.Net.WebRequest(); b.set_url(PageMethods.get_path() + "/" + c); b.set_httpVerb("POST"); var a = Sys.Serialization.JavaScriptSerializer.serialize(d); b.set_body(a); b.get_headers()["Content-Type"] = "application/json; charset=utf-8"; var f = new Sys.Net.XMLHttpSyncExecutor(); b.set_executor(f); b.invoke(); if (f.get_responseAvailable()) { return f.get_object() } return false };
