function dfnSlideShow(ImageContainer,ShowSpeed,FadeDuration,AnchorID)
{
    this.ImageContainer = dfnGetObj(ImageContainer);
    this.Anchor = dfnGetObj(AnchorID);
	this.Images = new Array();
	this.Links = new Array();
	this.LinksWindow = new Array();
	this.Titles = new Array();
	this.ShowSpeed = ShowSpeed;
	this.FadeDuration = FadeDuration;
	this.PreLoad = new Array();
	this.PreloadImages = PreloadImages;
	this.SwitchImages = SImages;
	this.j = 0;
	this.timeout = '';
}

function PreloadImages()
{
	for (i = 0; i < this.Images.length; i++) {
        try {
		    this.PreLoad[i] = new Image();
		    this.PreLoad[i].src = this.Images[i];
        }
        catch(err){}
	}
}

function SImages()
{
	//if (document.all && !__isOpera()){
    	this.ImageContainer.style.filter = "blendTrans(duration=2)"
		this.ImageContainer.style.filter = "blendTrans(duration=" + this.FadeDuration + ")";
		this.ImageContainer.filters.blendTrans.Apply();
  // }

   if (this.j < this.Titles.length)
       this.ImageContainer.title = this.Titles[this.j];

   if (this.Anchor && this.j < this.Links.length) {
        if(this.Links[this.j]=="")
            this.Anchor.removeAttribute('href');
        else
            this.Anchor.setAttribute('href',this.Links[this.j]);
            
       this.Anchor.target = this.LinksWindow[this.j] == "1" ? "_blank" : "_self";
   }

   if (this.PreLoad[this.j])
    this.ImageContainer.src = this.PreLoad[this.j].src
   
   //if (document.all && !__isOpera()){
      this.ImageContainer.filters.blendTrans.Play()
   //}
   this.j = this.j + 1
   if (this.j > (this.Images.length-1)) this.j=0;
}
