Adding Javascript script startup functionality

Javascripts can now use onLoad(), onEnable(), onDisable() and
onEvaluate() function to do things at certain points/events.