You can use Script functions to be informed whenever the panels of your application are created, displayed, hidden, or deleted. To handle these events you use:
The OnLoad Function
The onShow Property
The onHide Property
The onClose Property