Miscellaneous javascript programs