﻿var adImages = new Array("Slideshow_1.gif", "Slideshow_2.gif", "Slideshow_5.gif", "Slideshow_4.gif");
var thisImage = 1
var firstTime = 0

function rotate() {

    if (firstTime != 0) {
        var elementTD = document.getElementById("tableback");
        if (null != elementTD) {

            var theNewImage = "url(/images/MissionRotator/" + adImages[thisImage] + ")";
            elementTD.style.backgroundImage = theNewImage;

            thisImage += 1;
            if (thisImage >= adImages.length) {
                thisImage = 0;
            }
        }
    }
    else {
        firstTime = 1;
    }
            
    setTimeout("rotate()", 10*1000);
}

