function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE
target.onselectstart=function(){
return false
}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox
target.style.MozUserSelect="none"
else //All others
target.onmousedown=function(){
return false
}
target.style.cursor = "default"
}

disableSelection(document.body) //disable page body

//var alltables=document.getElementsByTagName("table")
//for (var i=0; i<alltables.length; i++)
//disableSelection(alltables[i]) //disable page tables

//var somediv=document.getElementById("nts")
//disableSelection(somediv) //disable DIV selection (id="nts")
