<html>
<head>
<script language="javascript">
function DoCalc()
{
  var p = document.calc.P.value;
  if (isNaN(p))
  {
alert("Please enter a valid value");
document.calc.P.focus();
return;
  }  var r = document.calc.R.value;
  if (isNaN(r))
  {
alert("Please enter a valid value");
document.calc.R.focus();
return;
  }  var n = document.calc.N.value;
  if (isNaN(n))
  {
alert("Please enter a valid value");
document.calc.N.focus();
return;
  }  document.calc.A.value = parseFloat(p) * Math.pow(1+parseFloat(r)/100.0,parseFloat(n));
}
</script>
</head>
<body>
<form name="calc">
<table>
<tr>
<td colspan="2">Enter the three numbers (P,R,N)</td>
</tr>
<tr>
<td>P:</td>
<td><input type="text" name="P"></td>
</tr>
<tr>
<td>R:</td>
<td><input type="text" name="R"></td>
</tr>
<tr>
<td>N:</td>
<td><input type="text" name="N"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="Calc" onclick="DoCalc()"></td>
</tr>
<tr>
<td>Results:</td>
<td><input type="text" name="A"></td>
</tr>
</table>
</form>
</body>
</html>