// assign rotate to onload 
//window.onload = slideshow ;

// array of gallery image IDs
var galleryImage = new Array("../images/gallery/gallery_nicholas0.jpg", "../images/gallery/gallery_nicholas1.jpg", "../images/gallery/gallery_nicholas2.jpg", "../images/gallery/gallery_nicholas3.jpg", "../images/gallery/gallery_nicholas4.jpg", "../images/gallery/gallery_nicholas5.jpg", "../images/gallery/gallery_nicholas6.jpg") ;

// store the current array element to be displayed
var currentImage = Math.floor(Math.random() * galleryImage.length) ; 

// rotate or slideshow image function
function slideshow() {
     
    // generate a random id
	currentImage ++ ;
	
     // if we get to the end of the slideshow, go back to the start
     if (currentImage == galleryImage.length) {
        currentImage = 0 ;
     }
     
   
     
     // get the img element with an id of 'cyclingImage' and update its src property
	document.getElementById('galleryImage').src = galleryImage[currentImage] ;
	
	// start a timed function call - invoke rotate() every 3 second calls
     setTimeout("slideshow()", 15 * 1000) ;
}


