// This script is for the slideshow of the stair..

var speed = 100;
var Pic = new Array();

Pic[0] = '../config/images/roll1.jpg';
Pic[1] = '../config/images/roll2.jpg';
Pic[2] = '../config/images/roll3.jpg';
Pic[3] = '../config/images/roll4.jpg';

var t;
var j = 1;
var p = Pic.length;
var count = 0;

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

function runBGSlideShow() {
   if (document.body){
   document.rollImg.src = Pic[j];
   j = j + 1;
   count = count + 1;
   if (j > (p-1)) j=0;
   if (count < 30) { t=setTimeout('runBGSlideShow()', speed); } else { count=0; }
   }
}

// Wrap it:
var lastClicked = 0;

function goMenuUser(link) {
    goMenu(link);
    if (lastClicked != link) t=setTimeout('runBGSlideShow()', speed);
    lastClicked = link;
}

function checkBrowserUser() {
    checkBrowser();
}