Dhtmlx tabbar onSelect

How to change the Active state of the tabbar in onSelect function?

Can you clarify the question, please?
What you have to do and what behaviour you expect, step by step, please?