var menu;
var theTop = 2;
var old = theTop;

function init()
{
        menu = new getObj('menu');
        movemenu();
}

function movemenu()
{
        if (window.innerHeight)
        {
                  pos = window.pageYOffset
        }
        else if (document.documentElement && document.documentElement.scrollTop)
        {
                pos = document.documentElement.scrollTop
        }
        else if (document.body)
        {
                  pos = document.body.scrollTop
        }
        if (pos < theTop) pos = theTop;
        else pos += 2;
        if (pos == old)
        {
                menu.style.top = pos;
        }
        old = pos;
        temp = setTimeout('movemenu()',250);	// fo test; then set back to 500
}

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 = document.layers[name];
        this.style = document.layers[name];
  }
}

window.onload = initialize; 

/* No window.onload = function () {} ? Because NN3 doesn't support the function
	constructor and gives an error message. (quirksmode.org) must be accessible to NN3 */

function initialize () {
if (self.init) self.init();
}

window.onunload = remove;

function remove () {
	if (self.exit) self.exit();
}
