function CompHdrLgth()
{
   var rpm = 0            // rpm
   var ed  = 0		  // exhaust degrees
   var hl = 0		  // header length, what we're solving for

   while (rpm == 0)
      {
      rpm = prompt("Enter the RPM at which you will be running - ", 0);
      }

   while (ed == 0)
      {
      ed = prompt("Enter the number of degrees the exhaust valve opens before BDC - ", 0);
      ed = (ed * 1) + 180;
      }
      hl = ((850 * (ed * 1)) / (rpm * 1)) - 3;
      hl = hl + " "
   if (hl != 0)
      {
      alert("Your HEADER LENGTH should be " + hl.substring(0,6) +
            "  inches");
      }
}

function CompHdrDia()
   {
   var cc = 0		 // cc's of one cylinder
   var hl  = 0		 // header length
   var hd = 0		 // header diameter, what we're solving for
   var tempnum = 0

   while (cc == 0)
      {
      cc = prompt("Enter the CC's of one cylinder of your engine in cubic centimeters - ", 0);
      }

   while (hl == 0)
      {
      hl = prompt("Enter the HEADER LENGTH, in inches, as computed above - ", 0);
      }
              tempnum = cc / ((hl + 3) * 25);
              tempnum = Math.sqrt(tempnum);
              hd = tempnum * 2.1;
              hd = hd + " ";
      //  hd = ((cc * 16.38) / ((hl + 3) * 25)) * 2.1;
       // hd = hd + " ";
   if (hd != 0)
      {
      alert("Your HEADER INSIDE DIAMETER should be " + hd.substring(0,6) + "  inches");
      }
}
