//
// Copyright 2004-2007 Planetography
//

var click_msg="Images and Content Copyright © Lance Allred/Planetography and Windflower Waters/Planetography."

function clickcheck (event)
{
//alert ("got event");
	event.stopPropagation ();
//handle_clickNS (event);
//	var isIE = navigator.appName.indexOf("Microsoft") != -1;
//	if (isIE) {
//		handle_clickIE ();
//	} else {
//		handle_clickNS ();
//	}
}


function handle_clickIE (event_id) {
	if (document.all) {
		if (event.button == 2) {
			alert (click_msg);
			return false;
		}
	}
	if (document.layers) {
		if (event_id.which == 3) {
			alert (click_msg);
			return false;
		}
	}
}

function handle_clickNS (event) {
	if (event.which == 3) {
		alert (click_msg);
		return false;
	} else {
		window.routeEvent (event);
	}
}


function set_onclick_handler (id) 
{
	if (document.implementation.hasFeature ("MouseEvents","2.0")) {
//alert ("In the 1st path");
		var img = document.getElementById (id);
		img.addEventListener ('click',function (e) { clickcheck (e);},false);
		return;
	}
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	if (isIE) {
//alert ("In the 2nd path");
		if (document.layers) {
//alert ("In the 2nd path, part 2");
			document.captureEvents (Event.MOUSEUP);
		}
		document.onmouseup = handle_clickIE;
	} else {
//alert ("In the 3rd path");
		document.captureEvents (Event.MOUSEUP);
		document.onmouseup = handle_clickNS;
	}
}
