﻿// JScript File

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================


var p =0
var t
var j = 0
var preLoadImage = new Array();
//var invId=new Array();
function setValues(clientId)
{


var showcasePics=new Array()
showcasePics=document.getElementById(clientId+"_Images").value.split("|")

p=showcasePics.length

// Specify the image files
var Pic = new Array() 
var url="../Images/Sidepanel/thumbnails/";
if(document.getElementById(clientId+"_TechnologyImage").value!="")
{   
    url=document.getElementById(clientId+"_TechnologyImage").value;    
}

for (k = 0; k < p; k++){


Pic[k]=url+showcasePics[k];

}

document.images.SlideShow.src=Pic[0];
document.images.SlideShow.style.display="block";

for (i = 0; i < p; i++){
   preLoadImage[i] = new Image()
   preLoadImage[i].src = Pic[i]
   

};

runSlideShow();
}

function runSlideShow(){

var slideShowSpeed =3000

// Duration of crossfade (seconds)
 var crossFadeDuration = 15
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()
   };
   document.images.SlideShow.src = preLoadImage[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   };
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout("runSlideShow()", slideShowSpeed)
};
