Moved the onclick from index.htm to js