function BVHelp(form) {	alert("This feature is not yet implemented.");}function randomBVProblem(form) { 	var theD = Math.round((Math.random()*6+2)*10)/10; 	var theR = Math.round((Math.random()*12+2)*10)/10;  	form.DInput.value="" + theD; 	form.RInput.value="" + theR; 	form.SOutput.value=""; }  function findBV(form) { 	var theDStr = form.DInput.value; 	if (!isPositiveNumber(theDStr)) { 		return false; 	} 	var theRStr = form.RInput.value; 	if (!isPositiveNumber(theRStr)) { 		return false; 	} 	theD = parseFloat(theDStr); 	theR = parseFloat(theRStr); 	if (theD <= 0) { 		alert("The preferred dividend rate must be greater than 0."); 		return true; 	} 	if (theR <= 0) { 		alert("The required return must be greater than 0."); 		return true; 	} 	var theS = theD/(theR/100); 	form.SOutput.value = "" + Math.round(theS*100)/100; 	return true; }  function calcBVHelp(form) { 	var theDStr = form.DInput.value; 	if (!isPositiveNumber(theDStr)) { 		return false; 	} 	var theRStr = form.RInput.value; 	if (!isPositiveNumber(theRStr)) { 		return false; 	} 	theD = parseFloat(theDStr); 	theR = parseFloat(theRStr); 	if (theD <= 0) { 		alert("The preferred dividend rate must be greater than 0."); 		return true; 	} 	if (theR <= 0) { 		alert("The required return must be greater than 0."); 		return true; 	} 	var theS = theD/(theR/100); 	theS = "" + Math.round(theS*100)/100; 	var theOut = "<html><head><title>Preferred Stock Price Help</title></head><body bgcolor='white'>"; 	theOut += "<h3>Preferred Stock Price Help</h3>"; 	theOut += drawFraction("P<SUB>p</SUB>","D<SUB>p</SUB>","r","" + Math.round(theD*100)/100,"" + Math.round(theR*10)/1000, "$" + theS); 	theOut += "<CENTER>";	theOut += "<P><FORM NAME=\"Form1\">";	theOut += "<INPUT TYPE=\"button\" VALUE=\"   OK   \" onClick=\"window.close();\"></FORM></P></CENTER>"; 	theOut += "</body></html>"; 	var newWin = window.open("","","scrollbars,resizable,width=400,height=240"); 	if (newWin != null) { 		newWin.document.write(theOut); 		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; }  function isNegativeNumber(inputStr) { 	if (inputStr.length < 2) { 		alert("Please input a negative number."); 		return false; 	} 	var oneChar = inputStr.substring(0,1); 	if (oneChar != '-') { 		alert("Please make sure that only negative numbers are input."); 		return false; 	} 	for (var i = 1; i < inputStr.length; i++) { 		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; }  function isNumber(inputStr) { 	var decFlag = false; 	if (inputStr == ".") { 		alert("Please make sure that only numbers are input."); 		return false; 	} 	for (var i = 0; i < inputStr.length; i++) { 		var oneChar = inputStr.substring(i,i+1); 		if ((i == 0) && (inputStr.length > 1)) {	 		if (((oneChar >= "0") && (oneChar <= "9")) || ((oneChar == ".") && (decFlag == false)) || (oneChar == "-")) {	 			 		} else {	 			alert("Please make sure that only numbers are input.");	 			return false;	 		}	 	} else {	 		if (((oneChar >= "0") && (oneChar <= "9")) || ((oneChar == ".") && (decFlag == false))) {	 			 		} else {	 			alert("Please make sure that only numbers are input.");	 			return false;	 		}	 	}	 	if (oneChar == ".") {	 		decFlag = true;	 	}	 	}	return true; }  function drawFraction(inLHS,inNumFormula,inDenFormula,inNum,inDen,inAnswer) {	var theOut = "<table cellspacing='1' cellpadding='1'><tr>";	theOut += "<td rowspan='3' valign='center'>" + inLHS + "</td>";	theOut += "<td rowspan='3' valign='center'>=</td>";	theOut += "<td valign='center' align='center'>" + inNumFormula + "</td>";	theOut += "<td rowspan='3' valign='center'>=</td>";	theOut += "<td valign='center' align='center'>" + inNum + "</td>";	theOut += "<td rowspan='3' valign='center'>=</td>";	theOut += "<td rowspan='3' valign='center'>" + inAnswer + "</td>";	theOut += "</tr>";	theOut += "<tr>";	theOut += "<td valign='center' align='center'><hr noshade></td>";	theOut += "<td valign='center' align='center'><hr noshade></td>";	theOut += "</tr>";	theOut += "<tr>";	theOut += "<td valign='center' align='center'>" + inDenFormula + "</td>";	theOut += "<td valign='center' align='center'>" + inDen + "</td>";	theOut += "</tr></table>";	return theOut;}