// JScript source code
// The list of images to display in the slideshow
//creating a array of the image object
var image=new Array("slideshow/group.jpg",
"slideshow/rifle2.jpg",
"slideshow/SeaFishing.jpg",
"slideshow/banner.jpg",
"slideshow/Bowls5.jpg",
"slideshow/Richie.jpg",
"slideshow/Dunoon.jpg",
"slideshow/Team.jpg",
"slideshow/Patience.jpg",
"slideshow/may2007013.jpg",
"slideshow/Weapons_Kata.jpg",


"slideshow/SeaFishing3.jpg",
"slideshow/TrophyTable.jpg"


)
                
//variable that will increment through the images
var num=0

// set the delay between images
var timeDelay
 
//preload the images in the cache so that the images load faster
//create new instance of images in memory 

var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
   imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}


function image_effects()
{
    if (document.images.slideShow.filters)
   {
     //set the transition to the number selected in the list
     document.images.slideShow.filters.revealTrans.Transition=12
     document.images.slideShow.filters.revealTrans.apply()
     document.images.slideShow.filters.revealTrans.play()
 } 
}


//for automatic Slideshow of the Images
function slideshow_automatic()
{ 


    if (num<image.length)
     {
       num++
       //if last image is reached,display the first image
       if (num==image.length) 
       num=0
       image_effects()
       //sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
       timeDelay=setTimeout("slideshow_automatic()",6000) 
       
       document.images.slideShow.src=image[num]   
     }
  
}