Miscelanious functions for javascript language