function initPage() {

	var data = getPageSize();
	var datahoehe = data[1];
	var databreite = data[2];
	/*
	var ns4=document.layers?1:0
	var ns6=document.getElementById&&!document.all?1:0
	var ie=document.all?1:0

	if (navigator.appName.indexOf("Netscape")) {
	windowheight=parseInt(window.innerHeight);
	windowwidth=parseInt(window.innerWidth);
	}
	else {
	windowheight=parseInt(document.body.clientHeight);
	windowwidth=parseInt(document.body.clientWidth);
	}*/
	/*
	{Element}.offsetHeight (höhe eines elements ermitteln)

	browserhöhe (opera, gecko, netscape etc):
	window.innerHeigth

	browserhöhe (ie standard):
	document.documentElement.clientHeight

	browserhöhe (ie in quirks mode):
	document.getElementsByTagName('body')[0].clientHeight
	*/

	/*function getpagesize() {
	if (ie) {
	windowheight=parseInt(document.body.clientHeight)
	windowwidth=parseInt(document.body.clientWidth)
	}
	else {
	windowheight=parseInt(window.innerHeight)
	windowwidth=parseInt(window.innerWidth)
	}
	return data;
	}*/

	function getAbsTop(el){
		var t=el.offsetTop;
		while((el=el.parentNode) && el!=document)
		t+=el.offsetTop;
		return t;
	}

	/*alert('Top: ' + getAbsTop(document.getElementById('bottomelement')));*/
	
	
	if (navigator.appName.indexOf("Netscape") != -1){
		hoehe = getAbsTop(document.getElementById('bottomelement'));
		if(datahoehe>hoehe){
			hoehe = datahoehe;
		}
		document.getElementById("genmenu").style.top = (hoehe-20)+'px';
		document.getElementById("searchbox").style.top = (hoehe-116)+'px';

		if(document.getElementById("act2") != null){
			menu2actpos = getY(document.getElementById("act2"));
			document.getElementById("menu2").style.top = (menu2actpos)+'px';
		}
	} else {
		hoehe = getAbsTop(document.getElementById('bottomelement'));
		if(datahoehe>hoehe){
			hoehe = datahoehe;
		}
		document.getElementById("genmenu").style.top = (hoehe)+'px';
		document.getElementById("searchbox").style.top = (hoehe-96)+'px';

		if(document.getElementById("act2") != null){
			menu2actpos = getY(document.getElementById("act2"));
			document.getElementById("menu2").style.top = (menu2actpos)+'px';
		}
	}
	
	/*		alert(document.getElementById("menu1").offsetHeight);
		alert(hoehe);
		if((document.getElementById("menu1").offsetHeight + 96) > hoehe){
			document.getElementById("searchbox").style.top = '550px';
		}else{
			document.getElementById("searchbox").style.top = (hoehe-96)+'px';
		}
		
		document.getElementById("searchbox").style.top = (hoehe-96)+'px';
		= (hoehe-96)+'px';*/
/*document.getElementById("styleswitcher").style.top = (hoehe-86)+'px';*/
	/*document.getElementById("styleswitcher").style.top = (hoehe-66)+'px';*/
	/*alert(navigator.appName);
	alert(document.getElementById("bottomelement").style.posLeft);*/

/*
	if (navigator.appName.indexOf("Netscape") != -1){
		document.getElementById("genmenu").style.top = (hoehe-20)+'px';
		document.getElementById("styleswitcher").style.top = (hoehe-86)+'px';
		document.getElementById("searchbox").style.top = (hoehe-116)+'px';

		if(document.getElementById("act2") != null){
			menu2actpos = getY(document.getElementById("act2"));
			document.getElementById("menu2").style.top = (menu2actpos)+'px';
		}
	} else {
		document.getElementById("genmenu").style.top = (hoehe)+'px';
		document.getElementById("styleswitcher").style.top = (hoehe)+'px';
		document.getElementById("searchbox").style.top = (hoehe)+'px';

		if(document.getElementById("act2") != null){
			menu2actpos = getY(document.getElementById("act2"));
			document.getElementById("menu2").style.top = (menu2actpos)+'px';
		}
	}*/
	/*
	document.getElementById("genmenu").style.top = (hoehe-20)+'px';
	document.getElementById("styleswitcher").style.top = (hoehe-86)+'px';
	document.getElementById("searchbox").style.top = (hoehe-116)+'px';

	if(document.getElementById("act2") != null){
	menu2actpos = getY(document.getElementById("act2"));
	document.getElementById("menu2").style.top = (menu2actpos)+'px';
	}*/

}



function getX (obj,relative) {
	var x=0;
	if(typeof(obj)=="object" && document.getElementById) {
		x=obj.offsetLeft;
		if(obj.offsetParent && !relative) {
			x+=this.getX(obj.offsetParent);
		}
		return x;
	} else  {
		return false;
	}
}


function getY (obj,relative) {
	var y=0;
	if(typeof(obj)=="object" && document.getElementById) {
		y=obj.offsetTop;
		if(obj.offsetParent && !relative) {
			y+=this.getY(obj.offsetParent);
		} return y;
	} else  {
		return false;
	}
}

function pWindow(href){
	Fenster = window.open(href,'printwindow','width=650,height=800,toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0');
}


window.onresize = initPage;


