Added event broadcasting when dialogs are opened or closed and fixed dialog naming issue with invalid javascript identifier characters.