// JS General Utilities
// PHV0508221007
 
// ##### POPUP IMAGES IN APPROPRIATELY SIZED WINDOW #####

function PopupPic(sPicURL) { 
        window.open("./popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
      }

			var temp=self.location.href.split("?");
			var picUrl = (temp.length>1)?temp[1]:"";
			var NS = (navigator.appName=="Netscape")?true:false;

			function fitPic() {
				iWidth = (NS)?window.innerWidth:document.body.clientWidth;
				iHeight = (NS)?window.innerHeight:document.body.clientHeight;
				iWidth = document.images[0].width - iWidth;
				iHeight = document.images[0].height - iHeight;
				window.resizeBy(iWidth, iHeight-1);
				self.focus();
			};
      
// ##### CAPTURE RIGHT MOUSE CLICK EVENT #####

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Copyright © Duntroon Associates Ltd. Please contact us if you wish to use this image");
return false;

}
return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;