JS in head

Added javascript into the index.html file