javascript cleanup
put EventCache before addEvent, so it is defined before it is used
put requestPageTokens before injectTokens, so it is defined before it is used
removed all unused parameters
startsWith and endsWith don't polute the native string prototype anymore
I check the typeof functions before calling them
all those %REPLACE_ME% placeholders are now wrapped in quotes
getHost, canonicalizeUrl, isValidUrl and parseUri have been rewritten
added addSearchParameterToUrl and getUrlParts functions
global function window.csrfForm for adding forms dynamically
injectTokenAttribute doesn't write attribute if unchanged
injectTokens optimised
use document.getElementsByTagName("form") instead of document.all to iterate the forms
use document.querySelectorAll("[src],[href]") instead of document.all to iterate the links and images
injectTokens also hijacks window.open
browser detection is now mindful of opera
all comparisions now use triple equals
all non-javadoc comments ar now C++ style comments
now almost passes jslint validation