var ns=document.layers ? 1 : 0;
if (ns){
 window.captureEvents(Event.MOUSEMOVE);
 // Logo animation
 var yBase = 200;
 var xBase = 200;
 var delay = 10;
 var yAmpl = 10;
 var yMax = 40;
 var step = .2;
 var ystep = .5;
 var currStep = 1;
 var tAmpl=1;
 var Xpos = 500;
 var Ypos = 500;
 var j = 0;
 var visible = 0; // 0=false;1=true

 function MoveHandler(evnt)
 {Xpos = evnt.pageX ;
  Ypos = evnt.pageY ;
 }

 window.onMouseMove = MoveHandler;
 
 function setVisible(setAttr) {
  if (ns) {
   visible = setAttr;
   for ( j = 0 ; j < 7 ; j++ ) {
    document.layers[j].top = -1;
    document.layers[j].left = -1;
   }
  }
 }

 function animateLogo() {
  if (visible==1) {
   yBase = window.innerHeight/4 ;
   xBase = window.innerWidth/4;
   for ( j = 0 ; j < 7 ; j++ ) {
    document.layers[j].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
    document.layers[j].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
   }
   currStep += step;
  }
  setTimeout("animateLogo()", delay);
 }

 animateLogo()
}
