﻿    Sys.Application.initialize = function Sys$_Application$initialize() {
        if (!this._initialized && !this._initializing) {
            this._initializing = true;
            var loadMethodSet = false;
            var initializeDelegate = Function.createDelegate(this, this._doInitialize);

            if (document.addEventListener) {
                loadMethodSet = true;
                document.addEventListener("DOMContentLoaded", initializeDelegate, false);
            }

            if (/WebKit/i.test(navigator.userAgent)) {
                loadMethodSet = true;
                this._load_timer = setInterval(function() {
                    if (/loaded|complete/.test(document.readyState)) {
                        initializeDelegate();
                    }
                }, 10);
            }
            else {
                /*@cc_on@*/
                /*@if (@_win32)
                loadMethodSet = true;
                document.write("<script id=__ie_onload defer src=BLOCKED SCRIPTvoid(0)><\/scr" + "ipt>");
                var deferScript = document.getElementById("__ie_onload");
                if (deferScript) {
                    deferScript.onreadystatechange = function() {
                        if (this.readyState == "complete") {
                            initializeDelegate();
                        }
                    };
                }
                /*@end@*/
            }
            // only if no other method will execute initializeDelegate is                    
            // it wired to the window's load method.  

            if (!loadMethodSet) {
                $addHandler(window, "load", initializeDelegate);
            }
        }
    }
    Sys.Application._doInitialize = function Sys$_Application$_doInitialize() {
        if (this._load_timer !== null) {
            clearInterval(this._load_timer);
            this._load_timer = null;
        }
        Sys._Application.callBaseMethod(this, 'initialize');
        var handler = this.get_events().getHandler("init");
        if (handler) {
            this.beginCreateComponents();
            handler(this, Sys.EventArgs.Empty);
            this.endCreateComponents();
        }
        this.raiseLoad();
        this._initializing = false;
    }
    Sys.Application._loadHandler = function Sys$_Application$_loadHandler() {
        if (this._loadHandlerDelegate) {
            Sys.UI.DomEvent.removeHandler(window, "load", this._loadHandlerDelegate);
            this._loadHandlerDelegate = null;
        }
        this._initializing = true;
        this._doInitialize();
    }