function validateForm(frm, frmType) {
    if (frm.msg && (typeof(frm.msg) != 'undefined')) {
        if (/^(\s)*$/.test(frm.msg.value)) {
            switch (frmType) {
                case 'add_comment':
                    alert('Вы не можете добавить пустой комментарий!');
                    break;

                case 'edit':
                    alert('Вы не можете оставить сообщение пустым!');
                    break;

                case 'add':
                default:
                    alert('Вы не можете добавить пустое сообщение!');
            }

            return false;            
        }
    }

    return true;
}

function showAuthForm() {
    var div = document.getElementById('auth_form');

    if (div && (typeof(div) != 'undefined')) {
        div.style.display = 'block';
    }
}