<!-- Author: Brian Mackenzie -->
<!-- Date: 11th March 2004 -->
<!-- Version: 1.0 -->
<!-- Function:  Calculate the results from the  Quadrathlon test-->
<!-- Required by: quad.htm -->
<!-- Copyright Brian Mackenzie 2004 -->

function quad1calculate()
{
  var slj = document.quad1.slj.value;
  var bh = document.quad1.bh.value;
  var s = document.quad1.s.value;
  var os = document.quad1.os.value;

  var sljp = Math.round(-36.14048+(slj*37.268536)+(slj*slj*-0.128057));
  var bhp =  Math.round(-36.36996+(bh*12.478922)+(bh*bh*-0.007423));
  var sp = Math.round(209.70039+(s*-36.94427)+(s*s*0.165766));
  var osp = Math.round(-22.32216+(os*5.8318756)+(os*os*-0.000334));
  var tp = sljp + bhp + sp + osp;

  document.quad1.sljp.value = sljp;
  document.quad1.bhp.value = bhp;
  document.quad1.sp.value = sp;
  document.quad1.osp.value = osp;
  document.quad1.tp.value = tp;
}

function valclear()
{
  document.quad1.sljp.value = "";
  document.quad1.bhp.value = "";
  document.quad1.sp.value = "";
  document.quad1.osp.value = "";
  document.quad1.tp.value = "";
}
