function click() {

if (event.button==2||event.button==3) {

 oncontextmenu='return false';

  }

}

document.onmousedown=click

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

function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}