﻿function noBack() {

    window.history.forward()
}
noBack();
if (typeof window.event != 'undefined') // IE
    document.onkeydown = function() // IE
    {
        var t = event.srcElement.type;
        var kc = event.keyCode;
        return ((kc != 8) || (t == 'text') ||
             (t == 'textarea') || (t == 'password'))
    }
else
    document.onkeypress = function(e)  // FireFox/Others 
    {
        var t = e.target.type;
        var kc = e.keyCode;
        if ((kc != 8) || (t == 'text') ||
        (t == 'textarea') || (t == 'password'))
            return true
        else {

            return false
        }
    }
window.onload = noBack;
window.onkeypress = noBack;
window.onpageshow = function(evt) { if (evt.persisted) noBack() }
window.onunload = function() { void (0) }

function backButtonOverride() {
    // Work around a Safari bug
    // that sometimes produces a blank page
    setTimeout("backButtonOverrideBody()", 1);

}

function backButtonOverrideBody() {
    // Works if we backed up to get here
    try {
        history.forward();
    } catch (e) {
        // OK to ignore
    }
    // Every quarter-second, try again. The only
    // guaranteed method for Opera, Firefox,
    // and Safari, which don't always call
    // onLoad but *do* resume any timers when
    // returning to a page
    setTimeout("backButtonOverrideBody()", 1);
}
