Change the speed of the animation by changing the number given by delay:
e.g. delay 1000 => 1 image/second, delay 500 => 2 images/second, etc.
MDI animation based on the javascript 'animator' written by Mark Hadfield