function viewsnap (img_src, bgcolor, fgcolor, img_wide, img_high, caption) {
	var scrollbar = 'no';
	var win_wide = img_wide + 100; var win_high = img_high;
	if (win_wide > screen.width) { win_wide = screen.width; scrollbar = 'yes'; }
	if (win_high > screen.height) { win_high = screen.height; scrollbar = 'yes'; }
	var left = (screen.width - win_wide) / 2;
	var top = (screen.height - win_high) / 2;
	var winAttribs =
		'toolbar=0,status=0,menubar=0,resizable=0,directories=0,dependent=yes,'
		+ 'scrollbars=' + scrollbar + ',width=' + win_wide + ',height=' + win_high + ',top=' + top + ',left=' + left;
	var winHandler = window.open('', '_blank', winAttribs);
	var htmlContent =
		'<html><head><title>Snapshot Viewer ('+img_src+')</title><style>'
		+ 'div.image{position:absolute;top:0;left:0;width:'+img_wide+'px;height:'+img_high+'px;'
		+ 'border:0px;padding:0px;z-index:0;overflow:auto;background-color:#c0c0c0;background-image:url(\'' + img_src + '\');background-repeat:no-repeat;}'
		+ 'div.caption{position:absolute;top:0;left:'+img_wide+';width:100px;height:'+img_high+'px;border:0px;'
		+ 'padding:2px;z-index:1;overflow:auto;background-color:'+bgcolor+';color:'+fgcolor+';'
		+ 'font-family:tahoma,arial,verdana,helvetica;font-size:8pt;text-align:left;}</style></head>'
		+ '<body><div class="image" onClick="self.close();"></div><div class="caption">' + caption + '</div></body></html>';
	winHandler.document.open();
	winHandler.document.write(htmlContent);
	winHandler.document.close();
	winHandler.focus();
}

function viewsnapnocap (img_src, img_wide, img_high) {
	var scrollbar = 'no';
	var win_wide = img_wide; var win_high = img_high;
	if (win_wide > screen.width) { win_wide = screen.width; scrollbar = "yes"; }
	if (win_high > screen.height) { win_high = screen.height; scrollbar = "yes"; }
	var left = (screen.width - win_wide) / 2;
	var top = (screen.height - win_high) / 2;
	var winAttribs =
		'toolbar=0,status=0,menubar=0,resizable=0,directories=0,dependent=yes,'
		+ 'scrollbars=' + scrollbar + ',width=' + win_wide + ',height=' + win_high + ',top=' + top + ',left=' + left;
	var winHandler = window.open('', '_blank', winAttribs);
	var htmlContent =
		'<html><head><title>Snapshot Viewer (' + img_src + ')</title><style>'
		+ 'div.image{position:absolute;top:0;left:0;width:' + img_wide + 'px;height:' + img_high + 'px;'
		+ 'border:0px;padding:0px;z-index:0;overflow:auto;background-color:#c0c0c0;'
		+ 'background-image:url(\'' + img_src + '\');background-repeat:no-repeat;}</style>'
		+ '</head><body><div class="image" onClick="self.close();"></div></body></html>';
	winHandler.document.open();
	winHandler.document.write(htmlContent);
	winHandler.document.close();
	winHandler.focus();
}

function aboutmubla () {
	var win_wide = 320;
	var win_high = 240;
	var left = (screen.width - win_wide) / 2;
	var top = (screen.height - win_high) / 2;
	var winAttribs =
		'toolbar=0,status=0,menubar=0,resizable=0,scrollbars=yes,directories=0,dependent=yes'
		+ ',width=' + win_wide + ',height=' + win_high + ',top=' + top + ',left=' + left;
	var winHandler = window.open('', 'about', winAttribs);
	var htmlContent = '<html><head><title>About MUBLA!</title>'
		+ '<style>body{background-color:#000000;font-family:tahoma,arial,verdana,helvetica;font-size:8pt;}'
		+ 'div.text{position:absolute;left:10px;top:10px;width:300px;height:200px;background-color:#404040;'
		+ 'color:#d0d0d0;border:1px #202020 solid;padding:4px;text-align:justify;overflow:auto;}'
		+ 'div.bottom{position:absolute;left:10px;top:211px;width:300px;height:10pt;background-color:transparent;'
		+ 'color:#c0c0c0;padding:2px;text-align:center;}a{text-decoration:underline;color:#f0d000;}</style></head><body>'
		+ '<div class="text"><b>MUBLA! 2004</b> uses PHP, JavaScript, and CSS to create an easy to manage, '
		+ 'user-friendly, and aesthetically-pleasing image gallery. MUBLA! is free to use and can be installed on any '
		+ 'server running PHP4 with GD installed. It features multiple albums, support for a variety of image formats, '
		+ 'five different thumbnailing modes, generated-image caching, built-in album browsing, CSS-based layout, '
		+ 'and much more! To learn more about MUBLA! or to get your own copy of it, please visit '
		+ '<a target="_blank" href="http://sketch.cmatter.com/">Sketchworx Studios</a>.<br /><br />Thanks for using MUBLA!'
		+ '</div><div class="bottom"><a href="#" onClick="javascript:self.close();">Close Window</a></div></body></html>';
	winHandler.document.open();
	winHandler.document.write(htmlContent);
	winHandler.document.close();
	winHandler.focus();
}