<!-- Do not copy any part of this script without permission; James T. Griffing, MS, BS; http://www.exrx.net //--><!-- 
function calc (form) {
var S, A, StandDev, PercRegress, Zscore, PE
Age=form.Age.value
S=form.Sex.options[form.Sex.selectedIndex].value
  if (S == "Male") {
     form.PopulationAverage.value =
     Math.round(22.08-0.00142857*Age-0.00142857*Math.pow(Age,2))
}
  if (S == "Female") {
     form.PopulationAverage.value =
     Math.round(113.48590476-3.76853968*Age+0.04895238*Math.pow(Age,2)-0.00022222*Math.pow(Age,3))
}
  if (S == "Male") {
     StandDev =
     (4.90714286-0.00714286*Age)
}
  if (S == "Female" && form.Repetitions.value<=form.PopulationAverage.value) {
     StandDev =
     43.00285714-1.02666667*Age+0.00666667*Math.pow(Age,2)
}
  if (S == "Female" && form.Repetitions.value>form.PopulationAverage.value) {
     StandDev =
     104.85161905-4.01758730*Age+0.05228571*Math.pow(Age,2)-0.00022222*Math.pow(Age,3)
}
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"
}
}
//-->
