ver   = navigator.appVersion 
dom   = (document.getElementById) ? 1:0;
ie5   = (ver.indexOf("MSIE 5")>-1 && dom) ? 1:0;
ie    = (document.all && !dom) ? 1:0;
ns6   = (dom && parseInt(ver) >= 5) ? 1:0;
ns    = (document.layers && !dom) ? 1:0;
dhtml = ((dom || ie || ns) && navigator.userAgent.indexOf("Opera")<0) ? 1:0;




if(dhtml) {
  ImagesLoad = new Array ('dancer')
  ImagesList = new Array ()
  for (counter in ImagesLoad) {
    ImagesList[counter] = new Image()
    ImagesList[counter].src = ImagesLoad[counter] + '.gif'
  }
}



function Init_Scroll()  {
  if(dhtml) {
    dancer=dom?document.getElementById("Animation").style:ie?document.all.Animation.style:ns?document.Animation:0;
    dancer.visibility = "visible";
    Scrollen();
  }
}



function Scrollen()  {
  Breite = ie?screen.availWidth  : ie5?document.body.clientWidth  : (ns||ns6)?window.innerWidth  : 0;
  Hoehe  = ie?screen.availHeight : ie5?document.body.clientHeight : (ns||ns6)?window.innerHeight : 0;

Breite=screen.width;
Hoehe=screen.height;

  X0 = Breite/2 + 350;
  Y0 = Hoehe/2*460/Hoehe+8;
  if (ns || ns6)
  {
     Y0=Y0-8;
  }


  StreckungX = 190;
  StreckungY = 100;

  dancer.left = parseInt(dancer.left)+4;
  dancer.top  = -(Math.cos((parseInt(dancer.left)-X0)/StreckungX)*StreckungY)+Y0;

  if (parseInt(dancer.left) > Breite)  {
    location.href="http://www.whisky-piano-bar.de/frindex0.htm";
  }
  else  {
    setTimeout('Scrollen()', 40);
  }
}



function write_layer()  {
  if(dhtml)  {

    Layer =  '<DIV STYLE="visibility:hidden"></DIV>'
    Layer += '<DIV ID="Animation" STYLE="position:absolute; left:-400; top:0; width:360; visibility:hidden">'
    Layer += '<table border="0" cellpadding="0" cellspacing="0">'
    Layer += '<tr>'
    Layer += '<td><img src="dancer0.gif" width="64" height="64"></td>'
    Layer += '</tr>'
    Layer += '</table>'
    Layer += '</DIV>'

    document.writeln(Layer);
  }
}



window.onload = Init_Scroll