delay=1500
count=0
move=1
going=false
timer=null

pic = new Array(24);

for (i=0; i<24; i++)  {
   pic[i] = new Image();
   pic[i].src = "gridani/gp" + i + ".gif";
   
}

  function nextpic()
    {
      count+= move
         if (count<0)
      count = 22
         if (count>23)
      count = 0
  document.motion.src = pic[count].src
     }

  function animate()
     {
      if (going)
          clearTimeout(timer)
            nextpic()
               timer = setTimeout("animate()",delay)
     }

  function slower()
     {
      delay = delay + 100
      if (delay >4000) delay = 4000
     }

  function faster()
     {
     delay = delay - 100
     if (delay <0) delay = 0
     }
