/*****************************************************
     Floater-Code (Javascript)

	 Code kann frei verwendet werden, wenn der
	 URHEBERHINWEIS NICHT ENTFERNT wird

     (c) Sandra Wiegard 2002
	 www.Elfengleich.de
	 www.Sandra-Wiegard.de

*****************************************************/
var floater;
var floatersub;
var target = 0;
var old = target;


function initScroller()
{
	floater = new getObj('floater');
	movefloater();
}


function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
	this.obj = getObjNN4(document,name);
	this.style = this.obj;
  }
}


function movefloater()
{

	if (document.documentElement && document.documentElement.scrollTop) {
                d = document.documentElement.scrollTop;
        } else if (document.body) { // IE 
	        d = document.body.scrollTop;
        }

        if (d < target) d = target;
        else d += 0;

        if (d != old)
        {
                /** Immer kleine werdende Schritte definieren **/
                d = (.1 *(d-old))+old;
                floater.style.top = document.body.clientHeight - 40 + d + "px";
        }
        
        old = d;
        temp = setTimeout('movefloater()',5);
}

