﻿
//vars for the javascript loop
var FCommentIndex = 1;
var FCTimerID = 0;
var FCTimerActive = true;

function ShowFCommentDiv(index, haltLoop) {

    for (var i = 1; i <= 5; i++) {
        document.getElementById('divFC' + i).style.display = 'none';
    }
    document.getElementById('divFC' + index).style.display = 'inline';

    if (haltLoop == 1) {
        clearTimeout(TimerID);
        FCTimerActive = false;
    }
}

function FCommentLooper() {
    ShowFCommentDiv(FCommentIndex, 0);
    FCommentIndex++;
    if (FCommentIndex > 5) {
        FCommentIndex = 1;
    }
    if (FCTimerActive) {
        FCTimerID = setTimeout("FCommentLooper()", 7000);
    }
}
FCommentLooper();

