ÿþ<html> <head> <title>PK Slide Show</title> </head> <body bgcolor=606060 onLoad="timer=setInterval('run()',interval)"> <p style="display:inline; color:white; font:bold 14pt">Pre-K Class <b>Moving Up</b> Day: June 7 2009. <br /> Teacher: Ξ&“ï–€+^, Ms. Alice Wong, Teacher Assistant: \miOe€+^, Ms. Kelly Shang</p> <div align=right> <img src=../img/PK1.JPG name=slideShow> <form align=right> <input type=button value=" Prev " onClick="move(-2);run()"> <input type=button value=" Next " onClick="move(+0);run()">&nbsp;&nbsp;&nbsp; <input type=button value=" Start " onClick="run();timer=setInterval('run()',interval)"> <input type=button value=" Stop " onClick="clearInterval(timer);"> </form> </div> <script language="javascript"> //-------------- Change the following to customize your slide show ------------------ var imgName = "../img/PK"; //URL of the images var imgType = ".JPG"; //type of image .gif, .jpg or .png var total = 15; //total number of images var next = 2; //start image number var repeat = true; //continue loop? true or false var interval = 2000; //interval 2 second //-------------- Do not alter the code below ---------------------------------------- var picArray = new Array(); //Create Array to store images for (var i = 1; i <= total; i++) { picArray[i] = new Image(); //Create an Image object picArray[i].src = imgName + i + imgType; //Load object with the .jpg file } function run() { document.slideShow.src = picArray[next].src; //Move next image into slideShow next = next+1; if (repeat && next > total) //if repeat is requested next = 1; //reset number to 1 if (next > total) clearInterval(timer); //stop the show } function move(direction) { next += direction; if (next > total) next = 1; if (next < 1) next = total; document.slideShow.src = picArray[next].src; //Move next image into slideShow } </script> </body> </html>