js toolbox with useful functions