Moved the javascript to an external file, to allow for caching of code that doesn't change from blueprint to blueprint.