var thisPage=document.location;
if (thisPage=='http://'+document.domain+'/') {
	thisPage='http://'+document.domain+'/index.php';
}
function init() {
	links=document.getElementById('navigation').getElementsByTagName('a');
	for (i=0;i<links.length;i++) {
		if (links[i].href==thisPage) {
			links[i].className='selected';
		}
	}
	if(typeof sIFR == "function") {
		sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"css/sIFR/georgia.swf", sColor:"#000000", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
	}
	setFooter();
}


window.onload = init;
window.onresize = setFooter;
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		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 setFooter() {
	if (document.getElementById) {
		var contentHeight;
		contentHeight=document.getElementById('content').offsetHeight;
		
		var top=document.getElementById('navigation').offsetHeight+contentHeight;
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = top;
			var footerElement = document.getElementById('bund');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'absolute';
				footerElement.style.top = (windowHeight - footerHeight) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
