﻿var scrollEcCt = 1;
var EcpauseTime = 5 * 1000;
var timerEc;
function hideAllEcClips() {
    for (i = 1; i < 7; i++) {
        var allEcBoxs = "ecBox" + i;
        var ecNavNum = "ecNav" + i;
        document.getElementById(allEcBoxs).style.display = "none";
        document.getElementById(ecNavNum).className = "";
    }
}

function ecNavOn(n) {
    var curEcBox = "ecBox" + n;
    var curEcNavNum = "ecNav" + n;
    hideAllEcClips();
    document.getElementById(curEcBox).style.display = "block";
    document.getElementById(curEcNavNum).className = "active";
    scrollEcCt = n;
}

function fecScroll() {
    stopEcScroll();
    ecNavOn(scrollEcCt);
    scrollEcCt += 1;
    if (scrollEcCt == 7) {
        scrollEcCt = 1;
    }
    timerEc = setTimeout("fecScroll()", EcpauseTime);
}

function stopEcScroll() {
    clearTimeout(timerEc);
} 