updated toc javascript to select the right section