NF: JS function to activate appropriate link when selected