// store an interval in a variable

var pause = 8000;

// create and initialize a counter                                    

var n = 0; 

// create an array of image file names                                         

var imgs = new Array ("./photos/apple2008_1.jpg", "./photos/apple2008_2.jpg",  "./photos/apple2008_5.jpg", "./photos/apple2008_3.jpg",   "./photos/apple2008_4.jpg", "./photos/apple2008_7.jpg","./photos/apple2008_8.jpg",   "./photos/apple2008_11.jpg", "./photos/apple2008_9.jpg","./photos/apple2008_10.jpg","./photos/apple2008_12.jpg", "./photos/apple2008_6.jpg");


// a function to display each image for the set interval

function rotate()
{                       
  document.images.pic.src = imgs[n];                   
  ( n == (imgs.length - 1 )) ? n = 0 : n++;  
  setTimeout( "rotate()", pause );                              
}

// specify the onload event-handler

window.onload = rotate;

