codeNS = navigator.appName=="Netscape"
codeIE = navigator.appName=="Microsoft Internet Explorer"
function noclick(e) {
if (codeNS && e.which > 1)  return false
else if (codeIE && (event.button >1))   return false;
}
document.onmousedown = noclick;
document.oncontextmenu=new Function("return false")
if (document.layers) window.captureEvents(Event.MOUSEDOWN);