<!-- Site created by Maricela Paniagua Lojero -->
/*
Shows images and accompanying captions.
Browsers: NS4-7,IE4-6
Fade effect only in IE; degrades gracefully.
NS4 shows default caption only.
*/


// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3500;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this

// Specify the image files...

var numPictures = 20;
var thisPic = 1;
for (i = 1; i <= numPictures; i++){
	Picture[i] = 'images/photos/'+i+'.jpg';
}
// Specify the Captions...

var Caption = new Array(" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ");


//var numPictures = 30;

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1; //num of pictures

var preLoad = new Array();
//for (iss = 1; iss < pss+1; iss++){
for (iss = 1; iss <= numPictures; iss++){
	preLoad[iss] = new Image();
	preLoad[iss].src = Picture[iss];
}

function ap(text) {
	document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
	runSlideShow();
}


function runSlideShow(){
	if (document.slideform.slidebutton.value == "Stop") {
		if (document.all){
			document.images.myPicture.style.filter="blendTrans(duration=2)";
			document.images.myPicture.style.filter="blendTrans(duration=CrossFadeDuration)";
			document.images.myPicture.filters.blendTrans.Apply();
		}	
		jss = jss + 1;
		//if (jss > (pss)) jss=1;
		if (jss > (numPictures)) jss = 1;
		document.images.myPicture.src = preLoad[jss].src;
		if (document.getElementById) document.getElementById("CaptionNumber").innerHTML= jss+'/'+numPictures;
		if (document.all) document.images.myPicture.filters.blendTrans.Play();	
		tss = setTimeout('runSlideShow()', SlideShowSpeed);
	}//if
}//end function




function processPrevious() {
     if (document.images && jss > 1) {
          document.slideform.slidebutton.value = "Start";
		  jss--;
          document.myPicture.src = '../images/photos/'+jss+'.jpg';
		  if (document.getElementById) document.getElementById("CaptionNumber").innerHTML= jss+'/'+numPictures;
     }
	
}//end

function processNext() {
     if (document.images && jss < numPictures) {
		  document.slideform.slidebutton.value = "Start";
		  jss++;
          document.myPicture.src = '../images/photos/'+jss+'.jpg';
		  if (document.getElementById) document.getElementById("CaptionNumber").innerHTML= jss+'/'+numPictures;
		 
     }
}//end

function processStart() {
          document.slideform.slidebutton.value = "Start";
		  document.myPicture.src = '../images/photos/1.jpg';
		  if (document.getElementById) document.getElementById("CaptionNumber").innerHTML= '1/'+numPictures;
		  jss = 1;
}

function processEnd() {
          document.slideform.slidebutton.value = "Start";
		  document.myPicture.src = '../images/photos/'+numPictures+'.jpg';
		  if (document.getElementById) document.getElementById("CaptionNumber").innerHTML= numPictures+'/'+numPictures;
		  jss = numPictures;
}

