// 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/tr1.jpg", "./photos/tr3.jpg",  "./photos/tr2.jpg", "./photos/tr5.jpg",  "./photos/tr4.jpg", "./photos/tr6.jpg", "./photos/tr7.jpg","./photos/tr8.jpg", "./photos/tr10.jpg", "./photos/tr11.jpg", "./photos/tr9.jpg", "./photos/tr12.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;

