function randomPVAProblem(form) { 	var thePMT = Math.round((Math.random()*1000)+1);  	var theNR = Math.round((Math.random()*2000)+1)/100;  	var theNP = Math.round((Math.random()*25)+1); 	form.PMTInput.value="" + thePMT;  	form.NRInput.value="" + theNR;  	form.NPInput.value="" + theNP; 	form.PVOutput.value=""; }  function findPVA(form) { 	var thePMT = form.PMTInput.value; 	if (!isPositiveNumber(thePMT)) { 		return false; 	} 	var theNP = form.NPInput.value; 	if (!isPositiveNumber(theNP)) { 		return false; 	} 	var theNR = form.NRInput.value; 	if (!isPositiveNumber(theNR)) { 		return false; 	} 	var thePV = thePMT*(1-Math.pow((1 + theNR/100),-theNP))/(theNR/100); 	form.PVOutput.value = "" + Math.round(thePV*100)/100; 	return true; }  function calcPVAHelp(form) { 	var thePMT = form.PMTInput.value; 	if (!isPositiveNumber(thePMT)) { 		return false; 	} 	var theNP = form.NPInput.value; 	if (!isPositiveNumber(theNP)) { 		return false; 	} 	var theNR = form.NRInput.value; 	if (!isPositiveNumber(theNR)) { 		return false; 	} 	var thePV = thePMT*(1-Math.pow((1 + theNR/100),-theNP))/(theNR/100); 	thePV = "" + Math.round(thePV*100)/100; 	var theStr = "<HTML><HEAD><TITLE>Calculator Help</TITLE></HEAD><BODY BGCOLOR=\"white\">";	theStr += "<P>Follow the instructions below to solve the problem using the Texas Instruments BAII Plus calculator.";	theStr += " Your calculator must be configured for annual compounding.</P>";	theStr += "<CENTER>"	theStr += "<P>Payment= $" + thePMT + " Discount Rate= " + theNR + "% Years= " + theNP + "</P>" 	theStr += "<TABLE border=0 cellpadding=6 cellspacing=2  bgcolor=\"#CCCCCC\">"	theStr += "<TR><TD COLSPAN=2><b>First, clear the calculator.</b></TD></TR>";	theStr += "<TR><TD ALIGN=center>[2nd][CLR TVM]</TD><TD ALIGN=center>[2nd][QUIT]</TD></TR>";	theStr += "<TR><TD COLSPAN=2><b>Then, solve the problem.</b></TD></TR>";	theStr += "<TR><TD ALIGN=center>" + thePMT + "</TD><TD ALIGN=center>[PMT]</TD></TR>";	theStr += "<TR><TD ALIGN=center>" + theNR + "</TD><TD ALIGN=center>[I/Y]</TD></TR>";	theStr += "<TR><TD ALIGN=center>" + theNP + "</TD><TD ALIGN=center>[N]</TD></TR>"; 	theStr += "<TR><TD ALIGN=center>[CPT]</TD><TD ALIGN=center>[PV]</TD></TR>"; 	theStr += "<TR><TD COLSPAN=2><b>The Present Value is $" + thePV + "</b></TD></TR></TABLE>";	theStr += "<P><FORM NAME=\"Form1\">";	theStr += "<INPUT TYPE=\"button\" VALUE=\"   OK   \" onClick=\"window.close();\"></FORM></CENTER>";	theStr += "</P></BODY></HTML>" 	var newWin = window.open("","","scrollbars,resizable,width=380,height=360"); 	if (newWin != null) { 		newWin.document.write(theStr); 		newWin.document.close(); 		newWin.focus(); 	} 	return true; }  function randomFVAProblem(form) { 	var thePMT = Math.round((Math.random()*1000)+1);  	var theNR = Math.round((Math.random()*2000)+1)/100;  	var theNP = Math.round((Math.random()*25)+1); 	form.PMTInput.value="" + thePMT;  	form.NRInput.value="" + theNR;  	form.NPInput.value="" + theNP; 	form.FVOutput.value=""; }  function findFVA(form) { 	var thePMT = form.PMTInput.value; 	if (!isPositiveNumber(thePMT)) { 		return false; 	} 	var theNP = form.NPInput.value; 	if (!isPositiveNumber(theNP)) { 		return false; 	} 	var theNR = form.NRInput.value; 	if (!isPositiveNumber(theNR)) { 		return false; 	} 	var theFV = thePMT*(Math.pow((1 + theNR/100),theNP) - 1)/(theNR/100); 	form.FVOutput.value = "" + Math.round(theFV*100)/100; 	return true; }  function calcFVAHelp(form) { 	var thePMT = form.PMTInput.value; 	if (!isPositiveNumber(thePMT)) { 		return false; 	} 	var theNP = form.NPInput.value; 	if (!isPositiveNumber(theNP)) { 		return false; 	} 	var theNR = form.NRInput.value; 	if (!isPositiveNumber(theNR)) { 		return false; 	} 	var theFV = thePMT*(Math.pow((1 + theNR/100),theNP) - 1)/(theNR/100); 	theFV = "" + Math.round(theFV*100)/100; 	var theStr = "<HTML><HEAD><TITLE>Calculator Help</TITLE></HEAD><BODY BGCOLOR=\"white\">";	theStr += "<P>Follow the instructions below to solve the problem using the Texas Instruments BAII Plus calculator.";	theStr += " Your calculator must be configured for annual compounding.</P>";	theStr += "<CENTER>"	theStr += "<P>Payment= $" + thePMT + " Interest Rate= " + theNR + "% Years= " + theNP + "</P>" 	theStr += "<TABLE border=0 cellpadding=6 cellspacing=2  bgcolor=\"#CCCCCC\">"	theStr += "<TR><TD COLSPAN=2><b>First, clear the calculator.</b></TD></TR>";	theStr += "<TR><TD ALIGN=center>[2nd][CLR TVM]</TD><TD ALIGN=center>[2nd][QUIT]</TD></TR>";	theStr += "<TR><TD COLSPAN=2><b>Then, solve the problem.</b></TD></TR>";	theStr += "<TR><TD ALIGN=center>" + thePMT + "</TD><TD ALIGN=center>[PMT]</TD></TR>";	theStr += "<TR><TD ALIGN=center>" + theNR + "</TD><TD ALIGN=center>[I/Y]</TD></TR>";	theStr += "<TR><TD ALIGN=center>" + theNP + "</TD><TD ALIGN=center>[N]</TD></TR>"; 	theStr += "<TR><TD ALIGN=center>[CPT]</TD><TD ALIGN=center>[FV]</TD></TR>"; 	theStr += "<TR><TD COLSPAN=2><b>The Future Value is $" + theFV + "</b></TD></TR></TABLE>";	theStr += "<P><FORM NAME=\"Form1\">";	theStr += "<INPUT TYPE=\"button\" VALUE=\"   OK   \" onClick=\"window.close();\"></FORM></CENTER>";	theStr += "</P></BODY></HTML>" 	var newWin = window.open("","","scrollbars,resizable,width=380,height=360"); 	if (newWin != null) { 		newWin.document.write(theStr); 		newWin.document.close(); 		newWin.focus(); 	} 	return true; }  function isPositiveNumber(inputStr) { 	for (var i = 0; i < inputStr.length; i++) { 		var oneChar = inputStr.substring(i,i+1); 		if (((oneChar >= "0") && (oneChar <= "9")) || (oneChar == ".")) { 		 		} else { 			alert("Please make sure that only numbers are input."); 			return false; 		}  	}	return true; }