BrowserName = navigator.appName;             
BrowserVersion = parseInt(navigator.appVersion);
if (BrowserVersion >= 4)
{ver4 = 1;}
else{ver4 = 0;}
if (BrowserName == "Netscape")
{NS4 = 1;}
else
{NS4 = 0;}
if (BrowserName == "Microsoft Internet Explorer")
{IE4 = 1;}
else
{IE4 = 0;}
version = 4;
if (BrowserVersion >= 5)
{version = 5;}
if (BrowserVersion >= 6)
{version = 6;}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

LastItem = "";
LastLayer = "";
function MenuHilite(Action,MenuItem,LayerId)
{
	var x
	if ((x=MM_findObj(MenuItem))!=null)
	{
		if (LastItem != MenuItem)
		{
			if (Action == "Ein")
			{
				source = x.src;
				jetzt = source.replace(/a.gif/,"b.gif");
				x.src = jetzt;
			}
			else
			{
				source = x.src;
				jetzt = source.replace(/b.gif/,"a.gif");
				x.src = jetzt;
			}
		}
	}
}

function MenuSelect(MenuItem,LayerId)
{
	var x
	if (LastItem.length > 0)
	{
		if ((x=MM_findObj(LastItem))!=null)
		{
				source = x.src;
				jetzt = source.replace(/b.gif/,"a.gif");
				x.src = jetzt;
		}
	}
	if ((x=MM_findObj(MenuItem))!=null)
	{
		source = x.src;
		jetzt = source.replace(/a.gif/,"b.gif");
		x.src = jetzt;
	}
  LastItem = MenuItem;
  LastLayer = LayerId;
}

var lastebene="";

function zuruck(alt)
{
 hohezuruck = 0;
 for (i=0; i<len; i++)
 {
  if (alle[i].length == alt.length+1 && alle[i].indexOf(alt) != -1)
  {
  TMP=alle[i];
	if (version >=5)
	{
		zahl = parseInt(document.getElementsByTagName("div")[TMP].style.height);
		hohezuruck = hohezuruck + zahl;
	}
	else
	{
		if (NS4)
		{
    hohezuruck = hohezuruck + document.layers[TMP].clip.height;
		}
		else
		{
		zahl = parseInt(document.all[TMP].style.height);
		hohezuruck = hohezuruck + zahl;
		}
	}
  }
        if (alle[i] == alt)
  {
   indexzuruck=i;
  }
 }
 for (i=indexzuruck+1; i<len; i++)
 {
  TMP=alle[i];
  if (alle[i].length == alt.length+1 && alle[i].indexOf(alt) != -1)
  {
	if (version >=5)
	{
document.getElementsByTagName("div")[TMP].style.visibility="hidden";
	}
	else
	{
     if (NS4)
  {
   document.layers[TMP].visibility="hide";
  }
  else
  {
     document.all[TMP].style.visibility="hidden";
  }
	}

  }
  else
  {
   if (alle[i].length <= alt.length)
   {
	if (version >=5)
	{
					document.getElementsByTagName("div")[TMP].style.top = parseInt(document.getElementsByTagName("div")[TMP].style.top) - hohezuruck;


	}
	else
	{
        if (NS4)
  {
    document.layers[TMP].top = document.layers[TMP].top - hohezuruck;
  }
  else
  {
  zahl = parseInt(document.all[TMP].style.top);
  hohezuruck = parseInt(hohezuruck);
      document.all[TMP].style.top = zahl - hohezuruck;
  }
	}

   }
  }
 }
}


function pruef(ebene)
{
		lenglastebene=lastebene.length;
 		lengebene=ebene.length;
	if (version >=5)
	{
		len=document.getElementsByTagName("div").length;
	}
	else
	{
		if (NS4)
		{
			len=document.layers.length;
		}
		else
		{
			len=document.getElementsByTagName("div").length;
		}
	}
	alle = new Array(len);
	for (i=0; i<len; i++)
	{
		if (version >=5)
		{
			alle[i] = document.getElementsByTagName("div")[i].id;
		}
		else
		{
			if (NS4)
			{
				alle[i] = document.layers[i].id;
			}
			else
			{
				alle[i] = document.all.tags("div")[i].id;
			}
		}
		if (alle[i] == ebene)
		{
			index = i;
		}
	}
	alle.sort();
	if (lenglastebene>0)
	{
		if (ebene.indexOf(lastebene) == -1)
		{
			if (lenglastebene == lengebene)
			{
				zuruck(lastebene);
			}
			else
			{
				zuruck(lastebene);
				allerletzte = lastebene.substr(0,lastebene.length-1);
				zuruck(allerletzte);
			}
		}
	}
	if (lastebene != ebene)
	{
		lastebene=ebene;
		hohe = 0;
		for (i=0; i<len; i++)
		{
			if ((alle[i].length == lengebene+1 && alle[i].indexOf(ebene) != -1))
			{
				TMP=alle[i];
		if (version >=5)
		{

				zahl = parseInt(document.getElementsByTagName("div")[TMP].style.height)
				hohe = hohe + zahl;
		}
		else
		{
			if (NS4)
			{
				hohe = hohe + document.layers[TMP].clip.height;
			}
			else
			{
				zahl = parseInt(document.all[TMP].style.height)
				hohe = hohe + zahl;
			}
		}
			}
		}
		for (i=index+1; i<len; i++)
		{
			TMP=alle[i];
			if (alle[i].length == lengebene+1 && alle[i].indexOf(ebene) != -1)
			{
				if (version >=5)
				{
document.getElementsByTagName("div")[TMP].style.visibility="visible";
				}
				else
				{
					if (NS4)
					{
						document.layers[TMP].visibility="show";
					}
					else
					{
						document.all[TMP].style.visibility="visible";
					}
				}
			}
			else
			{
				if (alle[i].length <= lengebene)
				{
				if (version >=5)
				{

						zahl = parseInt(document.getElementsByTagName("div")[TMP].style.top);
						hohe = parseInt(hohe);
						document.getElementsByTagName("div")[TMP].style.top = zahl + hohe;


				}
				else
				{
					if (NS4)
					{
						document.layers[TMP].top = document.layers[TMP].top + hohe;
					}
					else
					{
						zahl = parseInt(document.all[TMP].style.top);
						hohe = parseInt(hohe);
						document.all[TMP].style.top = zahl + hohe;
					}
				}
				}
			}
		}
	}
}


