﻿var imgarray = new Array();
imgarray[0] = "images/homepage1.jpg";
imgarray[1] = "images/homepage2.jpg";
imgarray[2] = "images/homepage3.jpg";
var index = 0;

function rotate()
{
    var img = document.getElementById('rotatedimage');
    
    img.src = imgarray[index];
    
    if (index >= (imgarray.length - 1))
        index = 0;
    else
        index++;
    
    setTimeout("rotate()", 3000);
}

window.onload = function() { rotate() };