added javascript file for email preview mode functions