// Calculate 1/4 mile ET from HP and weight: qm-from-wt-hp.html
// ET = ((Weight / HP)^.333) * 5.825

// Calculate 1/4 mile trap speed from HP and weight: qm-from-wt-hp.html
// MPH = ((HP / Weight)^.333) * 234

var qm_calc = function() {
    var weight,
    horsepower, et, speed;
    weight = Number(document.qm.Weight.value);
    horsepower = Number(document.qm.Horsepower.value);
    et = Math.pow((weight / horsepower), 0.333) * 5.825;
    speed = Math.pow((horsepower / weight), 0.333) * 234;
    document.qm.ET.value = Math.round(et * 100) / 100 + " seconds";
    document.qm.Speed.value = Math.round(speed * 100) / 100 + " MPH";
    return et;
};
