Javascript Snippets

All javascript snippets, some more specific than others. All are
prepended with "js".