var imageIndex;
var imgArray= new Array();

for (i=0; i<9; ++i)
    imgArray[i] = new Image();

imgArray[0].src = "include/showimage.php?../pics/vip/1/IMG_0611.JPG";
imgArray[1].src = "include/showimage.php?../pics/vip/2/P1070210.JPG";
imgArray[2].src = "include/showimage.php?../pics/vip/3/vip5.jpg";
imgArray[3].src = "include/showimage.php?../pics/vip/1/P1060247.JPG";
imgArray[4].src = "include/showimage.php?../pics/vip/2/SDC12468.jpg";
imgArray[5].src = "include/showimage.php?../pics/vip/3/vip6.jpg";
imgArray[6].src = "include/showimage.php?../pics/vip/1/P1060254.JPG";
imgArray[7].src = "include/showimage.php?../pics/vip/2/SDC12470.jpg";
imgArray[8].src = "include/showimage.php?../pics/vip/3/vip8.jpg";

function startImageAnimation() {
    imageIndex = 0;
    setTimeout("ChangeImage();", 100);
}

function ChangeImage() {
    if (imageIndex % 3 == 0)
        animationImage1.src = imgArray[imageIndex].src;
    else if (imageIndex % 3 == 1)
        animationImage2.src = imgArray[imageIndex].src;
    else
        animationImage3.src = imgArray[imageIndex].src;

    imageIndex = imageIndex == imgArray.length - 1 ? 0 : imageIndex + 1;
    setTimeout("ChangeImage();", 1000);
}
