Put javascript in its proper place