added a js functions file
added a js functions file