Notification.NotificationDisplayer = function(oHtmlContainer) { this._htmlContainer = oHtmlContainer; this._content = ""; this._isDisplay = false; this.displayedNotification = null; } Notification.NotificationDisplayer.prototype.init = function(){ } Notification.NotificationDisplayer.prototype.clearContent = function(){ this._content = ""; } Notification.NotificationDisplayer.prototype.addContent = function(sContent){ this._content = sContent; } Notification.NotificationDisplayer.prototype.pop = function(){ if (this._content == "") { this._hide(); } else { this._htmlContainer.innerHTML = this._content; this._show(); } } Notification.NotificationDisplayer.prototype._show = function(){ if (!this._isDisplay) { this._isDisplay = true; $(this._htmlContainer).slideToggle("slow"); } } Notification.NotificationDisplayer.prototype._hide = function(){ if (this._isDisplay) { this._isDisplay = false; $(this._htmlContainer).slideToggle("slow"); } } Notification.NotificationDisplayer.prototype.close = function(){ this.clearContent(); this._hide(); }