function TopComments(commentCnt, commentSelectorPrefix, commentPrefix)
{
    this._commentSelectorPrefix = commentSelectorPrefix;
    this._commentPrefix = commentPrefix;
    this._commentCnt = commentCnt;
    this._activeComment = 1;
    this._nextComment = (this._activeComment % this._commentCnt) + 1;
    this._timeoutDuration = 7000;
    this._showCommentTimeout = setTimeout(this.__HideComment.bind(this), this._timeoutDuration);
    this._locked = false;
}

TopComments.prototype.__HideComment = function TopComments_HideComment()
{
    this._locked = true;
    new Effect.Fade(this._commentPrefix + this._activeComment,
        { duration:1.0,
          afterFinish: this.__ShowNextComment.bind(this)
        }
    );
}

TopComments.prototype.__ShowNextComment = function TopComments_ShowNextComment()
{
    $(this._commentSelectorPrefix + this._activeComment).removeClassName('selected');
    $(this._commentSelectorPrefix + this._nextComment).addClassName('selected');
        
    this._activeComment = this._nextComment;
    this._nextComment = (this._activeComment % this._commentCnt) + 1;
    
    new Effect.Appear(this._commentPrefix + this._activeComment,
        { duration:1.0, 
          afterFinish: this.__ShowingFinished.bind(this)
        }
    );
}

TopComments.prototype.__ShowingFinished = function TopComments_ShowingFinished()
{
    this._locked = false;
    this._showCommentTimeout = setTimeout(this.__HideComment.bind(this), this._timeoutDuration);
    this._timeoutDuration = 7000;
}

TopComments.prototype.__SelectComment = function TopComments_SelectedComment(divId)
{
    if (this._locked)
        return;

    if (this._activeComment == divId)
        return;
        
    if (this._showCommentTimeout)
    {
        clearTimeout(this._showCommentTimeout);
    }

    this._nextComment = divId;
    this.__HideComment();
}