pix = new Array(frames); an array to store (preload) the pictures
var count=0; a counter which will be used to keep
track of which picture is being displayed
var delay=100; the pause in milliseconds between frames
var frames=6; the number of frames
var boo=false; a boolean used to turn the animation on and off
(if needed)
var direction=1;

an increment, set to +1 or -1 depending
on whether we are counting up or down. Useful in animations involving back and forth or up and down motion, or involving oscillation through a series of frames.

var ncells=3;

for multi-cell animations, the number of cells

var pos=0;

A counter, to keep track of the position of a moving object.

function loada( ){
for (i=0;i<frames;i++){
  pix[i]=new Image();
  pix[i].src="o"+(i+1)+".jpg";
 }
}

a function used to preload the images;
preloading saves time and network traffic.
Some browsers seem to refresh image on each
rollover unless images are loaded through array.

...typically activated through
<body onload="loada( )">