Quote:
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>LTV</title>
<SCRIPT LANGUAGE="JavaScript">
function evaluate (string)
{
// Loan to value rate
var lToValue65 = 0.65; //This is 65%
var lToValue75 = 0.75; //This is 75%
var lToValue85 = 0.85; //This is 85%
// Baserate
var baseRate = 0.045 //This is the base rate at 4.5%
// Plus margin
var plusMargin65 = 0.0065; //This is 0.65%
var plusMargin75 = 0.0074; //This is 0.74%
var plusMargin85 = 0.0099; //This is 0.99%
var payRate65 = plusMargin65 + baseRate; //This calculates the total payrate for 65% LTV
var payRate75 = plusMargin75 + baseRate; //This calculates the total payrate for 75% LTV
var payRate85 = plusMargin85 + baseRate; //This calculates the total payrate for 85% LTV
maxMortgage65 = Math.ceil(document.evalform.txtRent.value * 12 / 1.25 / payRate65 * 100); // This forumula calculates the max loan available
maxMortgage75 = Math.ceil(document.evalform.txtRent.value * 12 / 1.25 / payRate75 * 100); // This forumula calculates the max loan available
maxMortgage85 = Math.ceil(document.evalform.txtRent.value * 12 / 1.25 / payRate85 * 100); // This forumula calculates the max loan available
calcRent65 = Math.ceil(payRate65*maxMortgage65); // Calculates the mortgage cost per month
calcRent75 = Math.ceil(payRate75*maxMortgage75); // Calculates the mortgage cost per month
calcRent85 = Math.ceil(payRate85*maxMortgage85); // Calculates the mortgage cost per month
document.evalform.prop65.value = maxMortgage65;
document.evalform.prop75.value = maxMortgage75;
document.evalform.prop85.value = maxMortgage85;
document.evalform.rent65.value = calcRent65;
document.evalform.rent75.value = calcRent75;
document.evalform.rent85.value = calcRent85;
}
</SCRIPT>
</head>
<body>
<FORM NAME="evalform">
<p><b><font face="Verdana">Property value: £</font></b> <font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B><INPUT NAME="propVal" TYPE="text" SIZE=12><br>
Rent per month: £ <INPUT NAME="currentRent" TYPE="text" SIZE=12></B></font><INPUT NAME="button" TYPE="button" VALUE="Submit" OnClick="evaluate(document.evalform)" style="float: left"></p>
<p align="left"> </p>
<table border="0" width="40%" id="table1">
<tr>
<td>LTV</td>
<td>Max mortgage</td>
<td>Mortgage cost per month</td>
</tr>
<tr>
<td>65% LTV</td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="prop65" TYPE="text" SIZE=12></B></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="rent65" TYPE="text" SIZE=12></B></font></td>
</tr>
<tr>
<td>75% LTV</td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="prop75" TYPE="text" SIZE=12></B></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="rent75" TYPE="text" SIZE=12></B></font></td>
</tr>
<tr>
<td>85% LTV</td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="prop85" TYPE="text" SIZE=12></B></font></td>
<td><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<B>£<INPUT NAME="rent85" TYPE="text" SIZE=12></B></font></td>
</tr>
</table>
<p> </p>
</FORM>
</body>
</html>