[bug981357] - Moved inline friendlycode script into separate js file

[bug981357] - removed useless comments

[bug981357] - wrapped in function to keep variables local