<!--
function right(e) {
	if (navigator.appName == 'Netscape' && e.which == 3) {
		return false;
	} else
	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		return false;
	}
	return true;
}

var message="Thank you for visiting Hua Yang Group Website." // Message for the alert box
// Don't edit below!
function click(e) {
	if (document.all) {
		if (event.button == 2) {
			alert(message);
			return false;
		}
	}
	if (document.layers) {
		if (e.which == 3) {
			alert(message);
			return false;
		}
	}
}

var main_location = "http://www.huayang.com.sg/";
var php_location = "http://www.huayang.com.sg/";

function init_protect() {
	var is_ns6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
	//disable right click
	if (is_ns6)
		document.addEventListener('mousedown',click,false);
	else if (document.layers)
		document.captureEvents(Event.MOUSEDOWN);
	else
		document.onmousedown=click;
	document.oncontextmenu=new Function("return false");

	//disable text selection
	//if IE4+
	document.onselectstart=new Function ("return false")
	//if NS6
	if (window.sidebar){
		document.onmousedown=disableselect
		document.onclick=reEnable
	}
	
	if ((top.window) && (top.window.location) && (top.window.location.href)) {
		if (top.window.location.href.indexOf(main_location+"index.html") == -1) {
	   	top.window.location.href = main_location+"index.html";
   	}
	} 
}

init_protect();

//-->

