javascript for popup.html