//DIE VOEGELCHEN INITIALISIEREN
netscape = (document.layers) ? 1:0
goodIE = (document.all) ? 1:0

var delay = 15;
var yAmpl = 3;
var yMax = 8;
var step = .3;
var ystep = .3;
var currStep = 0;
var tAmpl=1;
var j = 0;
var Xpos = 300;
var Ypos = 360;
document.onmousemove = MoveHandler;

if (netscape)
{
  window.captureEvents(Event.MOUSEMOVE);
  // Logo animation
  var yBase = window.innerHeight/2;
  var xBase = window.innerWidth/2;
  window.onMouseMove = MoveHandler;
}

function MoveHandler(e)
{
  if (netscape || goodIE)
  {
    Xpos = (netscape)?e.pageX:event.x
    Ypos = (netscape)?e.pageY:event.y
  }
}

function startup()
{
  if (netscape)
  {
    Xpos = 50;
    Ypos = 50;
    document.a1.visibility='visible';
  }
  else if (goodIE)
  {
    document.all.a1.style.visibility='visible';
    var windowWidth=document.body.clientWidth; 
    var windowHeight=document.body.clientHeight; 
    Xpos = (windowWidth/2);
    Ypos = (windowHeight/2);
  }
}

function littlebirds()
{
  if (netscape)
  {
    yBase = window.innerHeight/4 ;
    xBase = window.innerWidth/4;

    document.layers[0].top = Ypos+Math.cos((20*Math.sin(currStep/(85)))+70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep+55)/10);
    document.layers[0].left = Xpos+Math.sin((20*Math.sin(currStep/85))+70)*xBase*(Math.sin(10+currStep/(10))+0.2)*Math.cos((currStep+55)/10);

    // document.layers[0].top = Ypos - 10;
    // document.Layers[0].left = Xpos - 30;

    currStep += step;
    setTimeout("littlebirds()", 10) ;
  }
  else if (goodIE)
  {
    var yBase =document.body.clientWidth/4;
    var xBase =document.body.clientHeight/4;

    eval ("document.all.a1.style.top = Ypos+Math.cos((20*Math.sin(currStep/(85)))+70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep+55)/10)");
    eval ("document.all.a1.style.left = Xpos+Math.sin((20*Math.sin(currStep/85))+70)*xBase*(Math.sin(10+currStep/(10))+0.2)*Math.cos((currStep+55)/10)");

    // eval ("document.all.a1.style.top = Ypos - 10");
    // eval ("document.all.a1.style.left = Xpos - 30");

    currStep += step;
    setTimeout("littlebirds()", 10) ;
  }
}
