// JavaScript Document


function ImageWindow(sImgPath, sMessage)
{

	var sCredits = ""
	if (sImgPath.indexOf("cpl")!=-1)
		sCredits = "Cleveland Public Library";
	else if (sImgPath.indexOf("mb")!=-1)
		sCredits = "Mitch Berbrier";


	var sContent = "";
	sContent += "<html><head><title>Cultural Gardens</title>\n";	
	sContent += "<script>\n";	
	sContent += "	function makefit()\n";
	sContent += "	{\n";
	sContent += "		if (document.all)\n";
	sContent += "			window.resizeTo(document.images[0].width + 10, document.images[0].height + 100);\n";	
	sContent += "		else if (document.layers)\n";
	sContent += "			window.resizeTo(document.images[0].width, document.images[0].height + 100);\n";	
	sContent += "	}\n";
	sContent += "</script>\n";			
	sContent += "</head>\n";
	sContent += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#FFF3B5>\n";
	sContent += "<a href='Javascript: window.close();'><img src='" + sImgPath + "' onload='makefit()' border=0></a><br><br>\n";
	sContent += "<div align=center>" + sMessage + "<br>" + sCredits + "</div>\n";
	sContent += "</body></html>\n";	


	var oWindow = window.open('', 'ImageViewerWindow', 'top=100,left=100,location=0,status=0,toolbar=0,titlebar=0,menubar=0');
	oWindow.document.write(sContent);
	oWindow.document.close();
	return;

}

