function setvalue() 
{ 
  total = (50.00 * document.FP.electricqty.value)
  total += (75.00 * document.FP.gasqty.value)
  total += (100.00 * document.FP.carqty.value)
  total += (150.00 * document.FP.comboqty.value)
  total += (200.00 * document.FP.subscriptionqty.value)
  document.FP.total.value = "$" + roundOff(total, 2)
  return true
}
function roundOff(value, precision)
{
  value = "" + value //convert value to string
  precision = parseInt(precision);
  var whole = "" + Math.round(value * Math.pow(10, precision));
  var decPoint = whole.length - precision;
  if(decPoint != 0)
  {
      if(whole.length > 0)
      {
          result = whole.substring(0, decPoint);
      }
      else
      {
          result = "0";
      }
      result += ".";
      result += whole.substring(decPoint, whole.length);
  }
  else
  {
      if(whole.length > 0)
      {
          result = whole;
      }
      else
      {
          result = "0";
      }
  }
  return result;
}


























































































































                                                                               
