some code reorg - created a single function to handle domoticz tabs