function Fensterweite () {
  if (window.innerWidth) {
    return window.innerWidth;
  } else if (document.body && document.body.offsetWidth) {
    return document.body.offsetWidth;
  } else {
    return 0;
  }
}

function Fensterhoehe () {
  if (window.innerHeight) {
    return window.innerHeight;
  } else if (document.body && document.body.clientHeight) {
    return document.documentElement.clientHeight ;
  } else {
    return 0;
  }
}

var ie5=document.all&&document.getElementById;
var ns6=document.getElementById&&!document.all;

function initLayout (start) {
	  if (!OriginalHeight) OriginalHeight = getHeight('spacer');
	  if (!OriginalDiff) OriginalDiff = getYPos('spacer');
    	

	
	  if (Hoehe != Fensterhoehe() || !Hoehe || start==1){
		Hoehe = Fensterhoehe();
		var newheight= Hoehe;
		var contentDiv = getObjectRef('spacer');
		//var content_div_diff= getHeight('warpper_main') - getHeight('page_content');		
		var newheight_page= Fensterhoehe() - OriginalDiff - OriginalHeight+10;
		
		if(ie5) {
				newheight_page= Fensterhoehe() - OriginalDiff - OriginalHeight-224;
		} 
		
		//alert(Fensterhoehe()+" "+OriginalDiff +" "+OriginalHeight+" "+newheight_page); 
       	if (OriginalHeight <  newheight_page){
		   		   contentDiv.style.height= newheight_page +"px";
		}else{
				   contentDiv.style.height= OriginalHeight +"px";
			}
   	}
}

function getHeight(name) { 
	var el = getObjectRef(name); 
	return el.offsetHeight; 
} 

function getYPos(name) { 
	var el = getObjectRef(name); 
	return el.offsetTop; 
} 



function getObjectRef(name) { 
	if(document.getElementById) return document.getElementById(name); 
	else if(document.all) return document.all[name]; 
	else return null; 
} 