Event.onDOMReady(function() { calcheight(); });
Event.observe(window, 'resize', function() { calcheight(); });

function calcheight () {
	var bodyheight = WindowUtilities.getWindowScroll(document.body).height;
	var windowheight = document.body.offsetHeight;
	var newheight = WindowUtilities.getWindowScroll(document.body).height - 140;
	if(bodyheight < windowheight) {
		document.getElementById('content').style.height = '';
		document.getElementById('footer').className = 'large';
	}
	else {
		document.getElementById('content').style.height = newheight +'px';
		document.getElementById('footer').className = 'small';
	}
}
