//Browsersniffing
    ie=(document.all)? 1:0;
    nn=(document.layers)? 1:0;
    gecko=(document.getElementById)? 1:0;

    if(ie) {
      teil1="document.all.";
      teil2=".style.";
      teil3="pixelTop=";
      teil4="pixelLeft=";
      teil5="document.body.scrollTop+125";
      teil6="document.body.offsetWidth";
      teil7="document.body.scrollTop";
      teil8="pixelTop";
    }

    if(nn) {
      teil1="document.";
      teil2=".";
      teil3="top=";
      teil4="left=";
      teil5="window.pageYOffset+125";
      teil6="window.innerWidth";
      teil7="window.pageYOffset";
      teil8="top";
    }

    if(gecko && !ie) {
      teil1="document.getElementById('";
      teil2="').style.";
      teil3="top=";
      teil4="left=";
      teil5="window.pageYOffset+125";
      teil6="window.innerWidth";
      teil7="window.pageYOffset";
      teil8="top";
    }
//Browsersniffing Ende

//Scrollmenue Lexikon
function checkLocation() {
  object="object1";
  posx=eval(teil6+"/2+335");
  eval(teil1+object+teil2+teil4+"posx");
  pos0 = parseInt(eval(teil1+object+teil2+teil8));
  yy = eval(teil5);
  step = parseInt((eval(yy-pos0))/35);
  posn = eval(parseInt(pos0+step));
  if(posn >=580) {
    eval(teil1+object+teil2+"visibility = 'visible'");
  }
  else {
    eval(teil1+object+teil2+"visibility = 'hidden'");
  }
  eval(teil1+object+teil2+teil3+posn);
  setTimeout("checkLocation()",40);
}
//Scrollmenue Lexikon Ende

//Aktuelles Startseite
function checkLoca2() {
  object="aktu";
  posx=eval(teil6+"/2-378");
  eval(teil1+object+teil2+teil4+"posx");
}
//Aktuelles Startseite Ende

//Menuechange
function onOver(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "#afafaf";
    td.style.cursor = "hand";
    td.style.borderTopColor = "#484848";
    td.style.borderLeftColor = "#707070";
    td.style.borderRightColor = "#e0e0e0";
    td.style.borderBottomColor = "#eeeeee";
  }
}

function onOut(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "#c9c9c9";
    td.style.borderTopColor = "#eeeeee";
    td.style.borderLeftColor = "#e0e0e0";
    td.style.borderRightColor = "#707070";
    td.style.borderBottomColor = "#606060";
  }
}

function onOverun(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "#a0a0a0";
    td.style.cursor = "hand";
    td.style.borderTopColor = "#373737";
    td.style.borderLeftColor = "#707070";
    td.style.borderRightColor = "#bfbfbf";
    td.style.borderBottomColor = "#e2e2e2";
  }
}

function onOutun(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "#b7b7b7";
    td.style.borderTopColor = "#eeeeee";
    td.style.borderLeftColor = "#e0e0e0";
    td.style.borderRightColor = "#707070";
    td.style.borderBottomColor = "#606060";
  }
}

function onOverre(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "#aa0000";
    td.style.color = "#eecc00";
    td.style.cursor = "hand";
    td.style.borderTopColor = "#880000";
    td.style.borderBottomColor = "#f00000";
    td.style.borderLeftColor = "#a80000";
    td.style.borderRightColor = "#e00000";
  }
}

function onOutre(td){
  if(document.getElementById||(document.all && !(document.getElementById))){
    td.style.backgroundColor = "bb0000";
    td.style.borderTopColor = "#f00000";
    td.style.borderBottomColor = "#880000";
    td.style.borderLeftColor = "#e00000";
    td.style.borderRightColor = "#a80000";
  }
}

function changeLoc(address){
  window.location.href = address;
}

function neuesfenster(welcheDatei,b,h,t,l)
{fenster=window.open(welcheDatei, 'f10', 'inner width=b, inner height=h, top=t, left=l');
 fenster.focus();
}
//Menuechange-Ende



//Animation Katze
function reloadPage(init2)
  {if (init2==true) with (navigator)
    {if ((appName=="Netscape")&&(parseInt(appVersion)==4))
      {document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage;
      }
    }
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
  }
reloadPage(true);

function init2()
 //posx fisch = Ebene e1 posx    //
 {posx = parseInt(eval(teil1+"e1"+teil2+"left"));
  //posy moritz = Ebene e2 posy
  posy = parseInt(eval(teil1+"e2"+teil2+"top"));
  //posx2 moritz Breitenunabhängig
  posx2=eval(teil6+"/2+24");
  eval(teil1+"e2"+teil2+teil4+"posx2");
  //posx2 moritz_schwarz Breitenunabhängig
  posx3=eval(teil6+"/2+2");
  eval(teil1+"e3"+teil2+teil4+"posx3");
  //posx4 fisch blende Breitenunabhängig
  posx4=eval(teil6+"/2-1000");
  eval(teil1+"e4"+teil2+teil4+"posx4");

   //Wenn x-Position der Hai-Ani >= x-Position Moritz-Kopf - 360
   if(posx >= posx2-360)
     //Wenn y-Position von Moritz-Kopf <= 184
     {if (posy <= 184)
        //dann Moritz-Kopf posy = 183
        {eval(teil1+"e2"+teil2+"top = "+"183");
     }
     //Sontst y-Position von Moritz-Kopf - 1
     else {posy -= 1;
              //dann: Moritz-Kopf = posy neu
              eval(teil1+"e2"+teil2+"top = "+posy);
     }
   }

   //Wenn die Position der Hai-Ani >= der Position von Moritz-Kopf - 72
   if(posx >= posx2-72)
     //Wenn die y-Position von Moritz-Kopf >= 210
     {if (posy >= 210)
        //dann Moritz-Kopf posy = 219
        {eval(teil1+"e2"+teil2+"top = "+"219");
        }
        //Sonst: Moritz-Kopf posy + 10
        else {posy += 10;
              //dann: Moritz-Kopf = posy neu
              eval(teil1+"e2"+teil2+"top = "+posy);
             }
     }

  if(posx >= posx2-48)
    //wenn fisch posx>=posx2-47 dann fisch an Anfang
    {eval(teil1+"e1"+teil2+"left = "+"-170");
    }
  else {
        posx += 1;
        //sonst: fisch posx +1
        eval(teil1+"e1"+teil2+"left = "+posx);
       }
 setTimeout("init2()",30);
 return true;
 }
//Animation Katze-Ende


//Auffahr Menue
function reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function swapImgRestore() {
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function findObj(n, d) {
  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=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() {
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var id1,id2;

function raufrunter(richtung) {
  posy = parseInt(document.getElementById('Layer1').style.top);
  if(richtung == 1) {
        //Ebene nach oben
    if(posy >= 420)  {
          clearTimeout(id2);
      posy -= 4;
           document.getElementById('Layer1').style.top = posy;
    }
  //sagt, wann er zu wiederholen hat
  id1=setTimeout("raufrunter("+richtung+")",30);
  }
  else  {
        //Ebene nach unten
    if(posy <= 566) {
           clearTimeout(id1);
           posy +=4;
           document.getElementById('Layer1').style.top = posy;
        }
//sagt, wann er zu wiederholen hat
id2=setTimeout("raufrunter("+richtung+")",30);
  }
}
//Auffahr Menue Ende


//Datum-Uhrzeit
function zeit() {
  var Wochentagname = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch",
                                "Donnerstag", "Freitag", "Samstag");
  var Jetzt = new Date();
  var Tag = Jetzt.getDate();
  var Monat = Jetzt.getMonth() + 1;
  var Jahr = Jetzt.getYear();
  if (Jahr < 999)
    Jahr += 1900;
  var Stunden = Jetzt.getHours();
  var Minuten = Jetzt.getMinutes();
  var Sekunden = Jetzt.getSeconds();
  var WoTag = Jetzt.getDay();
  var Vortag = (Tag < 10) ? "0" : "";
  var Vormon = (Monat < 10) ? ".0" : ".";
  var Vorstd = (Stunden < 10) ? "0" : "";
  var Vormin = (Minuten < 10) ? ":0" : ":";
  var Vorsek = (Sekunden < 10) ? ":0" : ":";
  var Datum = Vortag + Tag + Vormon + Monat;
  var Uhrzeit = Vorstd + Stunden + Vormin + Minuten + Vorsek + Sekunden;
  var WoTaName = Wochentagname[WoTag];

  if (DHTML) {
    if (NS4) {
      setContent("id", "Date", null, '<span class="Date">' + Datum + "<\/span>");
    } else {
      setContent("id", "Date", null, Datum);
    }
    window.setTimeout("zeit()", 1000000);
  }

  if (DHTML) {
    if (NS4) {
      setContent("id", "Jahr", null, '<span class="Jahr">' + Jahr + "<\/span>");
    } else {
      setContent("id", "Jahr", null, Jahr);
    }
    window.setTimeout("zeit()", 1000000);
  }

  if (DHTML) {
    if (NS4) {
      setContent("id", "Uhr", null, '<span class="Uhr">' + Uhrzeit + "<\/span>");
    } else {
      setContent("id", "Uhr", null, Uhrzeit);
    }
    window.setTimeout("zeit()", 1000);
  }

  if (DHTML) {
    if (NS4) {
      setContent("id", "W-Tag", null, '<span class="W-Tag">' + WoTaName + "<\/span>");
    } else {
      setContent("id", "W-Tag", null, WoTaName);
    }
    window.setTimeout("zeit()", 1000000);
  }

}
//Datum-Uhrzeit Ende