<script
language="javascript"
type="text/javascript">
function
calculate()
{
var
pi =
3.14159265359;
var
radius =
document.rpmForm.diameter.value
/
2;
var
circ =
2
*
pi *
radius;
var
totlength =
circ *
.00001578;
var
totrpm =
document.rpmForm.rpm.value
*
60;
var
total =
totrpm *
totlength;
document.rpmForm.topSpeed.value
=
total;
}
</script>
<form
name="rpmForm">
<table
border=0>
<tr>
<td>
Diameter of Tire (in Inches)
</td>
<td>
<input
type=text
name=diameter
value=18>
</td>
</tr>
<tr>
<td>
RPM Value
</td>
<td>
<input
type=text
name=rpm
value=2000>
</td>
</tr>
<tr>
<td
colspan=2>
<input
type=button
value="Calculate
Top Speed"
onClick="calculate()">
</td>
</tr>
<tr>
<td>
Top Speed with no Weight
</td>
<td>
<input
type=text
name=topSpeed>
</td>
</tr>
</table>
</form>