Useful js functions that I use time and time again.