﻿
function initTimeout(newIdx) {
    setTimeout("changeImage('" + newIdx + "');", 4200)
}

function changeImage(idx) {
    idx = idx % imageArray.length;
    
    var img = document.getElementById("mainimage");
    img.src = imageArray[idx];
    initTimeout(idx + 1);
}
