[bug980162] - Moved inline script into separate js file