/**
 * Determines the window height independent of the used browser
 *
 * @return integer Browser window height
 */
function getWindowHeight() {
	var windowHeight=0;
	//Hoehenangabe fuer Netscape, Mozilla und Opera
	if (typeof(window.innerHeight)=='number') {
		windowHeight=window.innerHeight;
	}
	//Internet Explorer
	else {
		//IE 6
		if ( document.documentElement && document.documentElement.clientHeight) {
			windowHeight= document.documentElement.clientHeight;
		}
		//IE 4 & 5
		else {
			if (document.body&&document.body.clientHeight) {
				windowHeight=document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
/**
 * Determines the window height independent of the used browser.
 * Then substracts the heights of the menu and other document elements
 * to determine the maximum height of the content element.
 *
 * @return integer Maximum height of content element
 */
function intGetContentHeight(){
	//Retrieve the browser window height
    var windowHeight = getWindowHeight();
	//Von der Fensterhoehe wird noch die Hoehe der Kopf- und Fussleiste abgezogen
	var subVal = 133;
	var contentHeight = (windowHeight - subVal );
	if (window.XMLHttpRequest) {
		//IE 7, mozilla, safari, opera 9
		contentHeight -= 0;
	} else {
		// IE6, older browsers
		contentHeight -= 0;
	}
	return contentHeight;
}
/**
 * Sets the maximum height of the content element, so e.g. the menu is always
 * visible and not scrolled out of view.
 *
 * @return void
 */
function setContentHeight(){
	var windowHeight = intGetContentHeight() + "px";
	//alert( "<"+navigator.appName +">  ---  " + windowHeight );
    document.getElementById("content").style.height = windowHeight;
	document.getElementById("top").focus();
}
/**
 * If the browser window is resized, an event is created,
 * that re-sets the maximum height of the content element.
 */
window.onresize = doChangeHeight;
function doChangeHeight( e ){
	setContentHeight(); 
}