Moved inline javascript into a file of its own.