/* functions to resize, open and close browser windows. *//* This function resizes the browser window to frame an image in theHTML document. Call it from the onLoad handler. */function ResizeWindowToImage(){	var pictureWidth;		// The width in pixels of the display image.	var pictureHeight;		// The height in pixels of the display image.	var windowWidth;		// The width of the display window.	var windowHeight;		// The height of the display window.	var marginH;			// Padding to add to size of window horizontally (x2).	var marginV;			// Padding to add to size of window vertically (x2).	var aspectRatio = 1;	// Ratio of width to height of image.	var maxH;			// Maximum allowed window width.	var maxV;			// Maximum allowed window height.		/* set margins for the document. windows requires wider margins than mac. */	if (getPlatform() == "Macintosh")	{ marginH = 12; marginV = 20; }	else							{ marginH = 15; marginV = 35; }		/* find out how big the users screen is. we need to know so we can calculate	the largest window that we should display. */	maxH = (screen.availWidth - 20); maxV = (screen.availHeight - 20);		/* get the dimensions of the image and size the window accordingly. */	pictureWidth = document.images[0].width;	pictureHeight = document.images[0].height;	windowWidth = pictureWidth + (marginH * 2);	windowHeight = pictureHeight + (marginV * 2);	aspectRatio = pictureWidth/pictureHeight;		/* constrain the size of the window if it is too big. */	if (windowWidth > maxH)	{		windowWidth = maxH;		windowHeight = pictureWidth/aspectRatio;		windowHeight = (windowHeight > maxV) ? maxV : windowHeight;	}	else if (windowHeight > maxV)	{		windowHeight = maxV;		windowWidth = windowHeight * aspectRatio;		windowWidth = (windowWidth > maxH) ? maxH : windowWidth;	}		window.resizeTo(windowWidth, windowHeight);}function OpenImageWindow(theURL,winName){	window.open(theURL,winName,"scrollbars=no");}function OpenImageWindowWithScroll(theURL,winName){	window.open(theURL,winName,"scrollbars=yes");}function CloseWindow(){	window.close();}function getPlatform(){	var agentString = navigator.appVersion.toLowerCase();		if (agentString.indexOf("macintosh") != -1)	{		this.isMac = true;		return "Macintosh";	}	else if (agentString.indexOf("windows") != -1)	{		this.isWindows = true;		return "Windows";	}	else		return "Unknown";}
