if (document.layers) {
  document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=clickHandler;
function clickHandler(myEvent) {
  if (((document.all) && (event.button == 2)) || ((document.layers) && (myEvent.which == 3))) {
    alert("Ooops!\nScans property of SAMMYSoftware.\nUnauthorized duplication is prohibited!!!");
    return false;
  }
}