<!--Hide this file from non-JavaScript supporting browers!
 function popItUp() {
   var newWindow = open("gfe_pop.htm", "secondWindow", "width=450,height=300");
}	

function howtouse() {
   var newWindow = open("gfe_how.htm", "secondWindow", "scrollbars,resizable,width=450,height=300");
}	
	
function privacy() {
   var newWindow = open("privacy.htm", "secondWindow", "width=350,height=300");
}	

//////////////////////////////////////////////
// Returns true if a value contains any
// characters; otherwise, returns false.
//////////////////////////////////////////////
function exists(inputValue) {

    var aCharExists = false

    // Step through the inputValue, using the charAt()
    // method to detect non-space characters.

    for (var i=0; i<=inputValue.length; i++) {
      if (inputValue.charAt(i) != " " && inputValue.charAt(i) != "") {
          aCharExists = true
          break
      }
    }

    return aCharExists
}

    function calcrefiMA() {
    var text = "Refinance" 
    var down =  parseInt(document.CostsForm.priceAmt.value - document.CostsForm.refiMA.value)
    var equity =  parseInt((document.CostsForm.priceAmt.value - document.CostsForm.refiMA.value) / document.CostsForm.priceAmt.value * 100)

	if (document.CostsForm.refiMA.value > 0) {
	var refinance = parseInt(25 + (0.1 * ((document.CostsForm.refiMA.value / 1000 * 5.75) + 25)));
    	var refi = parseInt((document.CostsForm.refiMA.value / 1000 * 5.75)) + refinance + 300;

// Credit Calculated for refinances if balance over $100,000
	if (document.CostsForm.refiMA.value > 100000) {
	var extra = document.CostsForm.refiMA.value - 100000;
	var rebate = parseInt((extra / 1000) * 0.75);
	var refi = refi - rebate }

// Get the current date
today = new Date();

// Get the current month
month = today.getMonth();

// Attach number of months for refi Tax Escrow

switch (month) {
     case 0 :
          displayMonth = parseInt(4)
          break
      case 1 :
          displayMonth = parseInt(5)
          break
      case 2 :
          displayMonth = parseInt(6)
          break
      case 3 :
          displayMonth = parseInt(7)
          break
      case 4 :
          displayMonth = parseInt(8)
          break
      case 5 :
          displayMonth = parseInt(9)
          break
      case 6 :
          displayMonth = parseInt(10)
          break
      case 7 :
          displayMonth = parseInt(11)
          break
      case 8 :
          displayMonth = parseInt(12)
          break
      case 9 :
          displayMonth = parseInt(13)
          break
      case 10 :
          displayMonth = parseInt(14)
          break
      case 11 :
          displayMonth = parseInt(3)
          break
}	

	alert("This is a refinance mortgage for $" + document.CostsForm.refiMA.value + ". " + "Paying off your present $" + document.CostsForm.Balance.value + " mortgage reduces your equity in the property to " + equity + "%.")
	document.CostsForm.Purpose.value = text
      	document.CostsForm.Purpose2.value = text
	document.CostsForm.downPmt.value = down
	document.CostsForm.MA.value = document.CostsForm.refiMA.value
	document.CostsForm.Title.value = refi
	document.CostsForm.taxMths.value = displayMonth

}
else {
	 document.CostsForm.Title.value = 350 
	alert("This is a Purchase.")
	document.CostsForm.Purpose.value = "Purchase"
      	document.CostsForm.Purpose2.value = "Purchase"
	document.CostsForm.taxMths.value = 2
	document.CostsForm.downPmt.value = 25000
	 document.CostsForm.MA.value = parseInt(document.CostsForm.priceAmt.value - document.CostsForm.downPmt.value) 
}
}
    function mortgageAmount() {
   
    var price = document.CostsForm.priceAmt.value;

	if (document.CostsForm.refiMA.value > 0) {
	dpayment = document.CostsForm.priceAmt.value - document.CostsForm.refiMA.value
	alert("This is a refinance mortgage for $" + document.CostsForm.refiMA.value)
	document.CostsForm.MA.value = document.CostsForm.refiMA.value
	document.CostsForm.downPmt.value = dpayment
 }	

else {
    if (document.CostsForm.downPmt.value < 99) {
    var down = parseInt(price * (document.CostsForm.downPmt.value / 100));
    var mtge = parseInt(price - down);
    var calcdown = parseInt(price - mtge)
     var ltv =((price - mtge) / price) * 100; 
    equity = parseInt(ltv);
    alert("The mortgage amount is $" + mtge + " and your down payment / equity is $" + " " + down + " " + "which is" + " " + equity + "%");
     document.CostsForm.downPmt.value = calcdown;
     document.CostsForm.MA.value = mtge}
else {
      var mtge = price - document.CostsForm.downPmt.value;
      var ltv =((price - mtge) / price) * 100; 
    equity = parseInt(ltv);
   alert("The mortgage amount is $" + mtge + " and your down payment / equity is $" + " " + document.CostsForm.downPmt.value + " " + "which is" + " " + equity + "%");
     document.CostsForm.MA.value = mtge}
}
}
    function calcPurpose() {    
   	if (document.CostsForm.Balance.value > 0 || document.CostsForm.refiMA.value >0) {
	var itext = "Refinance" 
	var loanvalue = parseInt(document.CostsForm.priceAmt.value - document.CostsForm.Balance.value);
	var loanpercent = parseInt((document.CostsForm.priceAmt.value - document.CostsForm.Balance.value) / document.CostsForm.priceAmt.value * 100);
	var text = itext + ".    Based on the $" + document.CostsForm.priceAmt.value + " property value minus the $" + document.CostsForm.Balance.value + " present mortgage balance the 'Equity' in your home is $" + loanvalue + " or " + loanpercent + "%."
		parseInt(document.CostsForm.refiMA.value = document.CostsForm.Balance.value);
		parseInt(document.CostsForm.downPmt.value = document.CostsForm.priceAmt.value - document.CostsForm.refiMA.value)
		parseInt(document.CostsForm.MA.value = document.CostsForm.refiMA.value);

}
 	else {
	var text = "Purchase" }
     var alta = 550
    var builder1 =  parseInt(25 + (0.1 * ((document.CostsForm.priceAmt.value / 1000 * 5.75) + 25)));
    var builder =  parseInt((document.CostsForm.priceAmt.value / 1000 * 5.75)) + alta + builder1;
   	
     var refinance = parseInt(25 + (0.1 * ((document.CostsForm.refiMA.value / 1000 * 5.75) + 25)));
    var refi = parseInt((document.CostsForm.refiMA.value / 1000 * 5.75)) + refinance + 300;

// Credit Calculated for refinances if paying off existing balance over $100,000
	if (document.CostsForm.Balance.value > 100000) {
	var extra = document.CostsForm.Balance.value - 100000;
	var rebate = parseInt((extra / 1000) * 0.75);
	var refi = refi - rebate }

// Get the current date
today = new Date();

// Get the current month
month = today.getMonth();

// Attach number of months for refi Tax Escrow

switch (month) {
     case 0 :
          displayMonth = parseInt(4)
          break
      case 1 :
          displayMonth = parseInt(5)
          break
      case 2 :
          displayMonth = parseInt(6)
          break
      case 3 :
          displayMonth = parseInt(7)
          break
      case 4 :
          displayMonth = parseInt(8)
          break
      case 5 :
          displayMonth = parseInt(9)
          break
      case 6 :
          displayMonth = parseInt(10)
          break
      case 7 :
          displayMonth = parseInt(11)
          break
      case 8 :
          displayMonth = parseInt(12)
          break
      case 9 :
          displayMonth = parseInt(13)
          break
      case 10 :
          displayMonth = parseInt(14)
          break
      case 11 :
          displayMonth = parseInt(3)
          break
}	
	
if(document.CostsForm.Balance.value >0) {     
     alert("This is a" + " " + text)
     document.CostsForm.taxMths.value = displayMonth 
     document.CostsForm.Title.value = refi 
     document.CostsForm.Purpose.value = itext
     document.CostsForm.Purpose2.value = itext
   
}
else {    
     document.CostsForm.Title.value = alta 
     alert("This is a Purchase")
     document.CostsForm.Purpose.value = "Purchase"
     document.CostsForm.Purpose2.value = "Purchase"
     document.CostsForm.taxMths.value = 2
     document.CostsForm.downPmt.value = 25000
     document.CostsForm.MA.value = parseInt(document.CostsForm.priceAmt.value - document.CostsForm.downPmt.value)
}
}

	


     function calcPoints() {
     var mtge = CostsForm.MA.value;
    if (!CostsForm.MA.value) {
    alert("Please calculate Mortgage Amount First!") }	
     else {var points = mtge * ((CostsForm.Points.value) / 100);
    pts=parseInt(points)
     alert("The points are $" + pts)}
     document.CostsForm.PT.value = pts
} 

     function calcInterest() {
     var mtge = CostsForm.MA.value;
     var intyr = (mtge * (CostsForm.Rate.value / 100) / 365);
     var intdays = intyr * CostsForm.Days.value;
     perdiem = parseInt(intdays);
     document.CostsForm.Interest.value = perdiem	  
}

     function calcHazard() {
     var price = document.CostsForm.priceAmt.value; 	
     var haz = price * .00527;
     hazard = parseInt(haz);
     hazEsc = parseInt(document.CostsForm.hazardMths.value * (hazard / 12));
     alert("The CALCULATED Annual Hazard Insurance Premium estimate is $" + hazard +"." + " " + " " + " " + "You can also INPUT a different amount, if applicable");
     document.CostsForm.Hazard.value = hazard
     document.CostsForm.hazardEsc.value = hazEsc
}
     function calcHazEsc() {
     var hazEsc = parseInt(document.CostsForm.hazardMths.value * (document.CostsForm.Hazard.value / 12));
     alert("The Annual Hazard Insurance Premium estimate is $" + document.CostsForm.Hazard.value);
     document.CostsForm.hazardEsc.value = hazEsc
}

     function calcTaxes() {
     var value =((document.CostsForm.priceAmt.value * .85) - 25000)/1000;
     var tax = parseInt(value * 17.5);
     var taxEscrow = parseInt(document.CostsForm.taxMths.value *( tax / 12));
     alert("The CALCULATED Annual Taxes estimate is $" + tax +"." + " " + " " + " " + "You can also INPUT a different amount, if applicable");
     document.CostsForm.Taxes.value = tax;
     document.CostsForm.taxEsc.value = taxEscrow
}

     function calcTaxEsc() {
     var taxesEsc = parseInt(document.CostsForm.taxMths.value * (document.CostsForm.Taxes.value /12));
     alert("The Annual Taxes estimate is $" + document.CostsForm.Taxes.value);
     document.CostsForm.taxEsc.value = taxesEsc
}

     function calcTitle() {
     var alta = 550
    var refinance = parseInt(25 + (0.1 * ((document.CostsForm.refiMA.value / 1000 * 5.75) + 25)));
    //Refinance Balance over $100,000
	if(document.CostsForm.refiMA.value > 100000) {
	var extra = document.CostsForm.refiMA.value - 100000;
	var rebate = parseInt((extra / 1000) * 0.75);
	var refi = parseInt((document.CostsForm.refiMA.value / 1000 * 5.75)) + refinance + 300 - rebate }
   else {
	 var refi = parseInt((document.CostsForm.refiMA.value / 1000 * 5.75)) + refinance + 300 }

    var reissue = parseInt((document.CostsForm.refiMA.value / 1000 * 3.75)) + refinance + 300
    var builder1 =  parseInt(25 + (0.1 * ((document.CostsForm.priceAmt.value / 1000 * 5.75) + 25)));
    var builder =  parseInt((document.CostsForm.priceAmt.value / 1000 * 5.75)) + alta + builder1;



	if(document.CostsForm.Balance.value > 0 || document.CostsForm.refiMA.value > 0) {
	alert("This is a Refinance and the estimated Title Insurance of $" + refi + " " + "assumes that you did not purchase Owners Title Insurance when you bought or last refinanced your home.  If you did, then this estimated charge will be less (about $" + reissue + " ) with a 'Reissue Credit' determined by the Title Company")
	document.CostsForm.Title.value = refi }
else {    
	 alert("The Title Company charges on this PURCHASE are estimated at $" + alta + " which includes settlement services Title Insurance that covers the mortgage amount.") 
	document.CostsForm.Title.value = alta }
}

     function calcTransfer() {
     var trans = parseInt((document.CostsForm.priceAmt.value / 1000) * 7);
	 //Purchase Price over $100,000
	if(document.CostsForm.priceAmt.value > 100000) {
	var extra = document.CostsForm.priceAmt.value - 100000;
	var rebate = parseInt((extra / 1000) * 0.75);
	var title = parseInt((document.CostsForm.priceAmt.value / 1000 * 5.75)) - rebate }
   else {
	 var title = parseInt((document.CostsForm.priceAmt.value / 1000 * 5.75))  }
	var both = parseInt(trans + title);

     if(document.CostsForm.Balance.value > 0 || document.CostsForm.refiMA.value > 0) {
	alert("This is a Refinace and Transfer Taxes only apply if you are purchasing a home.") }
else {
	alert("Transfer Taxes are based on the $" + document.CostsForm.priceAmt.value + " " + "Property Sale Price (70 cents for each $100) and normally paid by Seller along with the Title Insurance associated with the purchase." + " " + " " + "However, if your contact has the buyer paying, we estimate $" + trans + " " +"for Transfer Taxes plus $" + title + " for Title Insurance covering the Sale Price." + "   Enter total of $" + both + ". ");
}

}
     function calcStamps() {
     var stamps = parseInt((document.CostsForm.MA.value / 1000) * 3.5);
      alert("Based on the $" + document.CostsForm.MA.value + " " + "Mortgage Amount, Stamps on the mortgage are $" + stamps + ".");
     document.CostsForm.MtgeStamps.value = stamps
}
     function calcSum() {
     if (!CostsForm.PT.value) {
     	document.CostsForm.PT.value=0 }
     var points = parseInt(document.CostsForm.PT.value)
      if (!CostsForm.Appraisal.value) {
     	document.CostsForm.Appraisal.value=300 }
     var appraisal = parseInt(document.CostsForm.Appraisal.value)
    if (!CostsForm.Credit.value) {
     	document.CostsForm.Credit.value=0 }
     var credit = parseInt(document.CostsForm.Credit.value)
    if (!CostsForm.TaxSvc.value) {
     	document.CostsForm.TaxSvc.value=0 }
     var taxsvc = parseInt(document.CostsForm.TaxSvc.value)
     if (!CostsForm.Process.value) {
     	document.CostsForm.Process.value=100 }
     var process = parseInt(document.CostsForm.Process.value)
    if (!CostsForm.UW.value) {
     	document.CostsForm.UW.value=590 }
     var uw = parseInt(document.CostsForm.UW.value)
     if (!CostsForm.Wire.value) {
     	document.CostsForm.Wire.value=0 }
     var wire = parseInt(document.CostsForm.Wire.value)
    if (!CostsForm.Docs.value) {
     	document.CostsForm.Docs.value=250 }
     var docs = parseInt(document.CostsForm.Docs.value)
     if (!CostsForm.Courier.value) {
     	document.CostsForm.Courier.value=0 }
     var courier = parseInt(document.CostsForm.Courier.value)
    if (!CostsForm.Flood.value) {
     	document.CostsForm.Flood.value=0 }
     var flood = parseInt(document.CostsForm.Flood.value)
     if (!CostsForm.Interest.value) {
     	document.CostsForm.Interest.value=0 }
     var interest = parseInt(document.CostsForm.Interest.value)
    if (!CostsForm.Hazard.value) {
     	document.CostsForm.Hazard.value=0 }
     var hazard = parseInt(document.CostsForm.Hazard.value)
    if (!CostsForm.hazardEsc.value) {
     	document.CostsForm.hazardEsc.value=0 }
     var hazesc = parseInt(document.CostsForm.hazardEsc.value)
     if (!CostsForm.taxEsc.value) {
     	document.CostsForm.taxEsc.value=0 }
     var taxesc = parseInt(document.CostsForm.taxEsc.value)
     if (!CostsForm.Title.value) {
     	document.CostsForm.Title.value=550 }
     var title = parseInt(document.CostsForm.Title.value)
     if (!CostsForm.Transfer.value) {
     	document.CostsForm.Transfer.value=0 }
     var transfer = parseInt(document.CostsForm.Transfer.value)
    if (!CostsForm.Recording.value) {
     	document.CostsForm.Recording.value=125 }
     var recording = parseInt(document.CostsForm.Recording.value)
   if (!CostsForm.Termite.value) {
     	document.CostsForm.Termite.value=75 }
     var termite = parseInt(document.CostsForm.Termite.value)
     if (!CostsForm.Survey.value) {
     	document.CostsForm.Survey.value=200 }
     var survey = parseInt(document.CostsForm.Survey.value)

var stamps = parseInt((document.CostsForm.MA.value / 1000) * 3.5);
           document.CostsForm.MtgeStamps.value = stamps;
var ltv = parseInt((document.CostsForm.MA.value / document.CostsForm.priceAmt.value) * 100);
          text1 = "LTV = "
          text2 = "%"	  
           document.CostsForm.Loantovalue.value = text1 + ltv +text2


	if(document.CostsForm.refiMA.value > 0) {
	var payoff = parseInt(document.CostsForm.Balance.value)  }
else {
	var payoff = parseInt(document.CostsForm.priceAmt.value)  }
     var ma2 = parseInt(document.CostsForm.MA.value)	
	
	if(document.CostsForm.refiMA.value > 0) {
	var sumprepaids =  interest + hazesc + taxesc
	 sum = points + appraisal + credit + taxsvc + process + uw + wire + docs + courier + flood +interest + hazesc + taxesc + title + transfer + recording + stamps + termite + survey
}
else {
	var sumprepaids =  interest + hazard + hazesc + taxesc 
	 sum = points + appraisal + credit + taxsvc + process + uw + wire + docs + courier + flood +interest + hazard + hazesc + taxesc + title + transfer + recording + stamps + termite + survey
}

     sumclosing =  points + appraisal + credit + taxsvc + process + uw + wire + docs + courier + flood + title + transfer + recording + stamps + termite + survey
    
     var bottomprice = parseInt(payoff)
     var bottommtge = parseInt(document.CostsForm.MA.value)
     var totalfunds = bottomprice - bottommtge + sumclosing + sumprepaids
	if(totalfunds < 0) {
	var by = "To You" }
else {
	var by = "From You" }

	if(totalfunds <0) {
	var needfunds = bottommtge - bottomprice - sumclosing - sumprepaids }
else {
	var needfunds = totalfunds }


    
     
    alert("The Estimated Closing Costs total $" + sum + "." + " " + " " + "If the amount shows 'NaN' as NOT A NUMBER then go back and make sure each cost has an Amount or $0 that is LEFT ALIGNED in the input box.")	
     document.CostsForm.Total.value = sum
     document.CostsForm.Payoff.value = payoff
     document.CostsForm.MA2.value = ma2
     document.CostsForm.ClosingCosts.value = sumclosing
     document.CostsForm.PrepaidCosts.value = sumprepaids
	document.CostsForm.Funds.value = needfunds
	document.CostsForm.By.value = by
}
     
     function calcpurpose1() {
     if(document.CostsForm.Balance.value > 0 || document.CostsForm.refiMA.value > 0) {
     var text = "Refinance" }
else {
     var text = "Purchase" }
     alert("This is a CALCULATED field.  No need for input.")
      document.CostsForm.Purpose.value = text
      document.CostsForm.Purpose2.value = text
} 

     function HELPrate() {
     alert("Enter an amount in a numeric format to include decimal point as shown in the 'default rate'.   We don't use the rate to determine the monthly payment in this calculator, only to figure the interest for the days from date of settlement through the end of your settlement month since all mortgage payments are due on the 1st of the full month following settlement.")
} 

     function HELPrefi() {
     alert("Enter the balance of the mortgage being refinanced.   The calculator will change the 'Purpose' to Refinance.   You should enter your payoff amount as only the PRINCIPAL BALANCE OWING.   Your present mortgage servicer will mail you a check separately any amounts remaining in your escrow account held by them for taxes and insurance.   Since lenders do not transfer escrow accounts, you will need to establish a totally new escrow account with your new mortgage.  Yes, that does increase your closing costs at settlement, but only by an amount that will be sent you later by the previous lender.")
}

     function HELPrefiLTV() {
    
    var value = parseInt(document.CostsForm.priceAmt.value);
    	var seventy = parseInt (value * .70);
	var sevenfive = parseInt (value * .75);   
	var eighty = parseInt (value * .80);   
	var eightyfive = parseInt (value * .85);
	var ninety = parseInt (value * .90);
	var ninetyfive = parseInt (value * .95);
     alert("Based on your $" + value + " property value here's a few Refinancing Loan To Value amounts : 70% = $" + seventy + "; 75% = $" + sevenfive + "; 80% = $" + eighty + "; 85% = $" + eightyfive + "; 90% = $" + ninety + "; and 95% = $" + ninetyfive)

}
       function HELPpoints() {
     alert("Enter the amount from our rate sheet corresponding to the Interest Rate selected.   Discount points are a percentage of the loan - 1 point equals 1% - and give borrowers the option to obtain a lower interest rate by paying upfront.  An Origination Point or Fee, 1% of the mortgage amount, is not discount points but a charge to cover costs associated with taking and processing an application.   We do not change any Origination; our cost for each service is itemized separately .")
}

     function HELPappraisal() {
     alert("The Credit Union will order appraisal from an approved State Licensed independent fee appriasal to determine value and property acceptability.   The normal fee ranges from $275 to $350 depending on the nature of the property and research necessary.")
}

function RESETappraisal() {
     document.CostsForm.Appraisal.value = 300;
}

     function HELPcredit() {
     alert("The Credit Union will not normally order a Credit Report since most applications are approved employing automated underwriting systems with merged Credit Reports as part of that charge.   However, there might be circumstances, such as conflicting Credit Report information, that a 'Full Factual Investigation Credit Report' becomes necessary.  That charge is currently $55")
}

function RESETcredit() {
     document.CostsForm.Credit.value = 0;
}

      function HELPtaxsvc() {
     alert("The Tax Service Fee provides the Lender, through a 'tracking company', to automate payment of property tax bills with each county's tax collector.  This is a one-time, life of loan fee paid by the borrower at closing.")
}

function RESETtaxsvc() {
     document.CostsForm.TaxSvc.value = 0;
}

     function HELPprocessing() {
     alert("This is a charge to offset costs associated with processing the application.  This would be traditionally assessed as an 'Origination Fee' or 'Origination Point' which is 1% of loan amount by some lenders.")
}

function RESETprocess() {
     document.CostsForm.Process.value = 100;
}

     function HELPunderwriting() {
     alert("This is a charge to offset costs associated with underwriting the application and the application of expert automated decision systems which also includes credit report merging and scoring analysis")
}

function RESETunderwriting() {
     document.CostsForm.UW.value = 590;
}

     function HELPwire() {
     alert("This is a charge to offset the initial expenses associated with the mortgage application.")
}

function RESETwire() {
     document.CostsForm.Wire.value = 100;
}

function HELPdocs() {
      alert("This is a charge associated with the document preparation provider to furnish the mortgage closing forms package.")
}

function RESETdocs() {
     document.CostsForm.Docs.value = 250;
}

     function HELPcourier() {
     alert("This is a charge associated with the document preparation provider's delivery expenses in furnishing the mortgage closing forms package to the Lender and Title Company.")
}

function RESETcourier() {
     document.CostsForm.Courier.value = 0;
}

     function HELPflood() {
     alert("This is a charge associated with the flood zone determination company for 'life of loan' tracking for you and the lender if the property's FEMA Flood Zone changes and flood risk insurance would be required.")
}

function RESETflood() {
     document.CostsForm.Flood.value = 0;
}

     function HELPprepaidinterest() {
     alert("All mortgage payments are due the 1st of the month and include interest from the previous month within each payment.  Unless you settle on the last day of the month there will be an adjustment for the days remaining in the month of closing with your first FULL payment due the 1st of the second month following closing.   For example, if you close on the 28th of a 31 day month; enter days as 4 -- 28th, 29th, 30th & 31st.")
}

     function HELPhazardescmths() {
     if(document.CostsForm.refiMA.value > 0) {     
     alert("Since you are refinancing - you can enter the number of months in the 'Months Escrowed' since your $" + document.CostsForm.Hazard.value + " homeowners insurance premium was last paid.")}
else{
     alert("Since you are purchasing - and  in addition to paying for the first year's homeowner's insurance, 2 months are being escrowed so that with the mortgage payments you will make over the next 10 months sufficient funds will be available to pay the $" + document.CostsForm.Hazard.value  + " renewal premium.")}
}

     function explainTaxmonths() {
     var firstPay = (document.CostsForm.taxMths.value - 2);
     var numPay = 12 - firstPay;
     var escPay = document.CostsForm.taxMths.value;

     switch (firstPay) {
     case 1 :
          displayMonth = "January"
          break
      case 2 :
          displayMonth = "February"
          break
      case 3 :
          displayMonth = "March"
          break
      case 4 :
          displayMonth = "April"
          break
      case 5 :
          displayMonth = "May"
          break
      case 6 :
          displayMonth = "June"
          break
      case 7 :
          displayMonth = "July"
          break
      case 8 :
          displayMonth = "August"
          break
      case 9 :
          displayMonth = "September"
          break
      case 10 :
          displayMonth = "October"
          break
      case 11 :
          displayMonth = "November"
          break
       case 12:
          displayMonth = "December"
          break	
}	
    
	 if(document.CostsForm.Balance.value > 0) {      
      	alert("Assuming the first monthy payment is due " + displayMonth + " 1st, you will make " + numPay + " payments before property taxes will be paid in November." + "   " + "Allowing a 2 month 'cushion' for any increase from last year's amount paid to the County, the " + escPay + " months are estimated to be collected at closing.")
}
else {
	alert("This is a purchase and you will receive a 'Credit' from the Sellers for the number of months they owned the home during the tax year ending December.  Your cost towards escrowing taxes is the 2 month 'cushion' authorized by law to allow for increase since taxes were last paid by the Sellers.") }
}

     function explainIntangible() {
     if(!document.CostsForm.MA.value) {
     alert("Please calculate a Mortgage Amount above") }
     var intangible = parseInt(document.CostsForm.MA.value * .002)
     alert("Florida's Intangible tax is the amount assessed other Lenders (paid by borrower at closing) when the mortgage is recorded." + " " + " " + "Credit Unions, as non-profit financial organizations, are exempt which saves you $" + intangible + " " + "at the settlment of your " + "$" + document.CostsForm.MA.value + " " + "mortgage.")
     document.CostsForm.Intangible.value = "NONE"
}
     function HELPrecording() {
     alert("This is a charge for recording the mortgage, deed and assignment which varies slightly among Counties depending on their per page and per signature fees")
}

function RESETrecording() {
     document.CostsForm.Recording.value = 125;
}

     function HELPtermite() {
     alert("In Purchase Transactions either the Realtor or Title Company will order the 'Termite Inspection' which per the sale contract is traditionally a Buyer's expense.  In Refinance Transactions the inspection is obtained by the Borrower.   However, in some situations a report is not required.")
}

     function HELPsurvey() {
     alert("In Purchase Transactions either the Realtor or Title Company will order the Survey from a state licensed surveyor.  The survey is an 'on ground' representation of the legal description and clearly shows any setback violations or encroachments that must be covered by Title Insurance as exceptions in order for the property to be acceptable to a lender.  If Refinancing, and you have not added any structures to the property or made structural enlargements to the home since the last survey was done, the old survey might be acceptable and a new Survey not necessary.") 
}

     function summarycosts() {
	var points = parseInt(document.CostsForm.PT.value);
	var appraisal = parseInt(document.CostsForm.Appraisal.value);
	var credit = parseInt(document.CostsForm.Credit.value);
	var taxsvc = parseInt(document.CostsForm.TaxSvc.value);
	var process = parseInt(document.CostsForm.Process.value);
	var uw = parseInt(document.CostsForm.UW.value);
	var wire = parseInt(document.CostsForm.Wire.value);
	var docs = parseInt(document.CostsForm.Docs.value);
	var courier = parseInt(document.CostsForm.Courier.value);
	var flood = parseInt(document.CostsForm.Flood.value);
	var title = parseInt(document.CostsForm.Title.value);
	var stamps = parseInt(document.CostsForm.MtgeStamps.value);
	var termite = parseInt(document.CostsForm.Termite.value);
	var survey = parseInt(document.CostsForm.Survey.value);
	var recording = parseInt(document.CostsForm.Recording.value) 
	var transfer = parseInt(document.CostsForm.Transfer.value) 
		
	alert("CLOSING COSTS:  Loan Discount Points: $" + points + ", Appraisal: $" + appraisal + ", Credit Report: $" + credit + ", Tax Service: $" + taxsvc + ", Processing: $" + process + ", Underwriting: $" + uw + ", Application fee: $" + wire + ", Document Preparation: $" + docs + ", Courier: $" + courier + ", Flood Zone Determination: $" + flood + ", Title Company Charges: $" + title + ", Transfer Tax on Deed: $" + transfer + ", Recording: $" + recording + ", Intangible Tax: NONE" + ", Mortgage Stamps: $" + stamps +   ", Pest Inspection: $" + termite + ", and Survey: $" + survey)		
}

	 function summaryescrow() {
	var hazard = parseInt(document.CostsForm.Hazard.value);
	var interest = parseInt(document.CostsForm.Interest.value); 	
	var hazardesc = parseInt(document.CostsForm.hazardEsc.value); 
	var taxesc = parseInt(document.CostsForm.taxEsc.value); 
		if(document.CostsForm.refiMA.value > 0) {
	alert("PREPAID INTEREST & ESCROW COSTS:  Prepaid Interest: $" + interest + ",  Escrow Account Deposit for Homeowners Insurance: $" + hazardesc +  ", and Escrow Account Deposit for Real Estate Taxes: $" + taxesc) }
else {
	alert("PREPAID INTEREST & ESCROW COSTS:  Prepaid Interest: $" + interest + ", first year's Home Owners Insurance: $" + hazard + ",  Escrow Account Deposit for Homeowners Insurance: $" + hazardesc +  ", and Escrow Account Deposit for Real Estate Taxes: $" + taxesc)
}
}

// stop the hiding -->