// JavaScript Document

function hfix() {
	document.getElementById("main").style.height = "auto";
	
	allHeight = getClientHeight();
	headerHeight = 183;
	linesHeight = 14;
	footerHeight = document.getElementById('footer').offsetHeight;
	contentHeight = document.getElementById('main').offsetHeight;

	if ( (headerHeight+linesHeight+footerHeight+contentHeight) < allHeight)
	{
		newHeigh = allHeight - (headerHeight+linesHeight+footerHeight);
		document.getElementById("main").style.height = newHeigh + "px";
	}
}

function getClientHeight()
{
	return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
