This function is an event handler that is called every time a balloon dialog with the specified ID is finished.