Moved a lot of code to node.js

A lot of code in loadmap.js.tmpl didn't have everything
to do with loading the map, so I put everything that had
to do with the physical node markers on the map into
node.js.

Also, loadmap adds a lot of js files to the header now,
making the index file look a bit nicer.