/* these functions were taken from tour.js in the cv dev branch */

function show_closeup(newJpegName, x, y, popupName) {
	jpegName = newJpegName;
	jpegWidth = x;
	jpegHeight = y;
	// Calculate window size
	var width = new Number(x);
	var height = new Number(y);
	width += 50;
	height += 70;
	var attributes = new String("buttons=none,height=" + height + ",width=" + width + ",resizable=yes");
	closeup = window.open("photo_closeup.html", popupName, attributes);
}

function load_closeup(photoDir) {
	var jpeg = window.opener.jpegName;
	var x = window.opener.jpegWidth;
	var y = window.opener.jpegHeight;
	var output = "";
	output += "<table cellpadding='0' cellspacing='0' border='0' align='center'>";
	output += "		<tr><td>";
	output += "			<img height='" + y + "' width='" + x + "' border='2' src='" + photoDir + jpeg + "_big.jpg' alt='Please wait for photo to load.'><br><br>";
	output += "		</td></tr>";
	output += "		<tr><td align='center'><a href='javascript:window.close();'>CLOSE WINDOW</a></td></tr>";
	output += "</table>";
	document.write(output);
	document.close();
	var width = new Number(x);
	var height = new Number(y);
	window.focus();
}

