var slideShowSpeed = 4000;
var crossFadeDuration = 3;
//var Pic = new Array();
//Pic[0] = 'bus2.jpg'
//Pic[1] = 'bus1.jpg'
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}

////////////////////////////// second pic
var t2;
var j2 = 0;
var p2 = Pic2.length;
var preLoad2 = new Array();
for (i = 0; i < p2; i++) {
preLoad2[i] = new Image();
preLoad2[i].src = Pic2[i];
}

function runSlideShow2() {
	if (document.all) {
	document.images.fade2.style.filter="blendTrans(duration=2)";
	document.images.fade2.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.fade2.filters.blendTrans.Apply();
	}
	document.images.fade2.src = preLoad2[j2].src;
	if (document.all) {
	document.images.fade2.filters.blendTrans.Play();
	}
	j2 = j2 + 1;
	if (j2 > (p2 - 1)) j2 = 0;
	t2 = setTimeout('runSlideShow2()', slideShowSpeed);
}
////////////////////////////// second pic
var t3;
var j3 = 0;
var p3 = Pic3.length;
var preLoad3 = new Array();
for (i = 0; i < p3; i++) {
preLoad3[i] = new Image();
preLoad3[i].src = Pic3[i];
}

function runSlideShow3() {
	if (document.all) {
	document.images.fade3.style.filter="blendTrans(duration=2)";
	document.images.fade3.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.fade3.filters.blendTrans.Apply();
	}
	document.images.fade3.src = preLoad3[j3].src;
	if (document.all) {
	document.images.fade3.filters.blendTrans.Play();
	}
	j3 = j3 + 1;
	if (j3 > (p3 - 1)) j3 = 0;
	t3 = setTimeout('runSlideShow3()', slideShowSpeed);
}
////////////////////////////// second pic
var t4;
var j4 = 0;
var p4 = Pic4.length;
var preLoad4 = new Array();
for (i = 0; i < p4; i++) {
preLoad4[i] = new Image();
preLoad4[i].src = Pic4[i];
}

function runSlideShow4() {
	if (document.all) {
	document.images.fade4.style.filter="blendTrans(duration=2)";
	document.images.fade4.style.filter="blendTrans(duration=crossFadeDuration)";
	document.images.fade4.filters.blendTrans.Apply();
	}
	document.images.fade4.src = preLoad4[j4].src;
	if (document.all) {
	document.images.fade4.filters.blendTrans.Play();
	}
	j4 = j4 + 1;
	if (j4 > (p4 - 1)) j4 = 0;
	t4 = setTimeout('runSlideShow4()', slideShowSpeed);
}