var princ;
var ratepc;
var years;

function calcAmt(frm) {
 princ = frm.pr.value;
 ratepc = frm.rt.value;
 years = frm.yr.value;
 frm.amt.value = Math.round(princ*(Math.pow((1+ratepc/100),years))*100)/100;
 frm.intr.value = Math.round((princ*(Math.pow((1+ratepc/100),years))-princ)*100)/100
}

function checkRate(frm) {
 if (ratepc == 0 || ratepc > 30){
  window.alert("Make sure that the Interest Rate really is " +   ratepc +"%?")
  }
}

function checkTerm(frm) {
 if (years == 0 || years > 30){
  window.alert("Make sure that the Term really is " + years + " years?")
  }
}
