Event.observe(window, 'load', SetupVisuals);
Event.observe(window, 'load', FixIE);

function SetupVisuals(evt)
{
	var bh = document.getElementsByTagName('body')[0].offsetHeight;
	var ch = $('Content').offsetHeight;
	if (ch > bh)
	{
		$('Divider').style.height = (ch - 50) + 'px';
		$('Divider').style.top = '100px';
		$('Container').style.height = (ch + 50) + 'px';
	}

	if (ch < bh - 120)
	{
		var List = document.getElementsByClassName('styled_list')[0];
		if (List)
		{
			List.style.paddingBottom = (Math.round(bh / 1.5) - List.offsetHeight) + 'px';
		}
		else
		{
			$('RealContent').style.height = Math.round(bh / 2) + 'px';
		}
		$('Copyright').style.top = (findPosY($('RealContent')) + $('RealContent').offsetHeight + 5) + 'px';
	}
}

function FixIE()
{
	document.execCommand("BackgroundImageCache",false,true);
}
