function setMessageArea(type, message) { var newMessage = ''; if(message != '') { if(type == 'error') newMessage = '
'; newMessage += '
'; newMessage += message; newMessage += '
'; if(type == 'error') newMessage += '
'; } var messageArea = document.getElementById('messageArea'); if(messageArea) { jQuery('.js-login-box').removeClass('busy'); messageArea.className += ' hasMessage'; messageArea.innerHTML = newMessage; } } function disableWarning(messageType) { URL = '/api?apimode=disableMessage'; new Ajax.Request(URL, { method: 'POST', parameters: 'message=' + messageType, onSuccess: function(response) { setMessageArea('', ''); } }); }