// Code in this file relies on code in file "x.js"

//	Dynamically change the height of the various "wrapper" structures to match the tallest
//	content, so the footer will float correctly under the columns.

function adjustLayout()
{
	// Get natural heights of the contents of the various structures
	var leftcolHt = xHeight( "leftcol" );
	var rightcolHt = xHeight( "rightcol" );
	var contentHt = xHeight( "content" );
//	alert( "leftcolHt = " + leftcolHt + "\nrightcolHt = " + rightcolHt + "\ncontentHt = " + contentHt );

	// Adjust column height
	if ( leftcolHt > rightcolHt ) {
		// Adjust height of content <div>
		contentHt = xHeight( "content", contentHt + leftcolHt - rightcolHt );
	} else {
		// Adjust height of left column
		leftcolHt = xHeight( "leftcol", rightcolHt );
	}
//	rightcolHt = xHeight( "rightcol" );
//	alert( "leftcolHt = " + leftcolHt + "\nrightcolHt = " + rightcolHt + "\ncontentHt = " + contentHt );

	// Show the footer
	xShow( "footer" );
	
	return;
}

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

