cbk already said but what it comes down to is:
PHP Code:
//#CLIENTSIDE
function ChatBar.onShow() {
// I have been made visible.
}
All GUI controls have that kind of functionality, you can find the list here:
http://wiki.graal.net/index.php/Crea...ent/GuiControl