document.oncontextmenu = new Function("return false;");

if (window.addEventListener) {

    window.addEventListener("dragover", function (e) {
        e = e || event;
        e.preventDefault();
    }, false);
    window.addEventListener("drop", function (e) {
        e = e || event;
        e.preventDefault();
    }, false);
} else if (window.attachEvent) {

    document.body.ondrop = function (e) {
        e = e || event;
        e.returnValue = false;
    };
};