// JavaScript Document


// JavaScript Document
function getheight ( container )
{
	if( container.scrollHeight )
    {
      	   containerdivheight = container.scrollHeight; 
	}
	
	if ( container.clientHeight )
	{
		  containerdiv2height = container.clientHeight;
	}
	else if( container.offsetHeight )
    {
      	   containerdiv2height = container.offsetHeight; 
	}
	
	if ( containerdiv2height > containerdivheight)
		return containerdiv2height;
	else
		return containerdivheight;
}


function resize ( column, size )
{
	column.style.height = size + 'px';
}


function resizeColumns() {
	
    var container = document.getElementsByTagName ('html')[0];
	var cDivHeight  = getheight ( container );
	
	var cl = $E( 'colLeft' );
	var cr = $E( 'colRight' );
	var clHeight = getheight ( cl );
	
	
	if ( clHeight < cDivHeight ) /*header+footer+margin footer+bottom footer*/
	{
		resize ( cl,cDivHeight);
		clHeight = getheight ( cl );
		var mid = $E( 'middle' );
     	resize ( mid, clHeight - 208 );
	}
	
	//resize colRight
	resize ( cr,clHeight);
	$E( 'colRightVisuals' ).style.height = "100%";
}

window.onresize = resizeColumns;
