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 getWindowWidth() // {{{
{ 
	var windowWidth = 0; 
	if (typeof(window.innerWidth) != 'undefined') 
	{ 
		windowWidth = window.innerWidth; 
	} 
	else { 
		if (document.documentElement && document.documentElement.clientWidth) { 
			windowWidth = document.documentElement.clientWidth; 
		} 
		else { 
			if (document.body && document.body.clientWidth) { 
				windowWidth = document.body.clientWidth; 
			} 
		} 
	} 
	return windowWidth; 
} 	// }}}

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

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

	// make width adjustments {{{
	var i_window_width = getWindowWidth();
	var i_site_width = 996;

	if (i_window_width < i_site_width)
	{
		// scrollbars, it is automatically aligned
		$('header').style.width  = "996px";						// set scrollWidth
	}
	else
	{
		// no scrollbars
		$('header').style.width  = "100%";        // default for a div, not necessary
	}
	// }}}
}
