
function getWindowHeight() // {{{
{ 
	var windowHeight = 0; 
	if (typeof(window.innerHeight) != 'undefined') 
	{ 
		windowHeight = window.innerHeight; 
	} 
	else { 
		if (document.documentElement && document.documentElement.clientHeight) { 
			windowHeight = document.documentElement.clientHeight; 
		} 
		else { 
			if (document.body && document.body.clientHeight) { 
				windowHeight = document.body.clientHeight; 
			} 
		} 
	} 
	return windowHeight; 
} 	// }}}

function updateBody ()
{
	// make height adjustments {{{
	var i_window_height = getWindowHeight();
	var i_scroll_height = $('website').scrollHeight;

	//alert('window: ' + i_window_height);
	//alert('scroll: ' + i_scroll_height);

	if (i_scroll_height < i_window_height)
	{
		// no scrollbars
		//alert('set to 100%');
		$('website').style.height  = "100%";
		$('sitehtml').style.height = "100%";
	}
	else
	{
		// scrollbars, it is automatically aligned to bottom
		//alert('set to nuthin\'');
		$('website').style.height  = "";
		$('sitehtml').style.height = "";
	}
	// }}}
}
