Build several javascript functions to handle various routines

A Collection of JS functions
Built closure function and json object