/*******************************************************************
/ Script disables right mouse clicking. This method will disable mouse clicks on
/ images.
/
/ Created: 10/15/2008
/ Creator: Josh Springer
/*
	<!-- Original:  Martin Webb (martin@irt.org) -->
	Disable right click script II (on images)- By Dynamicdrive.com
	For full source, Terms of service, and 100s DTHML scripts
	Visit http://www.dynamicdrive.com
*/
/******************************************************************/
function disableclick(e)
{
	var clickmessage = "All Images are Copyrighted.";

	//alert("Trying");
	if (document.all)
	{
		//alert("Document All:" + e.button);
		if (event.button==2||event.button==3)
		{
			if (event.srcElement.tagName=="IMG")
			{
				alert(clickmessage);
				return false;
			}
		}
	}
	else if (document.layers)
	{
		//alert("Document Layers: " + e.which);
		if (e.which == 3)
		{
			alert(clickmessage);
			return false;
		}
	}
	else if (document.getElementById)
	{
		//alert("GetElementById:" + e.which + " " + e.target.tagName);
		if (e.which==3&&e.target.tagName=="IMG")
		{
			e.preventDefault();
			e.stopPropagation();
			alert(clickmessage);
			return false;
		}
	}
}

/*******************************************************************
/ Startup script to register click events
/
/ Created: 10/15/2008
/ Creator: Josh Springer
/******************************************************************/
if (document.all)
{
	document.onmousedown=disableclick
}
else if (document.getElementById)
{
	document.onmouseup=disableclick
}
else if (document.layers)
{
	for(i=0;i<document.images.length;i++)
	{
		document.images[i].onmousedown=disableclick;
	}
}