var showWin = null;
function picturePopup(pic, wi, hi) {
	if(!wi) 	popupWidth 	= 10;
	else		popupWidth 	= wi;
	if(!hi)		popupHeight	= 10;
	else		popupHeight	= hi;
	if(showWin != null) {
		if(!showWin.closed) {
			showWin.close();
		}
		showWin = window.open("",'window','toolbar=no,width='+popupWidth+',height='+popupHeight+',location=0,directories=no,status=no,scrollbars=auto,resizable=yes,menubar=no');
		showWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
		showWin.document.write('<html>');
		showWin.document.write('<head>');
		showWin.document.write('	<title>'+pic+'</title>');
		showWin.document.write('	<script language="JavaScript" type="text/javascript">');
		showWin.document.write('	var NS = (navigator.appName=="Netscape")?true:false;');
		showWin.document.write('	function fitPic() {');
		showWin.document.write('		if(NS){');
		showWin.document.write('			window.resizeTo(document.images[0].width , document.images[0].height + 50);');
		showWin.document.write('		} else {');
		showWin.document.write('			window.resizeTo(document.images[0].width + 13, document.images[0].height + 69);');
		showWin.document.write('		}');
		showWin.document.write('		self.focus();');
		showWin.document.write('	}');
		showWin.document.write('	</script>');
		showWin.document.write('</head>');
		showWin.document.write('<body bgcolor="#FFFFFF" onLoad="fitPic()" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onClick="window.close()" onBlur="window.close()">');
		showWin.document.write('<img src='+pic+' border="0" alt=""/>');
		showWin.document.write('</body>');
		showWin.document.write('</html>');
		showWin.document.close() ;
		showWin.focus();
	}
	if (showWin == null) {
		showWin = window.open("",'window','toolbar=no,location=0,width='+popupWidth+',height='+popupHeight+',directories=no,status=no,scrollbars=auto,resizable=yes,menubar=no');
		showWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
		showWin.document.write('<html>');
		showWin.document.write('<head>');
		showWin.document.write('	<title>'+pic+'</title>');
		showWin.document.write('	<script language="JavaScript" type="text/javascript">');
		showWin.document.write('	var NS = (navigator.appName=="Netscape")?true:false;');
		showWin.document.write('	function fitPic() {');
		showWin.document.write('		if(NS){');
		showWin.document.write('			window.resizeTo(document.images[0].width , document.images[0].height + 50);');
		showWin.document.write('		} else {');
		showWin.document.write('			window.resizeTo(document.images[0].width + 13, document.images[0].height + 69);');
		showWin.document.write('		}');
		showWin.document.write('		self.focus();');
		showWin.document.write('	}');
		showWin.document.write('	</script>');
		showWin.document.write('</head>');
		showWin.document.write('<body onLoad="fitPic()" bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onClick="window.close()" onBlur="window.close()">');
		showWin.document.write('<img src='+pic+' border="0" alt=""/>');
		showWin.document.write('</body>');
		showWin.document.write('</html>');
		showWin.document.close() ;
		showWin.focus();
	}
}

function openPopup(pop, wi, hi) {
	if(!wi) 	popupWidth 	= 800;
	else		popupWidth 	= wi;
	if(!hi)		popupHeight	= 600;
	else		popupHeight	= hi;
	showWin = window.open(pop,'window','toolbar=no,width='+popupWidth+',height='+popupHeight+',location=0,directories=no,status=no,resizable=yes,menubar=no');
	showWin.focus();
}