Externalized Javascript to Dedicated Directory

Moved JS from HTML files to dedicated pagescripts folder inside js
directory; sometimes extra modifications were required since Velocity
variables were being used inside scripts