I recommend having just a single element for displaying all notifications.  Save the innerHTML of your persistent messages so you can restore them when transient notification go away.

Also, there is an unnecessary blank line below.