Move index.jsp JavaScript to index.js