
  //  load a pre-built page in a new popup window
	function popupPage(Url,Width,Height) {
		var	XLoc = ( ( window.screen.availWidth - Width ) / 2 );
		var	YLoc = ( ( window.screen.availHeight - Height ) / 2 );
		popupWin = window.open( Url, 'Popup', 'width='+Width+',height='+Height+',top='+YLoc+',left='+XLoc+',status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no');
        popupWin.focus()
	}


//  floating menu follows scroll position
  var menu;
  var theTop = 164; //menu distance from top in pixels
  var old = theTop;

function initMenu() {
	menu = new getObj('leftMenu1'); //name of div to move
	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 += 30;
	if (pos == old)
	{
		menu.style.top = pos;
	}
	old = pos;
	temp = setTimeout('movemenu()',50); // menu position refresh time in ms
}

function getObj(name) // Mini API for multi-browser support of selecting elements
{
  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];
  }
}
