﻿function AdjustColumnsHeight()
{
	// get a reference to the three DIVS that make up the columns
	var container = window.document.getElementById('container');
	var contentwrapper = window.document.getElementById('contentwrapper');
	var contentleft = window.document.getElementById('contentleft');    
	var banner = window.document.getElementById('banner');
	var topmenubar = window.document.getElementById('topmenubar');
	var footer =  window.document.getElementById('navbarbottom');

	// calculate the max height
	var hContainer = container.offsetHeight;
	var hContentWrapper = contentwrapper.offsetHeight;
	var hBanner = banner.offsetHeight;
	var hTopMenuBar = topmenubar.offsetHeight;
	var hFooter = footer.offsetHeight;

 	var maxHeight = Math.max(hContainer, hContentWrapper);
	
	if (maxHeight < 800)
	{
		maxHeight = 1300;
	}

	container.style.height = (maxHeight) + 'px';
	contentwrapper.style.height = (maxHeight - hBanner - hTopMenuBar + hFooter) + 'px';  

	// Show the footer
	//window.document.getElementById('navbarbottom').style.visibility = 'inherit';
}


function setmiddlesize(size)
{
alert('Hello');
//window.document.getElementById('contentmiddle').style.width = size + 'px';
}




////////////////////////////////////////////////////
window.onload = function() { AdjustColumnsHeight(); }  


