Change from using a PHP variable to a JavaScript variable

Old habits die hard.