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 = 110;"
	output += "			}"
	output += "		window.resizeTo(x,y);"
	output += "		}"

	output += "		else if (window.document.getElementById(\'screenshot\')) {"
	output += "			x = window.document.getElementById(\'screenshot\').width + 40;"
	output += "			y = window.document.getElementById(\'screenshot\').height + 96;"
	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:window.close();"><img src="'+image+'" name="screenshot" id="screenshot" alt="Click here to close this window" border=0></a>'
	
	output += "</td></tr>"
	output += "</table>"
	output += "</BODY>"
	output += "</HTML>"
	
	enlargedwindow.document.write(output);
	enlargedwindow.document.close();
}

openNewWin = function(page,nume,w,h)
{
	var x, y = 0;
	if (screen) {
		x = (screen.availWidth - w) / 2;
		y = (screen.availHeight - h) / 2;
	}
	var newWindow = window.open(page,nume,'width=' + w +',height='+ h +',screenX='+ x +',screenY='+y+',status=no,scrollbars=no');
	newWindow.name = nume;
	return false;
}
