// JavaScript Document to control the height of the two columns

function ctrlHeight(){
	
	//assogn variables
	var column_1, column_2, nHeight, mHeight, mainColumn;
	
	column_1 = document.getElementById('content-left-top');
	column_2 = document.getElementById('content-right');
	mainColumn = document.getElementById('content-area');
	
	var c1_Height = column_1.offsetHeight + 216;
	var c2_Height = column_2.offsetHeight + 80;
	
	mHeight = '550';
	
	if(c1_Height > c2_Height){
		nHeight = c1_Height;
	}else{
		nHeight = c2_Height;
	}
	
	if(nHeight < mHeight){
		nHeight = mHeight;
	}
	
	//assign height to the columns
	column_1.style.height = (nHeight - 216)+"px";
	column_2.style.height = (nHeight - 80) +"px";
	mainColumn.style.height = nHeight +"px";
	
	
}


window.onload = function(){
	ctrlHeight();
}
