	var initialHeight = 0;

	function resizeToFitPage()
	{
		var headerSize = 74;
		var footerSize = 80;
		var minimumSize = 600;
		var resizeElementId = "inhoud";
		
		// Get element
		var resizeElement = document.getElementById(resizeElementId);
		
		// Calculate new size
		var newSize = ((getWindowHeight() - headerSize) - footerSize);
		newSize = Math.max(minimumSize, newSize);

		// Try to get the initialHeight of the window when not set
		if (initialHeight == 0)
		{
			initialHeight = resizeElement.clientHeight;
		}
		
		// If initialHeight is defined and is smaller then the new size. Then resize
		if (initialHeight > 0 && initialHeight < newSize)
		{
			resizeElement.style.height = newSize;
		}
	}
	
	function getWindowHeight()
	{
		var myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' )
		{ //Non-IE
			myHeight = window.innerHeight;
		}
		else
		{
			if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
			{ //IE 6+ in 'standards compliant mode'
				myHeight = document.documentElement.clientHeight;
			}
			else
			{
				if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
				{ //IE 4 compatible
					myHeight = document.body.clientHeight;
				}
			}
		}
		return myHeight;
	}
