	// The following code scales all page content to display
	// consistently on any resolution screen.  The goal is to
	// keep the basic page appearance the same across resolution,
	// but to render it at lower resolution (similar size) on
	// monitors with less than 1280 pixels horizontal resolution

	// First we calculate the neccesary scaling factor
	var screenPercentage = ((screen.width * 100) / 1280); // Design is based on 1280 screen
	if(screenPercentage > 100) screenPercentage = 100; // But, we do not want to multiply pixels for larger screens

	var screenMultiplier = screenPercentage / 100; // Design is based on 1280 screen
	
	// Then we calculate the sizes of all screen elements
	// IMAGES
	var FullImageWidth = 640 * screenMultiplier;
	var FullImageHeight = 480 * screenMultiplier
	var HalfImageWidth = 320 * screenMultiplier;
	var HalfImageHeight = 240 * screenMultiplier
	var ButtonWidth = 160 * screenMultiplier;
	var ButtonHeight = 120 * screenMultiplier
	// TABLE ie. PICTURE FRAME
	var PictureFrameWidth = 20 * screenMultiplier;
	// FONTS
	var avsTitleFontSize = 36 - ((36 - (36 * screenMultiplier)) / 2);
	var pageTitleFontSize = 24 - ((24 - (24 * screenMultiplier)) / 2);
	var photoTitleFontSize = 24 - ((24 - (24 * screenMultiplier)) / 2);
	var photoCreditFontSize = 10 - ((10 - (10 * screenMultiplier)) / 2);
	var photoTextFontSize = 18 - ((18 - (18 * screenMultiplier)) / 2);
	var linkListFontSize = 14 - ((14 - (14 * screenMultiplier)) / 2);
	var TROVFontSize = 24 - ((24 - (24 * screenMultiplier)) / 2);
	var TROVLinkFontSize = 16 - ((16 - (16 * screenMultiplier)) / 2);
	var pageTextFontSize = 18 - ((18 - (18 * screenMultiplier)) / 2);
	var pageTextArialFontSize = 14 - ((14 - (14 * screenMultiplier)) / 2);
	var buttonTextFontSize = 16 - ((16 - (16 * screenMultiplier)) / 2);
	var microsoftFontSize = 12 - ((12 - (12 * screenMultiplier)) / 2);
	var getIEFontSize = 12 - ((12 - (12 * screenMultiplier)) / 2);
	var dividerThickness = 7 - ((7 - (7 * screenMultiplier)) / 2);
	var PoemWidth = 600 - ((600 - (600 * screenMultiplier)) / 2);
	
	// Next we generate the style sheet rules for the various elements on the page
	
	document.writeln('<style type="text/css">');

	// LINK RULES
	document.write('A:link{color:yellow}');
	document.write('A:active{color:yellow}');
	document.write('A:visited{color:orange}');

	// IMAGE RULES
	
	// Write style rule for full size image.
	document.write('img.fullSize{width: ' + FullImageWidth + '; height: ' + FullImageHeight + '}');
	
	// Write style rule for button image.
	document.write('img.button{width: ' + ButtonWidth + '; height: ' + ButtonHeight + '}');

	// IMAGE FRAMING TABLE RULE
	
	// Write style rule for button image.
	document.write('table.pictureFrame{border: ' + PictureFrameWidth + 'px; border-style: outset; border-color: #909090;}');
	
	// FONT RULES
	
	// Write style rule for avs title, used on each page
	document.write('font.avsTitleFont{font-family: Script MT Bold; font-weight: bold; font-size: ' + avsTitleFontSize + 'pt; color: #CC33FF}');
	
	// Write style rule for page title, used on each page
	document.write('font.pageTitleFont{font-weight: bold; font-size: ' + pageTitleFontSize + 'pt; color: #00FFFF}');
	
	// Write style rule for page link, used on each page
	document.write('font.pageLinkFont{font-family: Script MT Bold; font-weight: bold; font-size: ' + pageTitleFontSize + 'pt; color: #FFFF00}');
	
	// Write style rule for photo title A, used on each main page
	document.write('font.photoTitleAFont{font-weight: bold; font-size: ' + photoTitleFontSize + 'pt; color: #FFFFFF}');
	
	// Write style rule for Button text, used on each page
	document.write('font.buttonText{font-weight: bold; font-size: ' + buttonTextFontSize + 'pt; color: #FFFFFF}');

	// Write style rule for Link Bar Font, used on each main page
	//document.write('font.LinkBarFont{font-family: Arial; font-weight: bold; font-size: ' + linkListFontSize + 'pt; color: #0000FF}');
	
	// Write style rule for photo title A, used on each main page
	//document.write('font.LinkComingFont{font-family: Arial; font-weight: bold; font-size: ' + linkListFontSize + 'pt; color: #FF0000}');
	
	// Write style rule for photo title B, used on each main page
	//document.write('font.photoTitleBFont{font-weight: bold; font-size: ' + photoTitleFontSize + 'pt; color: #FF66CC}');
	
	// Write style rule for photo credit, used on each page
	document.write('font.photoCreditFont{font-weight: bold; font-size: ' + photoCreditFontSize + 'pt; color: #FFFFFF}');
	
	// Write style rule for photo text, used on each page
	document.write('font.photoTextFont{font-weight: bold; font-size: ' + photoTextFontSize + 'pt; color: #FFFFFF}');
	
	// Write style rule for link list cell, used on each page
	//document.write('td.linkListCell{width: 20%}');
	
	// Write style rule for link list cell, used on each page
	//document.write('td.PoemCell{width: ' + PoemWidth + '}');
	
	// Write style rule for link list, used on each page
	//document.write('font.linkListFont{font-weight: bold; font-size: ' + linkListFontSize + 'pt; color: #000000}');
	
	// Write style rule for avs title, used on each page
	//document.write('font.TROVFont{font-family: Script MT Bold; weight: bold; font-size: ' + TROVFontSize + 'pt; color: #CC33FF}');
	
	// Write style rule for avs title, used on each page
	//document.write('font.TROVLinkFont{font-family: Script MT Bold; weight: bold; font-size: ' + TROVLinkFontSize + 'pt; color: #CC33FF}');
	
	// Write style rule for page text, used on each page
	document.write('font.pageTextFont{font-weight: bold; font-size: ' + pageTextFontSize + 'pt; color: #00FFFF; line-height: 200%}');
	
	// Write style rule for page text, used on each page
	document.write('font.pageTextArialFont{font-family: Arial; font-size: ' + pageTextArialFontSize + 'pt; color: #00FFFF; line-height: 200%}');
	
	// Write style rule for page text, used on each page
	//document.write('font.pageTextHarringtonFont{font-family: Arial; font-size: ' + pageTextArialFontSize + 'pt; color: #000000}');
	
	// Write style rule for microsoft ie text used on each page
	//document.write('font.microsoftFont{font-weight: bold; font-size: ' + microsoftFontSize + 'pt; color: #000000}');
	
	// Write style rule for get ie text, used on each page
	//document.write('font.getIEFont{font-weight: bold; font-size: ' + getIEFontSize + 'pt; color: #000000}');

	// Write style rule for get ie text, used on each page
	//document.write('hr.divider{weight: ' + dividerThickness + '; width: 90%; color: #CC33FF}');

	document.writeln('</style>');

	function redrawPage()
	{
		//document.reload();
	}


