/**
	This script resizes the page to fit the window if it's too small.
	style.js must be included before this file because it calls getWindowHeight().
*/
function pageResize() {
	// Get height of the window.
	var windowHeight = getWindowHeight();
	
	if (windowHeight > 0)
	{
		var contentElement = document.getElementById('content');
		
		// get the height of the container.
		var containerHeight = fullHeight(document.getElementById('container'));
		var contentHeight = fullHeight(contentElement);
		
		if (windowHeight > containerHeight) {
			contentElement.style.height = (contentHeight + windowHeight - containerHeight - 20) + 'px';
			document.getElementById('footer').style.top = (contentHeight + windowHeight - containerHeight - 20) + 'px';
		}
	}
}
window.onload = pageResize;
window.onresize = pageResize;