Type.registerNamespace("ASPCode.net"); ASPCode.net._History = function () { ASPCode.net._History.initializeBase(this); Sys.Application.add_load(Function.createDelegate(this, this._pageLoaded)); this._created = false; }
ASPCode.net._History.prototype = { _pageLoaded: function (sender, args) {
    this._verifyIEFrame(); if (this._created == false)
    { setInterval(Function.createDelegate(this, this._timerCallback), 200); this._historyCurrentHash = 'fitsttimetrigger'; }
    this._created = true;
}, _useFrame: function () {
    if (Sys.Browser.agent == Sys.Browser.InternetExplorer)
        return true; return false;
}, _verifyIEFrame: function () {
    if (this._useFrame() && $get("aspcodenethistory") == null)
    { var a = document.createElement('iframe'); a.setAttribute("id", "aspcodenethistory"); a.setAttribute("width", "0px;"); a.setAttribute("height", "0px;"); document.getElementsByTagName('body')[0].appendChild(a); var history = $get("aspcodenethistory"); var iframe = history.contentWindow.document; iframe.open(); iframe.close(); iframe.location.hash = location.hash; }
}, setLocation: function (sNewHash) {
    var newhash = '#' + sNewHash; location.hash = newhash; this._historyCurrentHash = newhash.replace(/^#/, ''); if (this._useFrame())
    { var histframe = $get("aspcodenethistory"); var iframe = histframe.contentWindow.document; iframe.open(); iframe.close(); iframe.location.hash = location.hash; }
    var handler = this.get_events().getHandler("locationChanged"); if (handler)
    { handler(this, sNewHash); }
}, _timerCallback: function () {
    if (this._useFrame()) {
        var histframe = $get("aspcodenethistory"); var iframe = histframe.contentDocument || histframe.contentWindow.document; var current_hash = iframe.location.hash; if (current_hash.replace(/^#/, '') != this._historyCurrentHash) {
            location.hash = current_hash; this._historyCurrentHash = current_hash.replace(/^#/, ''); var handler = this.get_events().getHandler("locationChanged"); if (handler)
            { handler(this, this._historyCurrentHash); }
        }
    }
    else {
        var current_hash = location.hash; if (current_hash.replace(/^#/, '') != this._historyCurrentHash) {
            var old = this._historyCurrentHash; this._historyCurrentHash = current_hash.replace(/^#/, ''); var handler = this.get_events().getHandler("locationChanged"); if (handler)
            { handler(this, this._historyCurrentHash); }
        }
    }
}, add_locationChanged: function (handler) { this.get_events().addHandler("locationChanged", handler); }, remove_locationChanged: function (handler) { this.get_events().removeHandler("locationChanged", handler); }, dispose: function () { ASPCode.net._History.callBaseMethod(this, 'dispose'); }
}
ASPCode.net._History.descriptor = { properties: [], events: [{ name: 'locationChanged'}]
}
ASPCode.net._History.registerClass('ASPCode.net._History', Sys.Component); ASPCode.net.History = new ASPCode.net._History(); if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 
