function calculateHeights()
{
	var blockHeight = document.getElementById('blocks').scrollHeight;
	
	if(document.getElementById('verticalmenu'))
	{
		var verticalmenuHeight = document.getElementById('verticalmenu').scrollHeight;
		
		if(verticalmenuHeight > blockHeight)
			blockHeight = verticalmenuHeight;
			
		document.getElementById('verticalmenu').style.height = blockHeight + 'px';
	}
	
	if(document.getElementById('verticalmenuborder'))
		document.getElementById('verticalmenuborder').style.height = blockHeight + 'px';

	if(menuHorizontal == 1 && menuCenter == 1)
	{
		var menuWidth = document.getElementById("horizontalmenu").childNodes[0].offsetWidth;
		if(974 - menuWidth > 2)
		{
			var marginBothSides = (974 - menuWidth) / 2;
			document.getElementById('horizontalmenu').childNodes[0].style.left = marginBothSides + 'px'; 
		}
	}
	
	if(document.getElementById('container'))
	{
		var containerHeight = document.getElementById('container').clientHeight;
		var footerHeight = document.getElementById('footer').clientHeight;
		
		if(document.getElementById('shadowleft'))
			document.getElementById('shadowleft').style.height = containerHeight + footerHeight  + 'px';
		
		if(document.getElementById('shadowright'))
			document.getElementById('shadowright').style.height = containerHeight + footerHeight  + 'px';

		
		if(document.getElementById('shadowleft2'))
			document.getElementById('shadowleft2').style.height =  footerHeight  + 'px';
		
		if(document.getElementById('shadowright2'))
			document.getElementById('shadowright2').style.height =  footerHeight  + 'px';
	}
}

addOnload(function() { setTimeout("calculateHeights()", 10) });
