GUI-333
moved javascript into page.js file