various javascript goodies