Commonly Used Javascript Snippets