
/** Navigation Bar Floater ******************************************************************/


var floater;
var floatersub;
var LeftMargin = 0;
var old = LeftMargin;
var delay = 170;


function init()
{
	floater = new getObj('menu');
	floatersub = new getObj('content');
	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.scrollLeft)
	{	scrolled = document.documentElement.scrollLeft}
	
	else if (document.body)					// IE
	{	scrolled = document.body.scrollLeft}

	if (scrolled < LeftMargin) scrolled = LeftMargin;
	else scrolled += 0;

	if (scrolled != old)
	{
//		** always use defined small steps ** changed '0.1' to '.05' to help reduce stutter, makes it lag more
		scrolled = (.05 *(scrolled-old))+old;
		floater.style.left = scrolled + "px";
		floatersub.style.left = scrolled + "px";
	}
	
	old = scrolled;
	temp = setTimeout('movefloater()',20);
	
/* Timeout defines the "lag" in the Nav Floater catching up to the screen placement: */
/* the lower the number the less the lag, the higher the smoother the "slide" effect  */	
}

