var Utility = {};

Utility.zoomImage = function(image, name, width, height, center) {
	// Prepare
	positionX = (center) ? ((screen.width - width) / 2) : (0);
	positionY = (center) ? ((screen.height - height) / 2) : (0);

	// Open window
	features = "width=" + width + ","
				+ "height=" + height + ","
				+ "location=0,"
				+ "menubar=0,"
				+ "resizable=0,"
				+ "scrollbars=0,"
				+ "status=0,"
				+ "titlebar=0,"
				+ "toolbar=0,"
				+ "hotkeys=0,"
				+ "screenx=" + positionX + "," //NN Only
				+ "screeny=" + positionY + "," //NN Only
				+ "left=" + positionX + "," //IE Only
				+ "top=" + positionY; //IE Only

	wh = window.open('', name, features);

	// Write content
	wh.document.write("<html><head><title></title></head><body style=\"margin: 0px; padding: 0px\"><a href=\"#\" onclick=\"window.close()\" title=\"Close zoom image\"><img src=\""+image+"\" width=\""+width+"\" height=\""+height+"\" border=\"0\" alt=\"Image\" /></a></body></html>");
	wh.document.close();

	// Finish
	wh.focus();
};
