My collection of useful javascript functions