function onLoadFunction() {
	if (document.getElementById('refreshBtn')) document.getElementById('refreshBtn').style.display = "none";
}

function closeFlyout() {
	if (document.getElementById('haupt-navigation')) {
		
		oObj = document.getElementById('haupt-navigation');
		foo = getElementsByClassName ("submenu",oObj);	
		for (n=0; n < foo.length; n++) {		
			foo[n].style.display = 'none';	
		}
	}
}

function showHideMe(oObj,sAction) {
	//subitems = getElementsByClassName ("subitem",oObj);
	//iHeight = (subitems.length * 35) + 30;
	
	foo = getElementsByClassName ("submenu",oObj);	
	for (n=0; n < foo.length; n++) {		
		if (sAction == 'show') {
			foo[n].style.display = 'block';
			//document.getElementById('haupt-navigation').style.height = iHeight;
		} else {
			foo[n].style.display = 'none';
			//document.getElementById('haupt-navigation').style.height = 50;
		}		
	}
}

function getElementsByClassName (className, element) {
	element = element ? element : document;

	var muster = new RegExp("(^|\\s)" + className + "(\\s|$)");
	var alles = element.getElementsByTagName("*");
	var gefunden = new Array();
	var i;

	for (i = 0; i < alles.length; i++) {
		if (alles[i] && alles[i].className && alles[i].className != "") {
			if (alles[i].className.match(muster)) // für Fälle wie class="xyz abc"
				gefunden[gefunden.length] = alles[i];
		}
	}

	return gefunden;
}

