Move JavaScript PDF click code out of Python

Moved into static, and current page generation code modified to use
this script.