The last part I need to do is to take the Purchase Price Cost and multiply that by .60 and display it in a text box already named NDTECost. Thanks so much for your time.
General Variables
var MAX_MORTGAGE_DIGITS = 30
var TX_TYPE_DOC_STAMP_ON_DEED = 1
var TX_TYPE_DOC_STAMP_ON_MORTGAGE = 2
var TX_TYPE_INTANGIBLE_TAX = 3
// dade county documentary stamp on single family home
var TX_TYPE_DADE_SINGL_DSTAMP_ON_DEED = 4
// dade county documentary stamp on non-single family home
var TX_TYPE_DADE_NONSINGL_DSTAMP_ON_DEED = 5
var FL_INTANGIBLE_TAX_MULTIPLIER = 0.002
var FL_DOC_STAMP_ON_MORT_MULTIPLIER = 0.35
var FL_DOC_STAMP_ON_DEED_MULTIPLIER = 0.70
// multiplier for dade county documentary stamp on single family home
var DADE_FL_SINGL_DSTAMP_ON_DEED_MULTIPLIER = 0.60
// multiplier for dade county documentary stamp on non-single family home
var DADE_FL_NONSINGL_DSTAMP_ON_DEED_MULTIPLIER = 1.05
var FL_DOC_STAMP_MORT_PER_VALUE = 100.00
var FL_DOC_STAMP_DEED_PER_VALUE = 100.00
var ONE_HUNDRED_THOUSAND = 100000.00
var ONE_MILLION = 1000000.00
var FIVE_MILLION = 5000000.00
var TEN_MILLION = 10000000.00
var FL_UPTO_100K_MULTIPLIER = 5.75
var FL_OVER_100K_UPTO_1M_MULTIPLIER = 5.00
var FL_OVER_1M_UPTO_5M_MULTIPLIER = 2.50
var FL_OVER_5M_UPTO_10M_MULTIPLIER = 2.25
var FL_OVER_10M_MULTIPLIER = 2.00
var FL_UPTO_100K_PER_VALUE = 1000.00
var FL_OVER_100K_UPTO_1M_PER_VALUE = 1000.00
var FL_OVER_1M_UPTO_5M_PER_VALUE = 1000.00
var FL_OVER_5M_UPTO_10M_PER_VALUE = 1000.00
var FL_OVER_10M_PER_VALUE = 1000.00
var FL_UPTO_100K_ADDITIONAL_AMOUNT = 0.00
var FL_OVER_100K_UPTO_1M_ADDITIONAL_AMOUNT = 575.00
var FL_OVER_1M_UPTO_5M_ADDITIONAL_AMOUNT = 5075.00
var FL_OVER_5M_UPTO_10M_ADDITIONAL_AMOUNT = 15075.00
var FL_OVER_10M_ADDITIONAL_AMOUNT = 26325.00
// florida insurance prim min cost
var FL_INS_PREM_MIN_COST = 100.00
Function:
calcFLInsurPremium
Description:
This function will calculate Mortgage Premium Cost on the given mortgage amount.
The algorithm used is:
POLICY AMOUNT
Up to $100,000.00 (Amount/1000.00) * 5.75)
Over $100,000.00 up to 1,000,000.00 575.00 + ((Amount-100,000.00/1000.00) * 5.00)
Over $1,000,000.00 up to 5,000,000.00 5075.00 + ((Amount-1,000,000.00/1000.00) * 2.50)
Over $5,000,000.00 up to 10,000,000.00 15075.00 + ((Amount-5,000,000.00/1000.00) * 2.25)
Over $10,000,000.00 up to 10,000,000.00 26325.00 + ((Amount-10,000,000.00/1000.00) * 2.00)
If minimum premium cost to charge is always $100.00.
Formal Arguments:
txObjPurchasePrice - a text object containg the Mortgage Purchase Price or Amount.
txObjCost - a text object whose value will be assigned the Cost amount calculated.
Return Type: Boolean
Return Values:
true - upon success
false - upon failure
function calcFLInsurPremium(txObjPurchasePrice, txObjCost)
{
var nMortgageAmount = new Number;
var nCost;
var txAmount = txObjPurchasePrice;
var txTmp;
// make sure its a number and its a valid mortgage number
if( isValidMortgageAmount(txAmount) == false )
{
txObjCost.value = "0.00";
// alert("Please enter a valid Purchase Price or Mortgage Amount!"

;
txObjPurchasePrice.focus();
return false;
}
// do the necessary calculations to determine the cost
nMortgageAmount = parseFloat(txAmount.value);
if( nMortgageAmount <= ONE_HUNDRED_THOUSAND )
{
// Up to $100,000.00 (Amount/1000.00) * 5.75)
if( nMortgageAmount <= FL_UPTO_100K_PER_VALUE)
{
nCost = FL_UPTO_100K_MULTIPLIER;
}
else
nCost = FL_UPTO_100K_ADDITIONAL_AMOUNT + ((nMortgageAmount/FL_UPTO_100K_PER_VALUE) * FL_UPTO_100K_MULTIPLIER);
}
else if( nMortgageAmount <= ONE_MILLION )
{
// Over $100,000.00 up to 575.00 + ((Amount-100,000.00/1000.00) * 5.00)
// 1,000,000.00
nCost = FL_OVER_100K_UPTO_1M_ADDITIONAL_AMOUNT + (((nMortgageAmount-ONE_HUNDRED_THOUSAND)/FL_OVER_100K_UPTO_1M_PER_VALUE) * FL_OVER_100K_UPTO_1M_MULTIPLIER);
}
else if( nMortgageAmount <= FIVE_MILLION )
{
// Over $1,000,000.00 up to 5075.00 + ((Amount-1,000,000.00/1000.00) * 2.50)
// 5,000,000.00
nCost = FL_OVER_1M_UPTO_5M_ADDITIONAL_AMOUNT + (((nMortgageAmount-ONE_MILLION)/FL_OVER_1M_UPTO_5M_PER_VALUE) * FL_OVER_1M_UPTO_5M_MULTIPLIER);
}
else if( nMortgageAmount <= TEN_MILLION )
{
// Over $5,000,000.00 up to 15075.00 + ((Amount-5,000,000.00/1000.00) * 2.25)
// 10,000,000.00
nCost = FL_OVER_5M_UPTO_10M_ADDITIONAL_AMOUNT + (((nMortgageAmount-FIVE_MILLION)/FL_OVER_5M_UPTO_10M_PER_VALUE) * FL_OVER_5M_UPTO_10M_MULTIPLIER);
}
else
{
// Over $10,000,000.00 up to 26325.00 + ((Amount-10,000,000.00/1000.00) * 2.00)
nCost = FL_OVER_10M_ADDITIONAL_AMOUNT + (((nMortgageAmount-TEN_MILLION)/FL_OVER_10M_PER_VALUE) * FL_OVER_10M_MULTIPLIER);
}
if( nCost < FL_INS_PREM_MIN_COST )
{
nCost = FL_INS_PREM_MIN_COST
}
// return the calculated value
txTmp = nCost.toString();
//alert("nCost = " + nCost.toString());
//alert("txTmp before round = " + txTmp);
rnd2DecPlaces(txTmp, txObjCost);
txObjPurchasePrice.focus();
return true;
} /**** calcFLInsurPremium ****/
function processFormSubmit(frmObj)
{
return false;
}