<!-- Do not copy any part of this script without permission; James T. Griffing, MS, BS; http://www.exrx.net //--><!-- 
function calc (form) {
var S, StandDev, PercRegress, Zscore, PE
S=form.Sex.options[form.Sex.selectedIndex].value
  if (S == "Male") {
     form.PopulationAverage.value =
     Math.round(66.81*Math.pow(10,-0.009241*form.Age.value))
}
  if (S == "Female") {
     form.PopulationAverage.value =
     Math.round(66.864*Math.pow(10,-0.011029*form.Age.value))
}
  if (form.Repetitions.value<=form.PopulationAverage.value) {
     StandDev =6.5
}
  if (form.Repetitions.value>form.PopulationAverage.value) {
     StandDev =7.5
}
Zscore = (form.Repetitions.value-form.PopulationAverage.value)/StandDev
PE= Math.exp(-1.8355027*(Math.abs(Zscore)-0.23073201))
PercRegress= -0.41682992*(PE-1)/(PE+1)+0.58953708
  if (Zscore > 0) {
     form.Score.value =
     Math.round(PercRegress*100)
}
  if (Zscore <= 0) {
     form.Score.value =
     Math.round((1-PercRegress)*100)
}
  if (Zscore >= 1) {
     form.Rating.value ="Excellent"
}
  if (Zscore < 1 && Zscore >= 0.5) {
     form.Rating.value ="Good"
}
  if (Zscore < 0.5 && Zscore >= -0.5) {
     form.Rating.value ="Average"
}
  if (Zscore < -0.5 && Zscore >= -1) {
     form.Rating.value ="Fair"
}
  if (Zscore < -1) {
     form.Rating.value ="Poor"
}
}
//--> 

