﻿
//  TITLE:  Right-click Remove
//  Task:   Removes right click functionality from web pages 
//  Author: Adam Smith
//  Date:   Feb. 11, 2008
//  Resource:   http://javascript.internet.com
function right(e) 
{
    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
        return false;
    else if (navigator.appName == 'Microsoft Internet Explorer' && 
            (event.button == 2 || event.button == 3)) 
    {
        alert("Please contact webmaster@mtisolutions.ca for more information.");
        return false;
    }
    
    return true;
}

// Calls to the Right-Click function
    document.onmousedown=right;
    document.onmouseup=right;
    if (document.layers) window.captureEvents(Event.MOUSEDOWN);
    if (document.layers) window.captureEvents(Event.MOUSEUP);
    window.onmousedown=right;
    window.onmouseup=right;
//  End Calls

