
var minContentHeight;

function Fensterhoehe(win) {  
    if (win == undefined) win = window;   
    if (win.innerHeight) {   
        return win.innerHeight;   
    }   
    else {   
        if ( win.document.documentElement && win.document.documentElement.clientHeight ) {   
            return win.document.documentElement.clientHeight;   
        }   
        return win.document.body.offsetHeight;   
    }   
} 

function contentResize(){
	
	var windowHeight = Fensterhoehe();
	
	var bottom = document.getElementById("bottom");	
	var top = document.getElementById("top");	
	var content = document.getElementById("content");	
		
	var headHeight = document.getElementById("left_top").offsetHeight;
	var placeholderAboveContent = document.getElementById("placeholderAboveContent").offsetHeight;	
	var naviHeight = document.getElementById("navi").offsetHeight;	
	var contentHeight = content.offsetHeight;	
	var bottomHeight = bottom.offsetHeight;
	var topHeight = top.offsetHeight;
	
	var newTopHeight = windowHeight * 0.1 - 50;		
	if ( newTopHeight < 12 ) { newTopHeight = 12; }	
	var newBottomHeight = newTopHeight;
	
	if ( minContentHeight == undefined ) { minContentHeight = contentHeight; }
	var newContentHeight = windowHeight - headHeight - newTopHeight - newBottomHeight - placeholderAboveContent - 4;		
	if ( newContentHeight < minContentHeight ) { newContentHeight = minContentHeight; }	
	
	content.style.height = newContentHeight + 'px'; 
	top.style.height = newTopHeight + 'px'; 
	bottom.style.height = newBottomHeight + 'px'; 
	
}
	
