make js work in email popup