480) { $nn = 480; } if (empty ($amount) ) // no amount came in { $amount = ""; //$amount = $_REQUEST['amount'] ; if (empty ($loan_choice)) { $loan_choice = "empty"; } missing_fields ($amount, $loan_choice, $nn); return; } if (empty ($loan_choice)) // if we get this far, amount has been inputted. { $loan_choice = "empty"; } if ( $loan_choice == "empty") // amount is OK no rate came in { missing_fields ($amount, $loan_choice, $nn); return; } //$nn = $_REQUEST['term']; $numerator = $loan_choice/1200; $summary = $_REQUEST['summary']; $denominator = 1 - ( pow((1 + $numerator), -$nn)) ; $payment = $amount * $numerator /$denominator; $total_interest = ($payment * $nn) - $amount; $temp = 1; $money = 1; $format = 1; $new = 1; include ("banner_goog_custom.inc"); echo"


Thank you for using "; if ($state == "National") { echo "the Loanlane mortgage calculator. "; } else { echo "$state's favorite mortgage calculator. "; } echo " Your mortgage payment information appears below. If you'd like to run another payment, scroll down for the payment calculator. For convenience, your payment information will be listed in a summary table below.

This Market is Unpredictable ... Click Here for Loanlane's Market Commentary.
"; echo "


"; //echo ""; echo ""; echo "
"; echo ""; echo ""; echo ""; echo ""; echo "
Payment Information Life of Loan Totals
"; echo ""; // begin embedded table echo ""; //cell 1 embedded echo ""; echo ""; echo ""; //new embeded row echo ""; //cell 1 embedded echo ""; echo ""; echo "
"; echo "Years:     "; //cell 2 embedded echo $nn/12; echo "    Amount:"; //cell 3 embedded echo "    "; //cell 4 embedded // make this a function ... $money = 1; $format = 1; $new = 1; //$money = $amount; // $format = sprintf ("$%7.2f", $money); //put it into a string //$format = number_format($money, 2, '.', ','); //format the number //$format = sprintf ("%s", $format); //put it into a string // $new = str_pad($format, 14 , " ",STR_PAD_LEFT); //insert number of spaces routine too ... // $amount = sprintf ("$%s", $new); //echo $amount; echo "$ "; $temp = number_format($amount, 2, '.', ','); //format the number echo $temp ; echo "
Rate:        "; //cell 2 embedded $temp = number_format($numerator*1200, 3, '.', ','); //format the number echo $temp ; echo "%    Payment:"; //cell 3 embedded echo "    "; //cell 4 embedded $money = $payment; $format = sprintf ("$%7.2f", $money); //put it into a string $format = number_format($money, 2, '.', ','); //format the number $format = sprintf ("%s", $format); //put it into a string $new = str_pad($format, 14 , " ",STR_PAD_LEFT); //insert number of spaces routine too ... $payment = sprintf ("$%s", $new); echo $payment; echo "
"; //end embedded table echo "
"; //$amount = $_REQUEST['amount'] ; ?> Sample Image "; echo "
"; echo ""; echo ""; ?>
Applying for your mortgage through Loanlane is as easy as using this calculator. You can view costs, submit a secure (encrypted) application, get pre-approved and lock in your rate - all from your keyboard."; } if ($state == "California") { echo " Loanlane serves all of $state.

Click here to apply now!
"; } if ($state != "California" && $state != "National") { echo " Due to licensing restrictions, Loanlane does not serve $state. However, you can get quotes from up to four $state lenders.

Click here for $state quotes now!
"; } echo "

"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $hint_amount = $amount; //echo $hint_amount; //echo "
"; $hint_rate = $loan_choice; //echo $hint_rate; //echo "
"; $hint_numerator = $hint_rate/1200; //echo $hint_numerator; //echo "
"; $hint_n = null; $years_saved = 10; // here in case none of the below apply ... a default if ($nn == 480) { $years_saved = 10; $hint_n = 360; } if ($nn == 360) { $years_saved = 10; $hint_n = 240; } if ($nn == 240) { $years_saved = 5; $hint_n = 180; } if ($nn == 180) { $years_saved = 5; $hint_n = 120; } if ($nn == 120) { $years_saved = 5; $hint_n = 60; } if ($nn >= 60) { $nn_sched = 60; } else { $nn_sched = nn; } $hint_denominator = null; $hint_payment = null; $pay_more_payment = null; $interest_savings = null; //$hint_denominator = 1 - ( pow((1 + $hint_rate), -$hint_n) ); $hint_denominator = 1 - ( pow((1 + $hint_numerator), -$hint_n) ); $hint_payment = $hint_amount * $hint_numerator/$hint_denominator ; $numerator = $loan_choice/1200; //$numerator = $_REQUEST['choice']/1200 ; $denominator = 1 - ( pow((1 + $numerator), -$nn)) ; //check this line, I put in numerator $payment = $amount * $numerator /$denominator; $pay_more_payment = $hint_payment - $payment ; $hint_total_interest = ($hint_payment * $hint_n) - $hint_amount; $interest_savings = $total_interest - $hint_total_interest; echo ""; echo "

Many loans have no prepayment penalty and prepaying a loan can provide tremendous savings. For example, if you were to "; echo "prepay a mortgage such as this by $"; //$temp = $payment; //echo ($hint_payment - $payment); $temp = $hint_payment - $payment; $money = $temp; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo " per month, you would reduce the loan term from "; echo $nn/12; echo " to "; echo $nn/12 - $years_saved; echo " years "; echo "and save $"; $temp = $interest_savings; $money = $temp; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo " in mortgage interest."; /* echo " "; echo "" ); echo "Click here to see your annual interest totals. If you like this calculator click here to tell a friend.
"; echo "
"; */ echo "

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo ""; echo "
"; // begin lower half ............................................................................................. //$amount = $_REQUEST['amount'] ; echo "
"; echo "
"; //begin displaying the summary echo ""; echo ""; echo $summary; echo ""; echo ""; echo " "; echo "
Your Payment Summary
"; $money = $amount; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo ""; echo $nn/12; echo " years "; $money = $numerator; $format = number_format($numerator*1200, 3, '.', ','); //format the number echo $format ; echo "%"; $money = $payment; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo "

"; echo "

"; echo "

"; //echo "


Other Loanlane Mortgage Calculators:

"; //echo "Interest Only Calculator
See how your payment would look if selecting an interest-only option.

"; //echo "Amortizer
Watch the path to complete ownership, and the benefit of making extra payments.

"; echo "

"; echo "
"; $url = "http://rss.news.yahoo.com/rss/realestate"; $displayname = "Mortgage and Real Estate News:
"; $number = 4; include ("rss_get_for_calc.php"); echo "


Make ".$state." Lenders Compete for Your Business!

Lenders want loans, and they compete "; if ($city != "(null)") { echo "for customers in ".$city." and nearby cities. Why not take them for a test drive? "; } else { echo "for customers. Why not take them for a test drive?"; } echo "Home improvement, debt consolidation, refinancing ... learn how to get them to show you their best offer. It's private and secure. No cost and no obligation, and you're in the driver's seat!"; if ($state != "California") { echo" Get up to four quotes here"; echo "


"; } else { echo" Get up to four quotes here!"; } echo " "; //if ($city != "(null)") if ($city != "your city ") // meaning we have an actual city { $shortstate = $geo[1]; $city = str_replace(" ", "+", $city); // this takes out the space, and inserts a plus sign $state = str_replace(" ", "+", $state); // this takes out the space, and inserts a plus sign $url = "http://search.news.yahoo.com/usns/ynsearch/categories/47/index.html?p="; $url = $url.$city; $url = $url."+"; $url = $url.$state; $url = $url."+real&c=&fr="; //echo "

"; //$displayname = "Area News and Information
"; //$number = 3; //include 'rss_get_area_news.php'; $url = "http://www.rssweather.com/rss.php?pands="; $url = $url.$city; $url = $url."%2C+"; $url = $url.$shortstate; $url = $url."&submit=GO"; //echo "

"; //$displayname = "Area Weather
"; //$number = 1; //include 'rss_get_weather.php'; //echo $url; //echo $city; echo "


Thank You for Making Loanlane America's Favorite Mortgage Site

"; include ("maxmind_temp2.php"); } echo "

Click Here for Loanlane's Market Commentary
"; echo"
"; echo "


"; //end displaying the summary echo "
"; echo "
"; echo "
"; echo ""; echo ""; echo ""; if ($nn == 480) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 360) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 240) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 180) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 120) { echo ""; echo ""; echo ""; echo ""; } echo ""; //%%%%% added a > echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if (strlen($summary) >= 1024) // this limits the size of the summary table { $summary = ""; } // the following chunk hides the sumary field echo "\""; // this is the closing " for the hidden summary! // ............................................ echo ""; echo ""; echo ""; //AmazonForCalcRoutine (cache); echo "
Calculate Another Payment

Select a term, enter a loan amount, and select a rate.
 40 Years  30 Years  20 Years  15 Years 
 40 Years  30 Years  20 Years  15 Years 
 40 Years  30 Years  20 Years  15 Years 
 40 Years  30 Years  20 Years  15 Years 
 30 Years  20 Years  15 Years  10 Years 


Enter loan amount $  

 
3.0004.0005.0006.000
3.1254.1255.1256.125
3.2504.2505.2506.250
3.3754.3755.3756.375
3.5004.5005.5006.500
3.6254.6255.6256.625
3.7504.7505.7506.750
3.8754.8755.8756.875
"; echo "
Amount TermRate Payment
"; //sprintf(temp, "%d", (int) loan_amount); //$money = $amount; //$format = number_format($money, 2, '.', ','); //format the number $money = $amount; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo ""; echo $nn/12; echo " years "; //$numerator = number_format($numerator*1200, 3, '.', ','); //format the number $money = $numerator; $format = number_format($numerator*1200, 3, '.', ','); //format the number echo $format ; echo "%"; //sprintf(temp, "%0.2f", payment); //$money = $payment; //$format = number_format($money, 2, '.', ','); $money = $payment; $format = number_format($money, 2, '.', ','); //format the number echo $format; echo "
Enter a rate below if none of the above apply
Enter a Rate
"; //if ($state == "California") //{ echo ""; //brett //} echo "
"; echo "
"; echo "


"; include ("footer.inc"); ?> "; $turn_off_hilight = ""; } $turn_on_rate_hilight = null; if ($loan_choice == "") { $turn_on_rate_hilight = ""; } header( "Expires: Mon, 20 Dec 1998 01:00:00 GMT" ); header( "Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); echo ""; echo "Mortgage Calculator"; include ("keywords.inc"); echo" "; echo ""; include ('banner_goog_custom.inc') ; echo "

Mortgage Calculator

"; echo ""; /* echo " */ if ($nn == 480) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 360) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 240) { echo ""; echo ""; echo ""; echo ""; } if ($nn == 180) { echo ""; echo ""; echo ""; echo " "; } if ($nn == 120) { echo ""; echo ""; echo ""; echo ""; } echo ""; echo ""; if ($loan_choice == "empty") { echo ""; } include ('calc_buttons2.inc'); echo "\"

Select a term, "; echo "enter a loan amount "; echo "then press a mortgage
rate button. Other rate options can be input at the bottom of this form.
40 Years 30 Years 20 Years 15 Years
 40 Years  20 Years  15 Years  10 Years 
 40 Years  30 Years  20 Years  15 Years 
 40 Years  30 Years  20 Years  15 Years 
 40 Years  30 Years  20 Years  15 Years
 30 Years  20 Years  15 Years  10 Years 
"; if ($loan_choice != "empty") // rebury it { echo "
To continue calculating your payment at "; echo $loan_choice; echo "%
"; } echo "
"; echo $turn_on_amount_hilight; echo "Enter a loan amount $ " ; echo $turn_off_hilight; echo "


Select a Rate From Below



Enter a rate below if none of the above apply
Enter a Rate
Amount TermRatePayment



"; include ('footer.inc') ; echo " "; } ?>