Made some functions global in client side javascripts