// Set slideShowSpeed (milliseconds)
var slideShowSpeed = new Array();
slideShowSpeed[0] = 5000; 
slideShowSpeed[1] = 8000;
slideShowSpeed[2] = 10000;
slideShowSpeed[2] = 12000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '/accounts/ttca/content/image/slideshow/01.jpg'
Pic[1] = '/accounts/ttca/content/image/slideshow/02.jpg'
Pic[2] = '/accounts/ttca/content/image/slideshow/03.jpg'
Pic[3] = '/accounts/ttca/content/image/slideshow/04.jpg'
Pic[4] = '/accounts/ttca/content/image/slideshow/05.jpg'
//Pic[5] = '/accounts/ttca/content/image/slideshow/06.jpg'
//Pic[4] = '../image/slideshow/05.jpg'
//Pic[5] = '../image/slideshow/06.jpg'
//Pic[6] = '../image/slideshow/07.jpg'
//Pic[7] = '../image/slideshow/08.jpg'
//Pic[8] = '../image/slideshow/09.jpg'
//Pic[9] = '../image/slideshow/10.jpg'
//Pic[10] = '../image/slideshow/11.jpg'
//Pic[11] = '../image/slideshow/12.jpg'
//Pic[12] = '../image/slideshow/13.jpg'
//Pic[13] = '../image/slideshow/14.jpg'
//Pic[14] = '../image/slideshow/15.jpg'
//Pic[15] = '../image/slideshow/16.jpg'

// do not edit anything below this line
var t1;
var t2;
var t3;
var z=0;
var j1 = 0;
var j2 = 1;
var j3 = 2;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

function runSlideShow1() {
// Set slideShowSpeed (milliseconds)
var speed = slideShowSpeed[z];
//z++;
//if (z > 4) z=0;
if (document.all) {
document.images.SlideShow1.style.filter="blendTrans(duration=1)";
document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow1.filters.blendTrans.Apply();
}

//while (preLoad[j1].src == document.images.SlideShow2.src || preLoad[j1].src == document.images.SlideShow3.src) {
//    j1 = j1 + 1;
//    if (j1 > (p - 1)) j1 = 0;
//}
document.images.SlideShow1.src = preLoad[j1].src;

if (document.all) {
document.images["SlideShow1"].filters.blendTrans.Play();
}
j1 = j1 + 1;
if (j1 > (p - 1)) j1 = 0;


t1 = setTimeout('runSlideShow1()', speed);
}

function runSlideShow2() {
var speed = slideShowSpeed[z];
z++;
if (z > 4) z=0;

if (document.all) {
document.images.SlideShow2.style.filter="blendTrans(duration=2)";
document.images.SlideShow2.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow2.filters.blendTrans.Apply();
}

while (preLoad[j2].src == document.images.SlideShow1.src || preLoad[j2].src == document.images.SlideShow3.src) {
    j2 = j2 + 1;
    if (j2 > (p - 1)) j2 = 0;
}
document.images.SlideShow2.src = preLoad[j2].src;

if (document.all) {
document.images.SlideShow2.filters.blendTrans.Play();
}
j2 = j2 + 1;
if (j2 > (p - 1)) j2 = 1;

t2 = setTimeout('runSlideShow2()', speed);
}

function runSlideShow3() {
var speed = slideShowSpeed[z];
z++;
if (z > 4) z=0;

if (document.all) {
document.images.SlideShow3.style.filter="blendTrans(duration=3)";
document.images.SlideShow3.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow3.filters.blendTrans.Apply();
}

while (preLoad[j3].src == document.images.SlideShow2.src || preLoad[j3].src == document.images.SlideShow1.src) {
    j3 = j3 + 1;
    if (j3 > (p - 1)) j3 = 0;
}
document.images.SlideShow3.src = preLoad[j3].src;

if (document.all) {
document.images.SlideShow3.filters.blendTrans.Play();
}
j3 = j3 + 1;
if (j3 > (p - 1)) j3 = 2;


t3 = setTimeout('runSlideShow3()', speed);
}

function runSlideShow() {
    runSlideShow1();
    //runSlideShow2();
    //runSlideShow3();
}
// End -->

