// JavaScript Document
<!--

var PopUp = false;

function ZoomImage(ImageName, Layout) {

	var ImageWidth, ImageHeight;
	var WindowWidth, WindowHeight;
	var TableWidth, TableHeight;
	var x,y;
	var Table;

// set orientation
	if (Layout == "P") {
		// portrait
		ImageWidth = 250;
		ImageHeight = 380;
	}
	else {
		// landscape
		ImageWidth = 380;
		ImageHeight = 250;
	}

	// size elements
	TableWidth = ImageWidth + 10;
	TableHeight = ImageHeight + 10;
	WindowWidth = TableWidth + 20;
	WindowHeight = TableHeight + 20;
	
	if (PopUp && !PopUp.closed) {
		PopUp.close();
	}
		
	// use screen centre position
	x = ((screen.width / 2) - (WindowWidth / 2));
	y = 0; //((screen.height / 2) - (WindowHeight / 2));
	y = ((screen.height / 2) - (WindowHeight / 2));
	// generate HTML page
	PopUp =	window.open('','Gallery', 'top=' + y + ',left=' + x + ',width=' + WindowWidth + ',height=' + WindowHeight);
	PopUp.document.writeln('<html>\n<head>');
	PopUp.document.writeln('<link href="styles.css" rel="stylesheet" type="text/css">');
	PopUp.document.writeln('<title>Bath Academy - Gallery Image</title>');
	PopUp.document.writeln('\n</head>\n<body  bgcolor="#FFFFFF">\n');
	PopUp.document.writeln('<table bgcolor="#FFFFFF" width="100%" height="100%" border="1" cellpadding="0" cellspacing="5" bordercolor="#5225BA" id="PictureTable">');
	PopUp.document.writeln('<tr>\n<td align="center"><img src=' + "'" + ImageName + "'" + '></td>\n</tr>');
	PopUp.document.writeln('</table>\n</body>\n</html>');
	PopUp.document.close();

	PopUp.focus();
}

// -->