function maxWindow(image, title, imageWidth, imageHeight)
{
	var decreaseWidth		// fudge factor to make window maximum size
	var innerWidth			// width inside of window frame available to document
			
	var decreaseHeight		// fudge factor to keep window at maximum size
	var innerHeight			// height inside of window frame available to document

	var imageBorderWidth	// minimum width before image inserted by browser, * 2
	var imageBorderHeight	// minimum height before image inserted by browser, * 2

  	if (1 || isMac())	// assume OS 8 or newer with "platinum" look
						// use for all systems for now
  	{
		var menuBar = 20
		var titleBar = 22
		var leftBorder = 6
		var rightBorder = 7
		var bottomBorder = 7

		if (isNav() && atLeastV(4))
 	 	{
			// fudge factors needed because doesn't size window properly
			fudgeHeight = 2
			imageBorderHeight = 18
			// for innerWidth must remove left window border + right window border
			innerWidth = screen.width - leftBorder - rightBorder
			imageBorderWidth = 16
			// for innerHeight must remove menu bar + title bar + lower window border
			innerHeight = screen.height - menuBar - titleBar - bottomBorder
	 		var newWindow = window.open('', 'newWindow',
				'WIDTH=' + innerWidth + ',HEIGHT=' + (innerHeight - fudgeHeight) + 
				',SCROLLBARS,RESIZEABLE,DEPENDENT')
			newWindow.moveTo(0, 0)
		}
		else if (isMSIE() && atLeastV(4))
		{
			// fudge factors needed because doesn't size window properly
			fudgeWidth = 16
			fudgeHeight = -1
			// max outerWidth = screen.width - 1; max outerHeight = screen.height - 3
			decreaseWidth = 1
			imageBorderWidth = 20
			decreaseHeight = 3
			imageBorderHeight = 30
			// for innerWidth must remove left window border + right window border + exterior border
			innerWidth = screen.width - leftBorder - rightBorder - decreaseWidth
			// for innerHeight must remove menu bar + title bar + lower window border + exterior border
			innerHeight = screen.height - menuBar - titleBar - bottomBorder - decreaseHeight
	 		var newWindow = window.open('', 'newWindow',
				'WIDTH=' + (innerWidth - fudgeWidth) + ',HEIGHT=' + (innerHeight - fudgeHeight) + 
				',SCROLLBARS,RESIZEABLE,DEPENDENT')
			newWindow.moveTo(0, 0)
		}		
		else	// Assume 640 x 480 screen
		{
			imageBorderHeight = 24
			// for innerWidth must remove left window border + right window border
			innerWidth = 640 - leftBorder - rightBorder
 			// for innerHeight must remove menu bar + title bar + lower window border + image border
			innerHeight = 480 - menuBar - titleBar - bottomBorder
			var newWindow = window.open('', 'newWindow',
  				'WIDTH=' + innerWidth + ',HEIGHT=' + innerHeight + ',SCROLLBARS,RESIZEABLE')
		}
  	}
	else if (isWin())
	{
	}

	var scale = Math.min(Math.min((innerWidth - imageBorderWidth)/imageWidth, 
								(innerHeight - imageBorderHeight)/imageHeight), 1)
	var width = Math.round(scale * imageWidth)
  	var height = Math.round(scale * imageHeight)
  	var vspace = Math.max((innerHeight - imageBorderHeight - height)/2, 0)

  	var content = '<HTML><HEAD><TITLE>' + document.title + ': ' + title +
  		'</TITLE></HEAD><BODY bgcolor="black">' + 
  		//'<FONT color="white">' +
		// 	'Application = ' + navigator.appName + '<BR>Version = ' + navigator.appVersion
		// 	'<BR>Screen Width = ' + screen.width + '<BR>Inner Width = ' + innerWidth + 
		//	'<BR>Screen Height = ' + screen.height + '<BR>Inner Height = ' + innerHeight + 
  		//	'<BR>Scale Factor = ' + scale + '<BR>Width = ' + width + '<BR>Height = ' + height + 
		//'</FONT>' +
  		'<CENTER><img src="' + image + '" WIDTH="' + width + '" HEIGHT="' + height + 
		'" VSPACE="' + vspace + '"></CENTER></BODY></HTML>'
	newWindow.document.write(content)
  	newWindow.document.close()
}
