var x = '';
var y = '';
var enlargedwindow;
function EnlargeImage(image) {
	var output = "";
	enlargedwindow = window.open("","GHEnlargedScreenshot","height=200,width=50,resize=yes,scrolling=no");
	
	output += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'
	output += "<html>"
	output += "<head>"
	output += "<title>Preview screenshot</title>"

	output += "<script language=javascript>"

	output += "function ResizePopup() {"
	output += "		if (window.screenshot) {"
	output += "			x = window.screenshot.width + 24;"
	output += "			y = window.screenshot.height + 40;"
	output += "			if (x < 200 && y < 80) {"
	output += "				x = 200;"
	output += "				y = 80;"
	output += "			}"
	output += "		window.resizeTo(x,y);"
	output += "		}"

	output += "		else if (window.document.getElementById(\'screenshot\')) {"
	output += "			x = window.document.getElementById(\'screenshot\').width + 30;"
	output += "			y = window.document.getElementById(\'screenshot\').height + 30;"
	output += "			if (x < 600 && y < 300) {"
	output += "				x = 600;"
	output += "				y = 400;"
	output += "			}"
	output += "		window.resizeTo(x,y);"
	output += "		}"

	output += "		}"
	output += "		"
	output += "		function CenterPopup() {"
	output += "			window.moveTo((screen.width-x)/2,(screen.height-y)/2);"
	output += "		}"
	output += "</script>"
	output += "</head>"
	output += '<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor="#FFFFFF" onload="self.focus();ResizePopup();CenterPopup();" onblur="self.close();">'
	output += '<table style="width: 100%; height: 100%; background-image: url(\'images/loading.gif\'); background-repeat: no-repeat; background-position: 50% 50%;" cellspacing=0 cellpadding=5>'
	output += "<tr><td align=center valign=middle>"
	output += '<a href="javascript:self.close();"><img src="'+image+'" name="screenshot" id="screenshot" alt="Close this window" border=0></a>'

	output += "</td></tr>"
	output += "</table>"
	output += "</body>"
	output += "</html>"

	enlargedwindow.document.write(output);
	enlargedwindow.document.close();
}