Added window.confirm to ask if user really wants to delete message