<!-- Hiding script from old browsers
//----------------------------------------------------------------------
// IMGSEC.JS
// Based on several publicly available image protection scripts
// Enhanced by Daniel G. Beckett, Jr.
// Created: 26 Nov 2003
// Edited:  21 Dec 2003
//----------------------------------------------------------------------
// This script is intended to minimize the risk of image theft through a
// variety of methods. See also imgsec-test.php, imgsec-meta.html, 
// imgsec.php, and imgsec.htaccess for a complete approach to preventing 
// image theft.
//----------------------------------------------------------------------
// This script is configurable to prevent right clicking on all images on
// a page by passing the value:all to function:trap via the variable:type
// (must be called via the onLoad method in the HTML BODY tag).
// Altneratively, a specific image can be protected by passing a number
// to function:trap that corresponds to the document.image[subscript] of 
// the image you want to protect. This allows some images to be used as
// clickable hyperlinks without allow them to be stolen with the right
// click method. It further prevents the primary image from being clicked
// on at all. 
//----------------------------------------------------------------------
// Additionally, the script can be configured for "silent" operation
// (default behavior) so that disallowed clicks don't do anything at all,
// of if desired, can pop an alert displaying the value of var:msg. 
// var:msg can contain anything; the example below will display a 
// copyright notice with a dynamically generated year so that the notice
// is always up to date
//----------------------------------------------------------------------

// Set this to 1 if you want to display alerts; set to 0 if not
var noisy=0;

var z=0;
function right(e) {
	var myDate = new Date();
	var yyyy = myDate.getYear();
	var msg = "Copyright 1996-"+yyyy+" by Daniel G. Beckett, Jr. All Rights Reserved.";
	if (z){
		//if we're on a thumbnail page, we want to allow left clicking, but not right clicking
		if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
			if (noisy){
				alert(msg);
			}
			return false;
		}
		if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
			if (noisy){
				alert(msg);
			}
			return false;
		}
		else return true;
	} else {
		//if we're on a display page, we want to disallow all mouse clicks on the hi-res image
		if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2 || e.which == 1)){
			if (noisy){
				alert(msg);
			}
			return false;
		}
		if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 1 || event.button == 2 || event.button == 3)) {
			if (noisy){
				alert(msg);
			}
			return false;
		}
		else return true;
	}
}

function trap(type){
	if(document.images){
		if (type == "all"){
			//if we're on a thumbnail page, protect all of the images
			for(i=0;i<document.images.length;i++){
				document.images[i].onmousedown = right;
				document.images[i].onmouseup = right;
			}
			z=type;
		} else {
			//if we're on a display page, we only care about the hi-res image
			//the "type" variable should pass a number that corresponds to 
			//the document.image index for the hi-res image.
			//the [type] variable should contain a subscript corresponding
			//to the image you want to protect from the document.images array.
			document.images[type].onmousedown = right;
			document.images[type].onmouseup = right;
		}
		document.oncontextmenu=new Function("return false");
	}
}

//var message="Function Disabled!";
//
/////////////////////////////////////
//function clickIE4(){
//if (event.button==2){
//alert(message);
//return false;
//}
//}
//
//function clickNS4(e){
//if (document.layers||document.getElementById&&!document.all){
//if (e.which==2||e.which==3){
//alert(message);
//return false;
//}
//}
//}
//
//if (document.layers){
//document.captureEvents(Event.MOUSEDOWN);
//document.onmousedown=clickNS4;
//}
//else if (document.all&&!document.getElementById){
//document.onmousedown=clickIE4;
//}
//
//document.oncontextmenu=new Function("alert(message);return false")


//-->

