// store an interval in a variable

var pause = 6000;

// create and initialize a counter                                    

var n = 0; 

// create an array of image file names                                         

var imgs = new Array ("./photos/spence1.jpg", "./photos/spence2.jpg",  "./photos/spence3.jpg", "./photos/spence4.jpg",   "./photos/spence5.jpg","./photos/spence6.jpg","./photos/spence7.jpg", "./photos/spence9.jpg", "./photos/spence8.jpg",  "./photos/spence10.jpg", "./photos/spence13.jpg", "./photos/spence12.jpg", "./photos/spence11.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;

