Added new js function