var timer1=null;
// needed for xhtml dtds 
px = (document.getElementById) ? "px" : "";
// use the offset variable to refine the pointers end position
// setting it to 0 sees the pointer end at left position of element
// so if we need to adjust it so that the pointer centers over text etc.. 
// then this is the variable to use;
var offset = 8;

// Controls the speed of the animation
var timerspeed = 25;
// controls the number of step from point a to point b. higher numbers see a decrease in speed
var steps = 13;
// controls the deceleration
// dont recommend changing this var as this number seems to work well across all browsers
var decrease = 0.09; 

// gets the current position of the link;
function getPosition(id) { 
if (document.getElementById) {
		endPos = document.getElementById(id).offsetTop;
}
else if (document.layers) {
		endPos = document.layers[id].top;
}
}	

// shoves the pointer around the screen based on what current link is activated
// to make a vertical one just change offsetLeft to offsetTop
// and change any references to .left to .top
// see my home page for an example
// http://www.dhtmlnirvana.com/

function glideMenu(obj) 
{
	upcount=0;
	if (document.getElementById) 
	{
		el = document.getElementById(obj).style ;
	}
	if (document.layers) 
	{
		el = document.layers[obj] ;
	}
	el.xpos = parseInt(el.top);
	if (el.xpos > endPos) 
	{
		clearTimeout(timer1);
		upcount=5;
	}
	else if (el.xpos <= endPos) 
	{
		clearTimeout(timer1);
	}
	distance = endPos - el.xpos + offset;
	steps = distance*decrease; 
	
	el.xpos += steps;
	el.top = el.xpos-upcount+px ;
	timer1= setTimeout("glideMenu('" + obj + "')",timerspeed);
}
// refresh the page on a window resize so ns4 doesnt screw the layers up
window.onresize = function () {
		history.go(0);
}


<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
