﻿function rightclick(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2) && disallowrc) {
alert("Sorry, you do not have permission to right click. ");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3) && disallowrc) {
alert("Sorry, you do not have permission to right click.");
return false;
}
return true;
}
var disallowrc=false;  //default allows right click
// these 3 lines control action
document.onmousedown=rightclick;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=rightclick;
//
function setdisallowrc(st){
disallowrc=st;
return false;
}
