﻿
// Disable the Back-Button //
//window.history.forward(1);

// Use for IE //
function nrcIE(e) {
    if (document.all) {
        var target = window.event ? window.event.srcElement : e ? e.target : null;
        if (target.type != "text" && target.type != "textarea" && target.type != "password") {
            return false;
        }
        return true;
    }
}

// Use for other browsers //
function nrcOB(e) {
    if (e.which == 2 || e.which == 3) {
        var target = window.event ? window.event.srcElement : e ? e.target : null;
        if (target.type != "text" && target.type != "textarea" && target.type != "password") {
            return false;
        }
        return true;
    }
}

// Use for Netscape //
function nrcNS(e) {
    if (document.layers || (document.getElementById && !document.all)) {
        if (e.which == 2 || e.which == 3) {
            return false;
        }
    }
}

// Hide text in statusbar // Not enabled by Default in FireFox //
function hidestatus() {
    window.status = '';
    return true;
}

// Register Handlers at window.load //
if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN | Event.MOUSEOVER | Event.MOUSEOUT);
    document.onmousedown = nrcNS;
}
else {
    document.onmouseover = hidestatus;
    document.onmouseout = hidestatus;
    document.onmousedown = hidestatus;

    if (document.all) {
        document.oncontextmenu = nrcIE;
        document.onmouseup = nrcIE;
    }
    else {
        document.oncontextmenu = nrcOB;
        document.onmouseup = nrcOB;
    }
}

