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

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

var timeDelay = 4; // change delay time in seconds
var Pics = new Array // Array holding all slides 250x200 px
("images/slideshow/slide01.jpg"
,"images/slideshow/slide02.jpg"
,"images/slideshow/slide03.jpg"
,"images/slideshow/slide04.jpg"
,"images/slideshow/slide05.jpg"
,"images/slideshow/slide06.jpg"
,"images/slideshow/slide07.jpg"
,"images/slideshow/slide08.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("changepic") //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];
}

function displayMail(doc, prefix, display) {
  var part1 = "bear";
  var part2 = "dies.ca";
  if (display == null || display == "") {
    doc.write("<a href=\"ma" + "ilto:" + prefix + "@" + part1 + part2 + "\">" + prefix + "@" + part1 + part2 + "</a>");
  }
  else {
    doc.write("<a href=\"ma" + "ilto:" + prefix + "@" + part1 + part2 + "\">" + display + "</a>");
  }
}
