/***************************************************
**                                                **
** Title: Image Protection JavaScript Library     **
** Date: July 26, 2000                            **
** Authors: Pangaea Systems Inc. and Kofi Garbrah **
** Purpose: Causes an "alert box" to Pop-Up with  **
**          a copyright message whenever a user   **
**          "right clicks" on an image.           **
**                                                **
****************************************************/


var copyright_message = 'This image or photo is copyright of the Heritage Community Foundation';

if (navigator.appName == "Netscape") {
	document.captureEvents(Event.MOUSEDOWN);
}

function imageProtect(copyright_message, mousebutton)
{

	if (navigator.appName == "Microsoft Internet Explorer")
	{
		if (mousebutton >= 2)
		{
			//alert(copyright_message); 
			return false;
		}
	}
	else if (navigator.appName == "Netscape")
	{
		if (mousebutton >= 2)
		{
			alert(copyright_message); 
			return false;
		}
	}
	
	
	else return true;
}

function run_protection() 
{
	if (run_protection.arguments.length > 0)
	{ 
		copyright_message = run_protection.arguments[0];
	}

	if (navigator.appName == 'Netscape')
	{
		//alert(copyright_message);
	}
	else 
	{
		imageProtect(copyright_message,event.button);
	}
	return false;
}
