
//Maße für die Animation
anzbreit=440
anzhoch=463

//schrittweite für den mover
weite=10

//geschmindigkeit der Animation
tempo=10

//links als vogabe in variable
linkniko="fundgrube/nikolausgo.html"
linkx1="fundgrube/x-mas1go.html"
linkx2="fundgrube/x-mas2go.html"
linkx3="fundgrube/x-mas3go.html"
linkx4="fundgrube/x-mas4go.html"
linkx5="fundgrube/x-mas5go.html"

link1="fundgrube/lachengo.html"
link2="fundgrube/fahrschulego.html"
link3="fundgrube/geistgo.html"
link4="fundgrube/keinenbockgo.html"
link5="fundgrube/behappygo.html"
link6="fundgrube/pferdego.html"
link7="fundgrube/karaokego.html"
link8="fundgrube/ferrarigo.html"
link9="fundgrube/liongo.html"
link10="fundgrube/nomilkgo.html"
link11="fundgrube/liebeserklaerunggo.html"
link12="fundgrube/grippewellego.html"
link13="fundgrube/frauamsteuergo.html"
link14="fundgrube/ringgo.html"
link15="fundgrube/hamsterdancego.html"
link16="fundgrube/ulkbaer2go.html"
link17="fundgrube/ulkbaer1go.html"
link18="fundgrube/billiggo.html"
link19="fundgrube/schnappigo.html"
link20="fundgrube/birdgo.html"
link21="fundgrube/stupidwomango.html"
link22="fundgrube/teddybaergo.html"
link23="fundgrube/krokodilgo.html"
link24="winnoisgo.html"
link25="fundgrube/pukeygo.html"

//startposition der Animation
startposx=-anzbreit
startposy=-anzhoch

//Browserabfrage
ie=0
ns4=0
dom=0
if(document.getElementById)
dom=1
if(document.layers)
ns4=1

//schreiben des Anzeigefeldes
function anzeige_erzeugen()
 {
  ttexte='<iframe name="video" src="" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>'
  document.write('<div id="gtkind" style="position:absolute; z-Index:100; width:'+anzbreit+'; height:'+anzhoch+'; visibility:hidden;">')
  document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">')
  document.write('<tr>')
  document.write('<td width="18" height="22" style="background-image: url(fundgrube/scriptimages/eol.gif);"></td>')
  document.write('<td width="404" height="22" align="right" valign="top" style="background-image: url(fundgrube/scriptimages/o.jpg);"><a href="javascript:weg()"><img src="fundgrube/scriptimages/close.gif" border="0" alt="Hinweis&nbsp;schliessen" /></a></td>')
  document.write('<td width="18" height="22" style="background-image: url(fundgrube/scriptimages/eor.gif);"></td>')
  document.write('</tr>')
  document.write('<tr>')
  document.write('<td width="18" height="324" style="background-image: url(fundgrube/scriptimages/l.jpg);"></td>')
  document.write('<td width="404" height="324" align="center" bgcolor="#000000"><font style="font-family:Verdana; font-size:14pt; color:#FFFFFF;">')
  document.write(ttexte+'</font></td>')
  document.write('<td width="18" height="324" style="background-image: url(fundgrube/scriptimages/r.jpg);"></td>')
  document.write('</tr>')
  document.write('<tr>')
  document.write('<td width="18" height="31" style="background-image: url(fundgrube/scriptimages/eul.gif);"></td>')
  document.write('<td width="404" height="31" align="center" style="background-image: url(fundgrube/scriptimages/u.jpg);"></td>')
  document.write('<td width="18" height="31" style="background-image: url(fundgrube/scriptimages/eur.gif);"></td>')
  document.write('</tr>')
  document.write('<tr>')
  document.write('<td width="440" height="95" colspan="3" style="background-image: url(fundgrube/scriptimages/fuss.gif);"></td>')
  document.write('</tr>')
  document.write('</table>')
  document.write('</div>')
 }

//anzeigeobject für browser anpassen
function getobj(obj)
 {
  return(ns4?document.layers[obj]:document.getElementById(obj).style)
 }

//wird im Body-tag der HTML-Datei aufgerufen
function start(datei)
 {
  startposx=-anzbreit
  startposy=(parseInt(document.getElementsByTagName("body")[0].scrollTop)-anzhoch)
  if(self.frames["video"].location.href.indexOf("xyz.html")<0)
  self.frames["video"].location.href=datei

  //anzeigefeld links oben aus dem Bildschirmbereich bringen
  getobj('gtkind').left=startposx
  getobj('gtkind').top=startposy
  //anzeigefeld sichtbar machen
  ns4?getobj('gtkind').visibility="show":getobj('gtkind').visibility="visible"
  //animation starten
  mover()
 }

//function für die Animation
function mover()
 {
  if(window.innerWidth)
   {
    //endposition für die Anzeige ermitteln
    posmaxx=((parseInt(window.innerWidth)-anzbreit)/2)-110
    posmaxy=((parseInt(window.innerHeight)-anzhoch)/2)+parseInt(document.getElementsByTagName("body")[0].scrollTop)
   }
  else
   {
    posmaxx=((parseInt(document.body.clientWidth)-anzbreit)/2)-110
    posmaxy=((parseInt(document.body.clientHeight)-anzhoch)/2)+parseInt(document.getElementsByTagName("body")[0].scrollTop)
   }

  //jeweilige horizontale/vertikale Schrittweite anpassen
  faktor=screen.height/screen.width
  if(startposx<posmaxx||startposy<posmaxy) //wenn zielposition nicht erreicht ist
   {
    //anzeigeobject bewegen
    if(startposx<posmaxx)
    startposx+=weite
    if(startposy<posmaxy)
    startposy+=(weite*faktor)
    getobj('gtkind').left=startposx
    getobj('gtkind').top=startposy
    setTimeout('mover()',tempo)
   }
 }

//ausblenden der Anzeige
function weg()
 {
  self.frames["video"].location.href="";
  ns4?getobj('gtkind').visibility="hide":getobj('gtkind').visibility="hidden"
}
