/**
 * Author: meta-logica
 * Last modified on April 30 2008
 */

/* Global variables, load pictures for slideshow on main page */

var timeDelay = 3.5; // change delay time in seconds
var Pics = new Array // Array holding all slides 309 x 113 px
("images/slides/001.jpg"
,"images/slides/002.jpg"
,"images/slides/003.jpg"
,"images/slides/004.jpg"
,"images/slides/005.jpg"
);
var howMany = Pics.length;
timeDelay *= 1000;
var PicCurrentNum = 0;
var PicCurrent = new Image();

/* startPics get called during onload, currently only from index.html */
function startPics(doc) {
  PicCurrent = doc.getElementById("ChangingPics") //Make sure there is an img tag with this id in index.html
  setInterval("slideshow()", timeDelay);
}

function slideshow() {
  PicCurrentNum++;
  if (PicCurrentNum == howMany) {
    PicCurrentNum = 0;
  }
  PicCurrent.src = Pics[PicCurrentNum];
}

