Seperated Javascript code from html document