yes, it's possible to change the tab type at runtime. The template generates the code for all the tab types for this specific reason. The type is set in a local variable called loc:WebStyle.
Your best option is to right-click on the procedure, choose View Source, search for loc:WebStyle and see how it is set and used.
cheers
Bruce