Misc bits of javascript I find use full.