<!--
  // Inhalt: Abgespeckte Version der zu FrontPage gehörigen Effekt-Bibliothek "animate.js".
  //
  // verbliebener Effekt: Einfliegen von Grafiken von der rechten Seite ins Bild.
  // geeignete Browser:   Alle. Bei Browser-Typen, die das W3C-DOM unterstützen bzw.
  //                      nur dieses DOM kennen, werden die Grafiken jedoch nur statisch
  //                      angezeigt, ohne Animation. Das sind NN6+, Opera 6+, Mozilla 1+.
  //
  // Im Quelltext:
  //
  //  <body onload="dynAnimation()">
  //
  //  <p id="fpAnimflyRightFP1" style="position: relative; visibility: hidden">
  //    <a href="abc.asp"><img src="grafik1.gif"></a>
  //  </p>
  //
  //  <p id="fpAnimflyRightFP2" style="position: relative; visibility: hidden">
  //    <a href="def.asp"><img src="grafik2.gif"></a>
  //  </p>
  //


  fpanimationPrefix = "fpAnim"
  animateElements = new Array()
  currentElement = 0
  speed = 1
  stepsFly = 17
  step = 0

  ms = navigator.appVersion.indexOf("MSIE")
  ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4)
  dom = (document.getElementById)



  function dynAnimation() {
    if (ie4 || !dom) {
      initAnimation();
    } else {
      switchToStatic()
    }
  }


  function switchToStatic() {
    for(index = 0; index < document.getElementsByTagName("p").length; index++) {
      if (0 != document.getElementsByTagName("p")[index].id.indexOf(fpanimationPrefix)) {
        continue
      }
      document.getElementsByTagName("p")[index].style.visibility = "visible"
    }
  }


  function initAnimation(obj) {
    animateElements = new Array()

    if(!ie4) {
      if((navigator.appName == "Netscape") && (parseInt(navigator.appVersion.substring(0, 1)) >= 4)) {
        doc_els = document.layers
      } else {
        return
      }
    } else {
      doc_els = document.all
    }

    i = 0
    for (index=0; index < doc_els.length; index++) {
      el = doc_els[index]
      if(0 != el.id.indexOf(fpanimationPrefix)) {
        continue
      }

      if (ie4) {
        elprops = el.style
        docWidth = document.body.offsetWidth
      } else {
        elprops = el
        docWidth = window.innerWidth
      }

      animationId = el.id.substring(6,el.id.length)
      animation = remSuffix(animationId)
      if (null != animation && animation == "flyRight") {
        elprops.posLeft = docWidth - offsetLeft(el)
        el.initLeft = elprops.posLeft
        elprops.visibility = "hidden"

        if(!ie4) {
          elprops.left = elprops.initLeft
        }
        animateElements[i++] = el
      } else {
        continue
      }
    }

    if (animateElements.length > 0) {
      window.setTimeout("animate(0);", speed)
    }
  }


  function remSuffix(str) {
    return str.substring(0, str.indexOf("FP"))
  }


  function offsetLeft(el) {
    if (ie4) {
      x = el.offsetLeft
      for (e = el.offsetParent; e; e = e.offsetParent) {
        x += e.offsetLeft
      }
    } else {
      x = el.pageX
    }
    return x
  }



  function animate() {
    el = animateElements[currentElement]
    animationId = el.id.substring(6,el.id.length);
    animation = remSuffix(animationId)

    if (ie4) {
      elprops = el.style
    } else {
      elprops = el
    }

    if(step == 0) {
      elprops.visibility="visible"
    }
    step++

    steps = stepsFly
    elprops.posLeft -= el.initLeft/steps

    if (step >= steps) {
      elprops.posLeft = 0
      step = 0
      currentElement++
    }

    if (!ie4) {
      elprops.left = elprops.posLeft
    }

    if (currentElement < animateElements.length) {
      window.setTimeout("animate();", speed)
    } else {
      currentElement=0
    }
  }

//-->



