//KONKEL - simple popup script that also resizes the window bassed off the image size


function imagepopup(image, caption) {
	
	if(caption===undefined){
		caption = '';
	}
	newwindow2=window.open('','name','resizable=1,height=50,width=50');
	var tmp = newwindow2.document;
	tmp.write('<html><head><title>popup</title>');
	tmp.write('<script type="text/javascript">');
	tmp.write(' var NS = (navigator.appName=="Netscape")?true:false;');
	tmp.write('function resizeMe() {');
	tmp.write('iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
	tmp.write('iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
	tmp.write('iWidth = document.images[0].width - iWidth;');
	tmp.write('iHeight = document.images[0].height - iHeight;');
	tmp.write('window.resizeBy(iWidth, (iHeight+75));');
	tmp.write(' self.focus();};');
	tmp.write('</script>');
	tmp.write('</head><body style="margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;" onload=\'resizeMe();\'>');
	//tmp.write('<p><a href="javascript:alert(self.location.href)">view location</a>.</p>');
	tmp.write('<img src="');
	tmp.write(image);
	tmp.write('">');
	tmp.write('<div style="font-weight: bold; font-size: 12px; font-family:verdana, arial, helvetica; padding:10px;">' + caption + '</div>');
	tmp.write('<div align="center"><a href="javascript:self.close()">close</a></div>');
	tmp.write('</body></html>');
	tmp.close();

	
}