/**
 * Author: meta-logica
 * Last modified on November 18 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/topbar/img01.png"
,"images/topbar/img02.png"
,"images/topbar/img03.png"
,"images/topbar/img04.png"
,"images/topbar/img05.png"
,"images/topbar/img09.png"
);
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) {
  return 0;
  PicCurrent = doc.getElementById("ChangingPics") //Make sure there is an img tag with this id
  setInterval("slideshow()", timeDelay);
}

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

/* Hide e-mail from spiders */

function displayMail(doc, prefix, display) {
  var part1 = "dutri";
  var part2 = "clean.com";
  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>");
  }
}
