<!--

function Close_Popup(){
	popup.window.close();
	return true;
}

function Pop_Window(x, y, img, caption){
	var totalChars = caption.length;
	var charsPerLine = Math.ceil(x/10);
	var totalLines = Math.ceil(totalChars/charsPerLine) + 1; //Add one for "close window"
	var lineHeight = 12;
	var margins = 20;
	var popUpHeight = y + lineHeight*totalLines + margins;
	var popUpWidth = x+10;
	if (window.popup && window.popup.open && !window.popup.closed)
		Close_Popup();
	popup = window.open("", "nothing", "width=" + (popUpWidth) + ",height=" +  (popUpHeight) +",scrollbars=no,toolbar=no,status=no,dependant=yes");

	popup.document.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" +
	"\n\n" +
	"<html lang=\"en\">" + "\n\n" +
	"<head>" + "\n" +
	"<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" + "\n\n" +
	"<title>Taupo for Tomorrow</title>" + "\n\n" +
	"<style type=\"text/css\">" + "\n" +
	".pix { padding: 0px; border: 1px solid #999999; }" + "\n" +
	"small { font-size: xx-small; font-family: sans-serif; }" + "\n" +
	"p {font-size: 15px;margin:0;}" + "\n" +
	"</style>" + "\n\n" +
	"</head>" + "\n\n" +
	"<body style=\"margin:4px\">");

	popup.document.write('<div align="center"><img src="' + img + '" alt="Click image to close window. " border="0" class="pix" onClick="window.close();">');
	popup.document.write('<p style="text-align: center;padding:3px; margin:0;">'+ caption + '</p>');
	popup.document.write('[ <a href="#" onClick="window.close();">Close</a> ]</div>');
	popup.document.write("</body>" + "\n\n" + "</html>");
}
-->

