Customize the Javascript functions