var largeImageWindow;
function openImage(iPath, w, h) {
	var params;
	params = "width=" + w + ",height=" + h + ",top=" + Math.round((screen.height - h)/2) + ",left=" + Math.round((screen.width - w)/2);
	//alert(params);
	largeImageWindow = open("largeImage.html", "LargeImageWindow", params);
	setTimeout("setImageWindowContent(\"" + iPath + "\", " + w + ", " + h + ")", 100);
}
function setImageWindowContent(iPath, w, h) {
	var d = largeImageWindow.document;
	var t = "<html>";
	t += "<body style=\"margin:0px; background-color:white;\">";
	t += "<img src='" + iPath + "' width=" + w + " height=" + h + " />";
	t += "</body>";
	t += "</html>";
	d.write(t);
	d.close();
	largeImageWindow.focus();
}