Lots of useful Javascript functions.