

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 8500

// Duration of crossfade (seconds)
var crossFadeDuration = 25

// Specify image files
var Pic = new Array()
	
	Pic[0] = 'images/home/ng_1.jpg'
	Pic[1] = 'images/home/ng_2.jpg'
	Pic[2] = 'images/home/ng_4.jpg'
	Pic[3] = 'images/home/ng_5.jpg'



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]
}


var innerHtml = new Array()

innerHtml[0] = '<a href="news/index.aspx"><img src="images/home/ng_1.jpg" />';
innerHtml[1] = '<a href="timetables/index.aspx"><img src="images/home/ng_2.jpg" /></a>';
innerHtml[2] = '<a href="http://www.coasthopper.co.uk" target="_blank"><img src="images/home/ng_4.jpg" /></a>';
innerHtml[3] = '<a href="timetables/index" target="_blank"><img src="images/home/ng_5.jpg" /></a>';



function runSlideShow(){
	var slideShowElement = document.getElementById("SlideShow");

   if (document.all){
      slideShowElement.filters[0].apply();
   }
   //slideShowElement.src = preLoad[j].src;
   slideShowElement.innerHTML = innerHtml[j];
   if (document.all){
      slideShowElement.filters[0].Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

