
//不要编辑下面的代码
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}


function applyeffect(){
if (document.all){
//document.images.SlideShow.filters.blendTrans.Transition=Math.floor(Math.random()*23)
document.images.SlideShow.filters.blendTrans.Stop()
document.images.SlideShow.filters.blendTrans.Apply()
}
}


function playeffect(){
if (document.all)
document.images.SlideShow.filters.blendTrans.Play();
//photoslider.filters.revealTrans.play()
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}


function backward(){
if (which>0){
which--
applyeffect()
document.images.SlideShow.src=photos[which]
playeffect()
//keeptrack()
}
}

function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.SlideShow.src=photos[which]
playeffect()
//keeptrack()
}
}

function transport(id){
window.location=photoslink[id]
}
//*******************************

//another way of slides show
// 设置轮番显示速度 Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3500;
// 匀滑转换时间 Duration of crossfade (seconds)
var crossFadeDuration = 3;
// 指定图像文件 Specify the image files

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
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 = preLoad[j].src;
document.getElementById("prod_title_str").innerHTML = prod_titles[j];
document.getElementById("prod_price_str").innerHTML = prod_price[j];
document.getElementById("prod_des_str").innerHTML = prod_des[j];
document.getElementById("promotionlink").href = promotionlink[j];
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
which=j;
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}