function animate(){
imgname="images/2010/screenshots/shot";
numofimages=4;
loop=false;
waittime=0;/*How long to wait before displaying the animation. Allows the images to preload.*/
i=0;
imagearray=new Array(numofimages);
for(j=0;j<numofimages;j++){
imagearray[j]=new Image(50,101);
j++;/*Crude hack to keep JavaScript from thinking we're trying to append 1 as a string*/
imagearray[j-1].src=imgname + j + ".png";
j--;
}
setTimeout("doanimation()", waittime*1000);
}
function doanimation(){
document.getElementById("anipng").src=imagearray[i].src;
i++;
if(i!=numofimages){
setTimeout("doanimation()", 3000); /* 150 ms delay between frames */
}
if(i==numofimages && loop){
i=0;
setTimeout("doanimation()", 3000)
}
}
