// JavaScript Document

function ausblenden(menuepunkt) {
	document.getElementById(menuepunkt).style.display = 'none';
}

function demarkieren(menuepunkt) {
	document.getElementById(menuepunkt).style.backgroundImage = '';
	document.getElementById(menuepunkt).firstChild.style.color = '#898989';
}

function einblenden(menuepunkt) {
	document.getElementById(menuepunkt).style.display = 'block';
}

function GetScroll() {

	if (window.pageYOffset) {
		document.getElementById('scroller').Scroll.value = window.pageYOffset;
	} else {
		document.getElementById('scroller').Scroll.value = document.documentElement.scrollTop;
	}

}

function markieren(menuepunkt) {
	document.getElementById(menuepunkt).style.backgroundImage = 'url(pics/menu_highlight.png)';
	document.getElementById(menuepunkt).firstChild.style.color = '#FF9000';
}

// Region "onload"

function checklevel(frame)
{
	if (top == self)
		self.location = '../index.php?' + frame;
}

function ladebilder(srcArray)
{
	var bilder = new Array();
	for (var i = 0; i < srcArray.length; i++) {
		bilder[i] = new Image;
		bilder[i].src = srcArray[i];
	}
}

function resizeiframe()
{
	var margin_top = 0;
	if (!isNaN(parseInt(document.body.style.marginTop))) {
		margin_top = parseInt(document.body.style.marginTop);
	}

	var margin_bottom = 0;
	if (!isNaN(parseInt(document.body.style.marginBottom))) {
		margin_bottom = parseInt(document.body.style.marginBottom);
	}
	
	var size = 0;
	if (document.body.clientHeight) {
		size = document.body.clientHeight + margin_top + margin_bottom;
	}
	else {
		size = self.innerHeight + margin_top + margin_bottom;
	}

	var mindesthoehe = 400;
	var Frame_iframe = parent.document.getElementById('iframe');

	if (size > mindesthoehe) {
		Frame_iframe.style.height = size + 20 + 'px';
	}
	else {
		Frame_iframe.style.height = mindesthoehe + 'px';
	}
}

function waehleframe(frame) {
	if (frame != 'index') {
		document.location.href = 'index.php?' + frame;
	}
	else {
		if (window.location.search.replace('?', '') != '') {

			var Frame_iframe = document.getElementById('iframe');
			if (window.location.search.replace('?', '') != 'sitemap.xml') {
				Frame_iframe.src = 'frames/' + window.location.search.replace('?', '') + window.location.hash;
			}
			else {
				Frame_iframe.src = window.location.search.replace('?', '') + window.location.hash;
			}
		}
	}
}

// End Region "onload"
