var lastReplyBoxId = 0;

function showReplyForm(id) {
    var replyBox = document.getElementById('reply_box' + id);
    var replyForm = document.getElementById('form' + id);
    if (lastReplyBoxId) {
        document.getElementById('reply_box' + lastReplyBoxId).style.display = 'none';
    }
    replyBox.style.display = 'block';
    lastReplyBoxId = id;
    if (replyForm.elements['author'].value == '') {
        replyForm.elements['author'].focus();
    } else {
        replyForm.elements['text'].focus();
    }
}
