var SlideShowSpeed = 3000;

var CrossFadeDuration = 2;

var Caption = new Array();      

var tss;
var iss;
var jss = 0;
var pss = 0;

var preLoad = new Array();

function initGallery(pictureArray,captionArray){
	pss = pictureArray.length-1;
	for (iss = 1; iss < pss+1; iss++){
		preLoad[iss] = new Image();
		preLoad[iss].src = pictureArray[iss];
		Caption[iss] = captionArray[iss];
	}	
}

function control(how){
	if (how=="H") jss = 1;
	if (how=="F") jss = jss + 1;
	if (how=="B") jss = jss - 1;
	if (jss > (pss)) jss=1;
	if (jss < 1) jss = pss;
	
	if (document.getElementById) document.getElementById("ImageBox").innerHTML= '<a href="'+preLoad[jss].src+'" rel="lightbox" title="'+Caption[jss]+'"><img src="'+preLoad[jss].src+'" width="250" height="180"></a>';
	if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];
	//if (document.all) document.images.PictureBox.filters.blendTrans.Play();
}