move javascript into a js file.