function gnomonCalc()
{
   complementAngle = (90 - window.document.calcform.latitude.value);
   if ((complementAngle < 0) || (complementAngle > 90)) {
      alert("Nurk peab olema 0 ja 90 vahel!");
   } else {
      calculatedTangent = Math.tan(complementAngle / 57.295779513082320876798154814105);
      gnomonLength = calculatedTangent * window.document.calcform.radius.value;
      gnomonLength = Math.round(gnomonLength * 100) / 100;
      window.document.calcform.gnomon.value = gnomonLength;
   }
}
