Changed some JavaScript snippets.