
document.oncontextmenu=new Function("event.returnValue=false");
document.onselectstart=new Function("event.returnValue=false");
onselect="document.selection.empty()";
oncopy="document.selection.empty()";
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;
} 
function stop(){ 
return false; 
} 
document.oncontextmenu=stop; 

