javascript externalization