/* 
This program Requires x.js!!!

You need <div id="page"> that will hold the main content
	for each of the columns have 2 <div> tags ie
		<div id="outer1">
			<div id="inner1">
		<div id="outer2">
			<div id="inner2">

The program will look at the size's of the "inners" and change the "outer" to match the longest "inner" content.
Then the program will change the page to the longest size and then add the title (headerSize)

*/
function adjustLayout()
{
	// Size of the Title and navigation
	var headderSize = 270;
	
	// Get natural heights
	var aHeight = xHeight("content");
	var cHeight = xHeight("contentl");
	var bHeight = xHeight("contentr");
		  
	// Find the maximum height
	var maxHeight = Math.max(aHeight,Math.max(cHeight, bHeight));
	 
	// Assign maximum height to all columns
	xHeight("contentbox", maxHeight);
	//xHeight("right", maxHeight);
	
	// Assign the height to the main page div tag + headerSize.
	xHeight("pagebox", maxHeight+headderSize);
	
	// Show the footer
	//xShow("footer");
}

window.onload = function()
{
	xAddEventListener(window, "resize", adjustLayout, false);
	adjustLayout();
}
