Add themes event handler.

The event handler is general: If the rules explained in the files are followed, additional themes can be added without any javascript changes!