
// ---------------- Pop up an image, centered, and around 680 pixels wide
function popupImage( image ){
	// Positions
	w=640;
	h=480;
	sw=(screen.width / 2);
	sh=(screen.height / 2);
	x = sw - (w / 2);
	y = sh - (h / 2);
	
	// Display
	toolbar_str =  'no';
	menubar_str =  'no';
	statusbar_str = 'no';
	scrollbar_str = 'no';
	resizable_str = 'no';
	var popwindow = window.open( '', 'popupimage', 'left='+x+',top='+y+',width='+w+',height='+h+
		',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+
		',scrollbars='+scrollbar_str+',resizable='+resizable_str);
	popwindow.document.write( '<html><head>\n<title>Click on the image to close</title>\n</head>');
	popwindow.document.write( '<body style="margin: 0; padding: 0;">\n');
	popwindow.document.write( '<script language=\'javascript\'>\n' );
	popwindow.document.write( 'function fixSize(){\n');
	popwindow.document.write( '		sw=(screen.width / 2);\n' );
	popwindow.document.write( '		sh=(screen.height / 2);\n' );
	popwindow.document.write( '       x = ' + sw + ' - (document.images["lg"].width / 2);\n');
	popwindow.document.write( '       y = ' + sh + ' - (document.images["lg"].height / 2);\n');
	popwindow.document.write( '       window.resizeBy( (document.images["lg"].width - 640), (document.images["lg"].height - 480) );\n' );
	popwindow.document.write( '       window.moveTo( x, y );\n');
	popwindow.document.write( '       self.focus();\n' );
	popwindow.document.write( '}\n' );
	popwindow.document.write( '</script>\n');
	popwindow.document.write( '<a href=\"#\" onClick=\"window.close();\"><img name="lg" onLoad=\"fixSize()\" src=\"' + image + '\" border=0></a>\n');
	popwindow.document.write( '</body></html>\n');
}

