/*function disableselect(e){ 
return false 
} 
function reEnable(){ 
return true 
} 
//if IE4+ 
document.onselectstart=new Function ("return false") 
//if NS6 
if (window.sidebar){ 
document.onmousedown=disableselect; 
document.onclick=reEnable; 
} 
*/

function clickIE(){	
	if (document.all) {	return false;}
} 
function clickNS(e){	
	if (document.layers||(document.getElementById&&!document.all)) {		
		if (e.which==1||e.which==2||e.which==3) {	return false;		}	
	}
} 

if (document.layers) {	
document.captureEvents(Event.MOUSEDOWN);	
document.onmousedown=clickNS;
} 
else {	
document.onmouseup=clickNS;	document.oncontextmenu=clickIE;
} 

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;}

if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Opera/x.x or Opera x.x (ignoring remaining decimal places);
 var oprversion=new Number(RegExp.$1); // capture x.x portion and store as a number
 if (oprversion<=10)
  {
	  alert ("Website không hổ trợ trình duyệt Opera do có lỗi bảo mật từ trình duyện này!");
	  window.close();
  }
}



/***********************************************
* Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/*function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
	target.style.cursor = "default"
}

var somediv=document.getElementById("content");
disableSelection(somediv);
*///Sample usages

//disableSelection(document.body) //disable text selection on entire body of page

//var somediv=document.getElementById("mydiv")
//disableSelection(somediv) //disable text selection within DIV with id="mydiv"

//var alltables=document.getElementsByTagName("table")
//for (var i=0; i<alltables.length; i++)
//disableSelection(alltables[i]) //disable text selection within all tables on the page

