
var banner;
var theTop = 1;
var old = theTop;

function initbannermove()
{
  banner = new getObj('banner');
  movebanner();
}

function movebanner()
{
  if (window.innerHeight)
    {
     pos = window.pageYOffset-100
    }
    else if (document.documentElement && document.documentElement.scrollTop)
      {
       pos = document.documentElement.scrollTop-100
      }
      else if (document.body)
        {
	 pos = document.body.scrollTop-100
	}

  if (pos < theTop)
    {
     pos = theTop;
    }
  else
    {
     pos += 1;
    }

  if (pos == old)
    {
     banner.style.top = pos+'px';
    }

  old = pos;
  temp = setTimeout('movebanner()',250);

}


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 getObjNN4(obj,name)
{
  var x = obj.layers;
  var foundLayer;

  for (var i=0;i<x.length;i++)
    {
     if (x[i].id == name)
       {
        foundLayer = x[i];
       }
       else if (x[i].layers.length)
         {
          var tmp = getObjNN4(x[i],name);
	 }
      if (tmp) foundLayer = tmp;
    }
  return foundLayer;
}
