
/*
Snoopy Follow Cursor Trail
Visit http://www.rainbow.arch.scriptmania.com/scripts/
*/

var Ver4=parseInt(navigator.appVersion.charAt(0))>=4
var IE=navigator.appName.indexOf("Microsoft")!=-1
var Netscape=navigator.appName.indexOf("Netscape")!=-1

var al, ex=20, ey=20, x0=20,y0=20

  
function MoveMenu()
{
    
  if (Math.abs(ey-y0)>=10) { y0+=Math.floor((ey-y0)*0.1) }
  else if (ey!=y0) { y0+=Math.abs(ey-y0)/(ey-y0) }
  
  
  
if (!IE) {   
  al.left=x0-2+'px'
  }else{
 al.left=x0+'px'
} 
al.top=y0+'px'

  setTimeout("MoveMenu();",100)
}

function MainScrollEvent(e)
{ 
  if (Ver4)
  { if (!IE)
    {	
     ey=window.pageYOffset || document.body.scrollTop
	}
    else
    { 
     ey=window.pageYOffset || document.body.scrollTop
    }
  }
  if (ey<20) ey=20
}



function ScriptSetup()
{ 
   
  if (Ver4)
    { 
	if (!IE)
    { 
	 // alert("ScriptSetup -notIE")
	  al=document.getElementById("glideDiv").style
	  //document.captureEvents(Event.MOUSEMOVE)
	 al.left=x0-2+'px'
	
    } else{
	 //alert("ScriptSetup -IE")
	 al=document.all.glideDiv.style 
	}
     window.onscroll = MainScrollEvent
     MoveMenu()
  }
}


window.onload = ScriptSetup







