Fix JS exploding when hiding a news

Implements the lnk%HPID% variable globally. Also added a check to the localStorage item to avoid problems.