cleaned up bad browser error handling
consistent indentation and added javascript keyword to run inline scripts
moved all javascript actions from tool.html to startup.js
moved FinishStartup() to end of file
extracted function for StartEditEvent()
moved StopEditEvent() function
initial separation of draw event code
a little cleanup