function ComputeCompRatio()
   {
      var disp = 0		   // engine displacement
      var cVol  = 0		   // chamber volume
      var cRat  = 0		   // compression ratio, what we're
	  	  		  		   //    solving for

      while (disp == 0)
         {
         disp = prompt("Enter DISPLACEMENT of one cylinder in cubic inches - ", 0);
         }

      while (cVol == 0)
         {
         cVol = prompt("Enter CHAMBER VOLUME of one cylinder in cubic inches - ", 0);
         }

      if (disp != 0)
         {
         cRat = ((disp * 1) + (cVol * 1)) / cVol;
		 cRat = cRat + " "
         alert("Your engine COMPRESSION RATIO is " + cRat.substring(0,4) + " : 1");
         }
   }

function CompAmtMill()
   {
      var oldCR = 0	  // old compression ratio
      var newCR  = 0  // new compression ratio
      var str = 0  	  // stroke
      var amtMill = 0 // amount to mill from head

      while (oldCR == 0)
         {
         oldCR = prompt("Enter your old COMPRESSION RATIO - ", 0);
         }

      while (newCR == 0)
         {
         newCR = prompt("Enter the desired NEW COMPRESSION RATIO - ", 0);
         }

      while (str == 0)
         {
         str = prompt("Enter your engine's STROKE  - ", 0);
         }

      if (oldCR != 0)
         {
         amtMill = (((newCR - 1) - (oldCR - 1)) / ((newCR - 1) * (oldCR - 1))) * str;
         amtMill = amtMill + " "
         alert("The AMOUNT TO MILL from your head is " + amtMill.substring(0,5));
         }
   }
	   

