// SLIDE SHOW
// vars
var SlideShowSpeed = 5000;
var CrossFadeDuration = 1;
var tss;
var pss;
var jss = 0;
var imgPropPath = "images/slideshow/";

// preload slide show pics
var Picture = new Array();
function imgSSPic() {
  for (i=0; i<arguments.length; i++) {
    Picture[i] = new Image();
    Picture[i].src = imgPropPath+arguments[i]; }
  pss = Picture.length-1;
}
// preload slide show captions
var Caption = new Array();
function imgSSCap() {
  for (i=0; i<arguments.length; i++) {
    Caption[i] = arguments[i]; }
}

// slide show
function runSlideShow() {
  if (document.all) {
    document.images.picBox.style.filter="blendTrans(duration=2)";
    document.images.picBox.style.filter="blendTrans(duration=CrossFadeDuration)";
    document.images.picBox.filters.blendTrans.Apply(); }
  document.images.picBox.src = Picture[jss].src;
  if (document.getElementById) document.getElementById("captionBox").innerHTML = Caption[jss];
  if (document.all) document.images.picBox.filters.blendTrans.Play();
  jss = jss + 1;
  if (jss > pss) jss=0;
  tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

// PIC SWAP
var prvId = "btm1";
var curId = "btm1";
var etest = "";
function chgPic(imgDocId,imgObjName,imgCurId) {
  curId = imgCurId
  if (curId != prvId) {
    document.images[imgDocId].src = eval(imgObjName+".src");
    document.images[curId].src = eval(curId+"_sel.src");
    document.images[prvId].src = eval(prvId+"_nrm.src");
    prvId = curId;
  }
}

