var slideShowSpeed = 4000
var crossFadeDuration = 5

var Pic = new Array() 

Pic[0] = 'images/main_image_cycle.jpg'
Pic[1] = 'images/main_image_rugby.jpg'
Pic[2] = 'images/main_image_cycle2.jpg'
Pic[3] = 'images/main_image_rugby2.jpg'
Pic[4] = 'images/main_image_others.jpg'
Pic[5] = 'images/main_image_others2.jpg'
Pic[6] = 'images/main_image_others3.jpg'

//window.alert("app. loaded");

var t
var j = 0
var p = Pic.length

var preLoad = new Array()

for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
