<!-- Author: Brian Mackenzie -->
<!-- Date: 27th August 2004 -->
<!-- Version: 1.0 -->
<!-- Function:  calculate results from the LAS test -->
<!-- Required by: lastest.htm -->
<!-- Copyright Brian Mackenzie 2004 -->

function calculate()

{
  var t1 = document.stride.t1.value;
  var t2 = document.stride.t2.value;
  var t3 = document.stride.t3.value;
  var t4 = document.stride.t4.value;
  var t5 = document.stride.t5.value;

  s1=t2*1+t3*1+t4*1+t5*1;

  r1="Speed matches Endurance";

  if (t1>s1)
   {
    res = t1-s1;
    
    if (res>5)
     {
      r1="Lack of Endurance";
     }
   }

  if (s1>t1)
   {
    res=s1-t1;

    if (res>5)
     {
      r1="Lack of speed";
     }
   }

 document.stride.result.value = r1;
}

function valclear()

{
  document.stride.result.value = "";
}
