﻿function objSP_Product() {this.ImgUrl=""; this.LinkUrl=""; this.Title="";}
function SlidePic_Product(_id) {this.ID=_id; this.Width=0;this.Height=0; this.TimeOut=5000; this.Effect=23; this.TitleLen=0; this.PicNum=-1; this.Img=null; this.Url=null; this.Title=null; this.AllPic=new Array(); this.Add=SlidePic_Product_Add; this.Show=SlidePic_Product_Show; this.LoopShow=SlidePic_Product_LoopShow;}
function SlidePic_Product_Add(_SP) {this.AllPic[this.AllPic.length] = _SP;}
function SlidePic_Product_Show() {
if(this.AllPic[0] == null) return false;
document.write("<div align='center'><a id='Url_" + this.ID + "' href=''><img id='Img_" + this.ID + "' style='width:" + this.Width + "px; height:" + this.Height + "px; filter: revealTrans(duration=2,transition=23);' src='javascript:null' border='0'></a>");
if(this.TitleLen != 0) document.write("<br><span id='Title_" + this.ID + "'></span></div>");
this.Img = document.getElementById("Img_" + this.ID);
this.Url = document.getElementById("Url_" + this.ID);
this.Title = document.getElementById("Title_" + this.ID);
this.LoopShow();
}
function SlidePic_Product_LoopShow() {
if(this.PicNum<this.AllPic.length-1) this.PicNum++ ;
else this.PicNum=0;
this.Img.filters.revealTrans.Transition=this.Effect;
this.Img.filters.revealTrans.apply();
this.Img.src=this.AllPic[this.PicNum].ImgUrl;
this.Img.filters.revealTrans.play();
this.Url.href=this.AllPic[this.PicNum].LinkUrl;
if(this.Title) this.Title.innerHTML="<a href="+this.AllPic[this.PicNum].LinkUrl+" target=_blank>"+this.AllPic[this.PicNum].Title+"</a>";
this.Img.timer=setTimeout(this.ID+".LoopShow()",this.TimeOut);
}

var SlidePic_365 = new SlidePic_Product("SlidePic_365");
SlidePic_365.Width    = 212;
SlidePic_365.Height   = 145;
SlidePic_365.TimeOut  = 5000;
SlidePic_365.Effect   = 23;
SlidePic_365.TitleLen = -1;
var oSP = new objSP_Product();
oSP.ImgUrl         = "images/ad1/01.jpg";
SlidePic_365.Add(oSP);
var oSP = new objSP_Product();
oSP.ImgUrl         = "images/ad1/02.jpg";
SlidePic_365.Add(oSP);
var oSP = new objSP_Product();
oSP.ImgUrl         = "images/ad1/03.jpg";
SlidePic_365.Add(oSP);

SlidePic_365.Show();

