var SlideShowSpeed = 3.000;		// Number of seconds between the start of each cross-fade.
var CrossFadeDuration = 1.0;	// Number of seconds the cross-fade lasts.

var tss;
var iss;
var jss = 1;

if (isObject(Picture))
{
	var pss = Picture.length - 1;
}

var preLoad;


function runSlideShow(sObjectId)
{
	if (pss <= 0)
	{
		// There are no images for the slideshow.
		return;
	}

//	if (jsInStr(document.getElementById("loadSlideShow").value, "%") < 0) {
		preLoad = new Array();
		for (iss = 1; iss < pss+1; iss++)
		{
			preLoad[iss] = new Image();
			preLoad[iss].src = Picture[iss];
		}
		if (document.all)
		{		
			document.getElementById(sObjectId).style.filter="blendTrans(duration=" + CrossFadeDuration + ")";
			document.getElementById(sObjectId).filters.blendTrans.Apply();
		}
		document.getElementById(sObjectId).src = preLoad[jss].src;
		if (document.all)
		{	
			document.getElementById(sObjectId).filters.blendTrans.Play();
		}
		jss = jss + 1;

		if (jss > pss)
		{
			jss = 1;
		}

		tss = setTimeout("runSlideShow('" + sObjectId + "')", SlideShowSpeed * 1000.0);
//	}
}


function isObject(a) 
{
     return (typeof a == 'object' && !!a) || isFunction(a);
}


function isFunction(a) 
{
  return typeof a == 'function';
}
