js scaffolding for tab control