// -- Simple protection --
function onRightMouseDown(e)
{
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
	{
		event.cancelBubble = true;
		event.returnValue = false;
		alert ("This webpage is powered by JavaScript.  Copyright (c) 2006 Ricky Yin et al.");
		return false;
	}
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))
	{
		event.cancelBubble = true;
		event.returnValue = false;
		alert ("This webpage is powered by JavaScript.  Copyright (c) 2006 Ricky Yin et al.");
		return false;
	}
	return true;
}

function noContextMenu()
{
	event.cancelBubble = true;
	event.returnValue = false;
	return false;
}


function initMouse ()
{
	document.oncontextmenu = noContextMenu;
	document.onmousedown=onRightMouseDown;
	if (document.layers)
	{
		window.captureEvents(Event.MOUSEDOWN);
	}
	window.onmousedown=onRightMouseDown;
}
