// list images here
// srcA = 240x160 images
// srcB = 160x240 images
// srcC = 240x160 images
var srcA = [ 'slides/spImgA01.jpg','slides/spImgA02.jpg','slides/spImgA03.jpg','slides/spImgA04.jpg','slides/spImgA05.jpg','slides/spImgA06.jpg','slides/spImgA07.jpg' ]
var srcB = [ 'slides/spImgB01.jpg','slides/spImgB02.jpg','slides/spImgB03.jpg','slides/spImgB04.jpg','slides/spImgB05.jpg','slides/spImgB06.jpg','slides/spImgB07.jpg' ]
var srcC = [ 'slides/spImgC01.jpg','slides/spImgC02.jpg','slides/spImgC03.jpg','slides/spImgC04.jpg','slides/spImgC05.jpg','slides/spImgC06.jpg','slides/spImgC07.jpg' ]

//preloader
var i
var picA = new Array();
var picB = new Array();
var picC = new Array();
for (i=0; i<srcA.length; i++) {
	picA[i] = new Image();
	picA[i].src = srcA[i];
} 
for (i=0; i<srcB.length; i++) {
	picB[i] = new Image();
	picB[i].src = srcB[i];
} 
for (i=0; i<srcC.length; i++) {
	picC[i] = new Image();
	picC[i].src = srcC[i];
} 

var which = 0;       // select A, B, or C image to change
var sA = 1;          // slide index
var sB = 1;          // slide index
var sC = 1;          // slide index
var delay = 1500;    // slide delay 

function slideShow1() {
	if (which == 3) {which = 0}
//	alert('which = '+which);
	if (which == 0) {        // change A picture
		if (sA == picA.length) { sA = 0; }
		document.images.spImgAp.src = picA[sA++].src;
		document.getElementById('spImgAd').style.zIndex = 4;
		document.getElementById('spImgBd').style.zIndex = 2;
		document.getElementById('spImgCd').style.zIndex = 3;
	}
	else if (which == 1) {   // change B picture
		if (sB == picB.length) { sB = 0; }
		document.images.spImgBp.src = picB[sB++].src;
		document.getElementById('spImgAd').style.zIndex = 3;
		document.getElementById('spImgBd').style.zIndex = 4;
		document.getElementById('spImgCd').style.zIndex = 2;
	}
	else {                   // change C picture
		if (sC == picC.length) { sC = 0; }
		document.images.spImgCp.src = picC[sC++].src;
		document.getElementById('spImgAd').style.zIndex = 2;
		document.getElementById('spImgBd').style.zIndex = 3;
		document.getElementById('spImgCd').style.zIndex = 4;
	}
	which++;
	return false;
}

function startSlideShow1() {
	setInterval('slideShow1()',delay);
}

