﻿Sys.Application.add_load(ApplicationLoadHandler); function ApplicationLoadHandler() {Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);}function BeginRequest(sender, args){ShowHideLoading(true);}function EndRequest(sender, args){if (args.get_error() != undefined){if(window.location.href.indexOf("localhost") <= 0){window.location.href = "/Marketgate/Error.aspx";}else{ShowHideLoading(false);window.alert("Error: " + args.get_error().message);}}else{ShowHideLoading(false);}}if(typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();