// $Id: inc.js.layout.js 9 2006-04-20 13:49:15Z conor $

// Make this into a class later! //////////////////////////////////////////////
function layoutPage()
{
	var sections_top = document.getElementById('sections').offsetTop;
	var sections_height = document.getElementById('sections').offsetHeight;
	var content = document.getElementById('content_wrapper').offsetHeight;

	var tallest_column = content;

	if (sections_height > tallest_column) {
		tallest_column = sections_height;
		
		document.getElementById('content').style.height = tallest_column + 'px';
	}
	
	// Get the current position of the footer
	/*var footer_top = document.getElementById('footer_matcher').offsetTop;
	
	if (footer_top < (sidebar_top + tallest_column)) {
		document.getElementById('footer').style.top = (tallest_column - footer_top) + sidebar_top - 4 + "px";
		//alert(sidebar_top + ' ' + sidebar_height + ' ' + content_left_height + ' ' + content_right_height + ' ' + document.getElementById('footer').offsetTop + '---' + tallest_column + ' ' + (tallest_column - footer_top))
	}*/
}

addLoadEvent(layoutPage);
addResizeEvent(layoutPage);
