   function doCalculations()
   {
      var f = document.figures;
      var errMsg = "";

      var i_radius = f.radius.value;

      var r_diameter = 0;
      var r_floorarea = 0;
      var r_surfacearea = 0;
      var r_volume = 0;
      var r_circumference = 0;

      //if (!isNaN(i_radius) && !isNaN(i_radius))
      if ((!isNaN(i_radius)) && i_radius !="")
      {
         var r_radius = parseFloat(i_radius)

         var radSqr = r_radius * r_radius;
         var radCub = r_radius * r_radius * r_radius;

         //Calculate diameter
         r_diameter = r_radius * 2;

         //Calculate floor area
         r_floorarea = radSqr * 3.1415;

         //Calculate surface area
         r_surfacearea = r_floorarea * 4 / 2;

         r_volume = 4 /3 * 3.1415 * radCub / 2

         //Calculate circumference
         r_circumference = r_diameter * 3.1415;
      }
      else
      {
         //errMsg = "Both the Radius and Diameter must be numbers in order to perform calcuations!";
         errMsg = "ERROR: The Radius value must be a number in order to perform calcuations!";
      }

      f.diameter.value=r_diameter.toFixed(2);
      f.floorarea.value=r_floorarea.toFixed(2);
      f.surfacearea.value=r_surfacearea.toFixed(2);
      f.volume.value=r_volume.toFixed(2);
      f.circumference.value = r_circumference.toFixed(2);

      document.getElementById("errorDiv").innerHTML = (errMsg != "") ? errMsg : "";
   }

