//Open viewer in appropriate sized windows and center on screen
function openViewer(strViewer, strURL)
{
	// Initialise defaults
	var strScroll = "no";

	//Get viewer properties
	switch (strViewer)
	{
		case "vt":
			var intWidth = 600, intHeight = 475;
			break;

		case "fp":
			var intWidth = 685, intHeight = 495;
			break;

		case "pb":
			var intWidth = 530, intHeight = 512;
			break;

		case "ss":
			var intWidth = 530, intHeight = 597;

			// Check screen size
			if (screen.height < 700)
			{
				var strScroll = "yes";
				intWidth = 550, intHeight = 497;
			}

			break;
	}

	//Get center co-ordinates
	var intLeft = (screen.width) ? (screen.width - intWidth) / 2 : 0;
	var intTop = (screen.height) ? (screen.height - intHeight) /2 : 0;

	//open viewer window
	var strSettings = "height=" + intHeight + ",left=" + intLeft + ",top=" + intTop + ",width=" + intWidth + ",resizeable=0,scrollbars=" + strScroll;
	window.open(strURL, "_blank", strSettings)
}





