+ 2
You can put all messages in an Array. Function show() can accept message index and each button can execute show(index) ( for example show(3) ). In this case when you add something new you have to add new message to the array and new button whuch call show with the new index - not need to write new function every time ...