Sorry about code look, I am pretty newbie with coding.. but I'll keep that in mind next time.
Your suggestion works great, thank you very much!
Also, is there a way to set default tab to be opened when navigation form is open?
e.g. we have 3 tabs on navigation form, they are displayed in this...