var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function showImage(theImage) {
	 var theURL = "image.htm"
	 self.theImage = theImage;
	 if (!document.popUpWindow) {
	 	popUpWindow = window.open(theURL,'popUpWindow','resizable=yes,width=350,height=350,status=yes');
		popUpWindow.focus();
		if (popUpWindow.opener == null) { popUpWindow.opener = self };
	 } else {
	 	popUpWindow.location = theURL;
	 }
	 return false;
}
function fitWindowSize() {
	if (isNav4 && window.innerHeight != (MM_findObj("imgImage").height + 20)) {
		window.innerHeight = MM_findObj("imgImage").height + 20;
		setTimeout(fitWindowSize,250);
	}
	if (isIE4) {
		if (MM_findObj("imgImage").readyState == "uninitialized") {
			setTimeout(fitWindowSize,250);
		};
		window.resizeTo(350, 350);
		height = 350 - (document.body.clientHeight -  MM_findObj("imgImage").height) + 20;
		width = 350 - (document.body.clientWidth -  MM_findObj("imgImage").width);
		window.resizeTo(Math.max(width,350), height);
   }
}
function swapImage () {
	MM_findObj("imgImage").src = opener.theImage;
	fitWindowSize();
}