Add earlier code which somehow disappeared.
Set sidebar tovisit and visited links to active depending on whether it
is clicked.