// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// Modifications made by FWOSS - 24/03/2006

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 5000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

// Caution: The number of Pictures *must*
// equal the number of Captions!

var tss;
var iss;
var jss = 0;
var pss;
var first = true;
var preLoad = new Array();

function runSlideShow()
{
    try
    {
		if (window.Pictures == null) 
			return; 
			
        if(first)
        {
            pss = window.Pictures.length;
            for (iss = 0; iss < pss; iss++)
            {
                preLoad[iss] = new Image();
                preLoad[iss].src = window.Pictures[iss];
            }
        }
        
        if (document.all)
        {
            document.images.ProductFaderIFader.style.filter="blendTrans(duration=2)";
            document.images.ProductFaderIFader.style.filter="blendTrans(duration=CrossFadeDuration)";
            document.images.ProductFaderIFader.filters.blendTrans.Apply();
        }
        
        document.images.ProductFaderIFader.src = preLoad[jss].src;
        document.images.ProductFaderIFader.alt = window.Captions[jss]; // alt tag
        
        if (document.all)
        {
            document.images.ProductFaderIFader.filters.blendTrans.Play();
        }
        jss = jss + 1;
        
        if (jss >= (pss))
        {
            jss=0;
        }
        tss = setTimeout('runSlideShow()', SlideShowSpeed);
    }
    catch(e){alert(e.message);}
};