added the percentages to the js template
modified the JS to deal with the template