// JavaScript Document

// This function adjusts table heights for Internet Explorer.
function FixTables()
{	
	var viewportHeight = document.body.clientHeight;
	var pageHeight = document.getElementById("content").offsetHeight;
	var testTable = document.getElementById("MenuContent"); // table being tested for correct height
	var contentBox = document.getElementById("ContentBox");
	var neededHeight = 0;
	
	// Determine which element to use for the needed height.
	if((viewportHeight - 154) < (pageHeight + 154))
	{
		neededHeight = pageHeight + 154;
	}
	else
	{
		neededHeight = viewportHeight - 154;
	}
	
	// Test the table's height
	if(testTable.rows[0].height < neededHeight)
	{
		// If it is not high enough, set it to the needed height.
		// This applies to more than one table.
		testTable.style.height = neededHeight + "px";
		document.getElementById("Menu").style.height = neededHeight + "px";
	}
	
	//contentBox.rows[0].height = neededHeight - 123; // Include flash in calculation
	contentBox.style.height = (neededHeight - 128) + "px"; // Include flash in calculation
}
