// JavaScript Document
function aon(level, id)
{
	if (curid != id)
	{
		document.getElementById("ul-" + id).className = "sel-" + level + " mo-color-1";	
		document.getElementById("a-" + id).className = "ci-smallhead menuelink mo-color-1";	
	}
}

function aoff(level, id)
{
	if (curid != id)
	{
		document.getElementById("ul-" + id).className = "sel-" + level + " sel-color-" + level;	
		document.getElementById("a-" + id).className = "menuelink sel-color-" + level;	
	}
}

function on(level, id)
{
	if (level < 1)
	{
		document.getElementById("ul-" + id).className = "sel-" + level + " sel-color-" + level;	
		document.getElementById("a-" + id).className = "menuelink sel-color-" + level;	
	}
	else
	{
		document.getElementById("ul-" + id).className = "sel-" + level + " mo-color-1";	
		document.getElementById("a-" + id).className = "menuelink mo-color-1";	
	}
}
function off(level, id)
{
	document.getElementById("ul-" + id).className = "uns-" + level + " uns-color-" + level;	
	document.getElementById("a-" + id).className = "menuelink uns-color-" + level;	
}
function wxlBgCol(id,farbe) {
   if (document.all) 
      document.all[id].className=farbe;
   else 
      if (document.getElementById)
         document.getElementById(id).className=farbe;
      else 
         if (document.layers) 
            document.layers[id].bgColor=farbe;
}
function mo_swap_hin(swaphin, swaptext, smallhead)
{
  if (document.all) 
  {
		originaltext=document.all.motext.innerHTML;
		document.all.motext.innerHTML = unescape(swaptext);
		originalhead=document.all.smallhead.innerHTML;
		document.all.smallhead.innerHTML = unescape(smallhead);
	}
	else
	{
		originaltext=document.getElementById('motext').innerHTML;
		document.getElementById('motext').innerHTML = unescape(swaptext);
		originalhead=document.getElementById('smallhead').innerHTML;
		document.getElementById('smallhead').innerHTML = unescape(smallhead);
	}
	originalbild=document.momapbild.src;
	document.momapbild.src=swaphin;
}
function mo_swap_her()
{
	document.momapbild.src=originalbild;
  if (document.all) 
  {
		document.all.motext.innerHTML=originaltext;
		document.all.smallhead.innerHTML=originalhead;
	}
	else
	{
		document.getElementById('smallhead').innerHTML=originalhead;
	}
}
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
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;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
function wxlBgCol(id,farbe) {
   if (document.all) 
      document.all[id].className=farbe;
   else 
      if (document.getElementById)
         document.getElementById(id).className=farbe;
      else 
         if (document.layers) 
            document.layers[id].bgColor=farbe;
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function gehezu(wohin)
{
	document.location.href=wohin;
}

function mcr(a,b)
{
   var m;
   var c;
   var at = "@";
   c = '\m\a\i\lt\o';
   m = a + at + b;
   document.location.href = c + ":" + m + ".de";	
}

function PopUp(adresse,breite,hoehe,popupname,enlarge)
{
	if (enlarge > 0) {
		breite = breite + enlarge;
		hoehe = hoehe + enlarge;
	}
	var optionen = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0";
	window.open(adresse, popupname, optionen + ',width=' + breite + ',height=' + hoehe);
}

function highlight(form,element)
{
    document.forms[form].elements[element].focus()
    document.forms[form].elements[element].select()
}

function clipcopy(form,element)
{
    document.forms[form].elements[element].focus()
    document.forms[form].elements[element].select()
    document.forms[form].elements[element].createTextRange().execCommand("Copy")
}

function open_window(obj) {
  obj.target = '_blank';
}

var count = 1;
var timeout = 3000;
images = new Array(); 
function swapKeyvis()
{
	MM_changeProp('maintop','','style.backgroundImage','url('+ images[count] + ')','DIV'); 
	if (count == images.length - 1) {
		count = 0;
	} else {
		count ++;
	}
	setTimeout("swapKeyvis()",timeout);
}

function preloadImages(imgArr)
{ 
	loadArr = new Array();
	for(var i=0; i<imgArr.length; i++)
	{
		loadArr[i] = new Image;
		loadArr[i].src = imgArr[i];
	}
}
