function einziehen() 
{
	var arr = new Array();
	arr = getElementsByClassName("liu","li");
	for( var i=0;i<arr.length;i++)
	{
		arr[i].style.display = "none";
	}
}

function ausklappen (nummer) {
einziehen();

	var Knoten = document.getElementsByTagName("ul")[nummer].firstChild;
	var msg = '';
	
	while (Knoten!=null) {
	  if(Knoten.nodeName == "LI")
	  {
		Knoten.style.display = "block";
	  }
	  Knoten = Knoten.nextSibling;
	}
}

function einklappen (nummer) {
	var Knoten = document.getElementsByTagName("ul")[nummer].firstChild;
	while (Knoten!=null) {
	  if(Knoten.nodeName == "LI")
	  {
		Knoten.style.display = "none";
	  } 
	  Knoten = Knoten.nextSibling;
	}
}

function getElementsByClassName(Klasse,tagname)
{
	var Elements = window.document.getElementsByTagName(tagname);
	var aRet	 = new Array();

	for ( var i=0; i<Elements.length; i++) {
		if (Elements[i].className == Klasse) {
			aRet[aRet.length] = Elements[i];
		}
	}
	return aRet;
}

//FLASH DETECTION

function isDefined(property) {
  return (typeof property != 'undefined');
}

var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 8;
	var agent = navigator.userAgent.toLowerCase();

	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
			if (typeof flashPlugin == 'object') {
				for (var i = latestFlashVersion; i >= 3; i--) {
					if  (flashPlugin.description.indexOf(i + '.') != -1) {
				flashVersion = i;
				break;
				}
			}
		}
	}

	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		flashVersion = 5;
	}
	else {
		flashVersion = flashVersion_DONTKNOW;
	}
	return flashVersion;
}

var flashVersion_DONTKNOW = -1;

function abschicken(formular) {
if(formular == 1)
	{
	document.forms[1].submit();
	}else {
	document.forms[0].submit();
	}
	
}

function flash (name, alt) {
	var useragent = navigator.userAgent;
	var BrowserName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;
	if(getFlashVersion() > 4 && BrowserName != 'Opera' && name!="")
	{
		document.write('	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('			codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="100%" height="' + h + '" style="margin:0;padding:0;">');
		document.write('	<param name="movie" value="images/header/flash/'+name+'.swf" />');
		document.write('	<param name="quality" value="high" />');
		document.write('	<param name="scale" value="exactfit" />');
		document.write('	<param name="wmode" value="transparent" />');
		document.write('	<!--[if !IE]> -->');
		document.write('	<object data="images/header/flash/'+name+'.swf"');
		document.write('			width="100%" height="' + h + '" type="application/x-shockwave-flash">');
		document.write('			<param name="wmode" value="transparent" />');
		document.write('			<param name="scale" value="exactfit" />');
		document.write('			<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer" />');
		document.write('	</object>');
		document.write('	<!-- <![endif]-->');
		document.write('   </object>');
	}
	else {
		document.write('<img src="images/header/'+alt+'.jpg" style="height:' + Math.round(h) + 'px;" alt="hintergrundbild" id="hintergrund" />');
	}
}


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.offsetHeight) return document.body.offsetHeight;
 else return 0;
}


function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
 window.history.go(0);
}

function ie() {
	/*Überwachung von MS Internet Explorer initialisieren*/
	if(!window.Weite && document.body && document.body.offsetWidth)
	{
	   window.onresize = neuAufbau;
	   Weite = Fensterweite();
	   Hoehe = Fensterhoehe();
	}
	/*Überwachung von Netscape initialisieren*/
	if(!window.Weite && window.innerWidth)
	{
	   window.onresize = neuAufbau;
	   Weite = Fensterweite();
	   Hoehe = Fensterhoehe();
	}
	var h = Weite / 5;
	return h;
}