Converting vb mileage calculator into HTML/JavaScript