document.body.oncontextmenu=function rightclick(){ window.event.returnvalue= false;}
var omitformtags=[input, textarea, select]
omitformtags=omitformtags.join(|)
function disableselect(e){
if (omitformtags.indexof(e.target.tagname.tolowercase())==-1)
return false
}
function reenable(){
return true
}
if (typeof document.onselectstart!=undefined)
document.onselectstart=new function (return false)
else{
document.onmousedown=disableselect
document.onmouseup=reenable
}