initiate the javascript for index.html