All Java Script Utility functions