var 		 win = (navigator.appVersion.toUpperCase().indexOf('WIN') != -1) ? true : false; // Windows
var 		 mac = (navigator.appVersion.toUpperCase().indexOf('MAC') != -1) ? true : false; // Mac
var 		  XP = (win && navigator.appVersion.toUpperCase().indexOf('XP') != -1) ? true : false; // XP;
var 	   webtv = (navigator.userAgent.toUpperCase().indexOf("WEBTV") != -1) ? true : false; // WebTV
var 		  ie = (navigator.userAgent.toUpperCase().indexOf("IE") != -1) ? true : false; // ie
var 		ie55 = (ie && navigator.appVersion.indexOf(5.5) != -1) ? true : false; // ie 5.5
var 		 ie6 = (ie && parseInt(navigator.appVersion) >= 6) ? true : false; // ie 6+
var 		  ns = (navigator.appName.toUpperCase().indexOf('NETS') != -1) ? true : false; // Netscape 6+
var 		 ns6 = (ns && parseInt(navigator.appVersion) >= 5) ? true : false; // Netscape 6+
var 	   opera = (navigator.userAgent.toUpperCase().indexOf("OPERA") != -1) ? true : false; // opera

function click(e) {
	var ctrlPress = false;
	var msg = "Thanks for viewing my work.\n\nUnless otherwise noted, all images on this website are Copyright © Andrea Thompson.\nAll rights reserved. The reproduction, copying, saving, altering, or manipulating of these\nimages, without my express written permission, is strictly prohibited.";
	if (ns && (e.which == 3)) {
		if (ns6) {
			alert(msg);
		} else {
			var mString = (e.modifiers+32).toString(2).substring(3,6);
			ctrlPress = (mString.charAt(1) == "1");
			if (!ctrlPress) {
				alert(msg);
				return false;
			} else {
				return true;
			}
		}
	} else if (ie && (window.event.button == 2)) {
		if (event.button == 2) {
			if (event.ctrlKey) {
				return true;
			} else {
				alert(msg);
				return false;
			}
		}
	} else return true;
}
if (ns) document.captureEvents(Event.MOUSEDOWN || Event.CLICK);
document.onclick = click;
document.onmousedown = click;
