

var msgProtectBodyGlobal;
var selectionBodyGlobal;
var msgProtectGlobal = new Array();

function disableRightClickIE(e){

	if (event.button==2 || event.button==3)
		
	if (msgProtectGlobal [event.srcElement.src])
	{
			
alert(msgProtectGlobal [event.srcElement.src]);
	
		return false;}

		else if ((selectionBodyGlobal == "") 
		
		|| (event.srcElement.src.indexOf(selectionBodyGlobal) != -1)){

		alert(msgProtectBodyGlobal);
		
		return false;}}

function disableRightClickFF(e) 
		{
	if (e.which==2||e.which==3) 
		{
		if (msgProtectGlobal [this.src])

				alert(msgProtectGlobal [this.src]);

				else 
			
				alert (msgProtectBodyGlobal);

				return false;}}


function disableRightClickBody("Protected Image - Cannot Be Copied or Saved"ProtectParameter,selectionParameter)
		{
	
		msgProtectBodyGlobal=msgProtectParameter;

		if (selectionParameter) 
		selectionBodyGlobal=selectionParameter;

		else
			
		selectionBodyGlobal="";


		if (document.all) // MS-IE here

		document.onmousedown=disableRightClickIE;


		//else if (document.layers||(document.getElementById) 

		else { // Firefox here
		
		document.captureEvents(Event.MOUSEDOWN);
	
		if (selectionBodyGlobal == "")
		{
			
		document.onmousedown=disableRightClickFF; 
		document.oncontextmenu=new Function("return false");}   
 
		else for (i=0;i<document.images.length;i++)

		if (document.images[i].src.indexOf(selectionBodyGlobal) != -1)
		{
		document.images[i].onmousedown=disableRightClickFF;

				document.images[i].oncontextmenu=new Function("return false");}}}


function disableRightClickImg("Protected Image - Cannot Be Copied or Saved"ProtectParameter,theImage)
	{
	msgProtectGlobal[theImage.src]=msgProtectParameter;

		if (document.all) // MS-IE here

		document.onmousedown=disableRightClickIE;
	
		//else if (document.layers||(document.getElementById) 

		else { 
		// Firefox here

		document.captureEvents(Event.MOUSEDOWN);

		theImage.onmousedown=disableRightClickFF;

		theImage.oncontextmenu=new Function("return false");}}


