//Java routine to run the slideshow
// 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 ( "./images/2007_1.jpg","./images/2007_2.jpg","./images/2007_10.jpg","./images/2007_13.jpg","./images/2007_3.jpg","./images/2007_11.jpg","./images/2007_12.jpg","./images/2007_17.jpg","./images/2007_15.jpg","./images/2007_18.jpg","./images/2007_19.jpg","./images/2007_6.jpg","./images/2007_21.jpg","./images/2007_5.jpg","./images/2007_8.jpg","./images/2007_9.jpg" ,"./images/2007_20.jpg" ,"./images/2007_16.jpg" ,"./images/2007_22.jpg" ,"./images/2007_4.jpg" ,"./images/2007_14.jpg","./images/2007_7.jpg"   );

// preload all the images

// var preload = new Array();                             

// for( var i = 1; i < imgs.length; i++ )
//{                                            
//  preload[i] = new Image();           
//  preload[i].src = imgs[i];                                     
//}

// 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;