function computehp()
   {
   		 var hp = 0   // horsepower, what we're solving for
   		 var trq = 0  // torque
   		 var RPM = 0  // the RPM we're interested in
   while (trq == 0)
      {
         trq = prompt("Enter the TORQUE of the engine - ", 0);
      }
   while (RPM == 0)
      {
         RPM = prompt ("Enter the RPM you're interested in - ", 0);
      }	  	  
   hp = (trq * RPM)/5252
   hp = hp + " "
   if (trq != 0)
   {
      alert("The HORSEPOWER at " + RPM + " RPM is " + hp.substring(0,5));
   }
}

function computetrq()
   {
   	var hp = 0     // horsepower
   	var trq = 0     // torque, what we're solving for
   	var RPM = 0     // the RPM we're interested in
   	while (hp == 0)
      {
         hp = prompt("Enter the HORSEPOWER of the engine - ", 0);
      }	  
   while (RPM == 0)
      {
         RPM = prompt ("Enter the RPM you're interested in - ", 0);
      }	  
   trq = (5252 * hp)/RPM
   trq = trq + " "
   if (trq != 0)
   {
      alert("The TORQUE at " + RPM + " RPM is " + trq.substring(0,5));
   }
}
