javascript functions I use very often