Deprecated: Assigning the return value of new by reference is deprecated in /home/hpti08cs/public_html/wp-includes/cache.php on line 99

Deprecated: Assigning the return value of new by reference is deprecated in /home/hpti08cs/public_html/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/hpti08cs/public_html/wp-includes/theme.php on line 576

Warning: Cannot modify header information - headers already sent by (output started at /home/hpti08cs/public_html/wp-includes/cache.php:99) in /home/hpti08cs/public_html/wp-includes/feed-rss2.php on line 8
Calculators-Free.com http://calculators-free.com Free Calculators with Creative Commons Attribution Licensing Wed, 09 Jul 2008 22:22:10 +0000 http://wordpress.org/?v=2.5.1 en Smoking Calculator http://calculators-free.com/smoking-calculator-13 http://calculators-free.com/smoking-calculator-13#comments Wed, 09 Jul 2008 22:22:10 +0000 admin http://calculators-free.com/?p=13

Introduction | Demonstration Calculator | Source Code


How The Smoking Calculator Works

This calculator takes the number of years you smoked, average number of cigarettes you smoked a day, and the current price for a pack of cigarettes and delivers a few figures:

  • Number of cigarettes you smoked in that period.
  • How much all those cigarettes would cost today.
  • How much the tobacco in those cigarettes weighed (based on 0.68 grams per cigarette).

The results can be pretty surprising. I smoked around 3/4 of a pack a day for 23 years. That turned out to be over 126,000 cigarettes, costing more than $37,000 and with tobacco weighing in at over 188 pounds. I smoked a grown man’s weight in tobacco.

Introduction | Demonstration Calculator | Source Code

Demonstration Calculator


Number of years you smoked:

Average number of cigarettes you smoked each day:

Average price for a pack of cigarettes in your area (in dollars)

Introduction | Demonstration Calculator | Source Code


Smoking Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.



<script type="text/javascript">
function calcSmokes(){

// GET VALUES FROM FORM, SET VALUE TO ONE IF THE VALUE IN THE FORM IS NOT A NUMBER

var years = (isNaN(document.wcbubba.years.value)) ? 1 : document.wcbubba.years.value;
var smokes = (isNaN(document.wcbubba.smokes.value)) ? 1 : document.wcbubba.smokes.value;
var price = (isNaN(document.wcbubba.price.value)) ? 1 : document.wcbubba.price.value;

// DO CALCULATION OF NUMBER OF CIGARETTES SMOKED ROUNDED TO WHOLE NUMBER

var smoked = parseInt(years * 365.25 * smokes);

// CALCULATE TODAY'S VALUE OF ALL CIGS ROUNDED TO TWO DECIMAL PLACES

var expense = parseInt(((smoked/20) * price) *100) / 100;

// CALCULATE WEIGHT OF TOBACCO IN GRAMS AND POUNDS TO TWO DECIMAL PLACES

var weight = parseInt((smoked * 0.68) *100) / 100;
var pounds = parseInt(((weight/1000) * 2.204) * 100) / 100;

var expout = 'You smoked approximately ' + smoked + ' cigarettes.<br>At current prices, that would cost $' + expense + '.<br>And the weight of the tobacco in all those cigarettes was ' + pounds + ' pounds (' + weight +' grams).';

document.getElementById('totals').innerHTML = expout;
}
</script>

<form name="wcbubba" action="javascript:void();">
Number of years you smoked:<br>
<input type="text" size="5" name="years"><br><br>
Average number of cigarettes you smoked each day:<br>
<input type="text" size="5" name="smokes"><br><br>
Average price for a pack of cigarettes in your area (in dollars)<br>
<input type="text" size="5" name="price"><br><br>
<input type="submit" value="Show My Totals" onclick="calcSmokes()"></form><br>

<div id="totals"></div>

]]>
http://calculators-free.com/smoking-calculator-13/feed
Auto Loan Payment Calculator with Amortization http://calculators-free.com/auto-loan-payment-calculator-with-amortization-12 http://calculators-free.com/auto-loan-payment-calculator-with-amortization-12#comments Thu, 03 Jul 2008 23:01:14 +0000 admin http://calculators-free.com/?p=12

Introduction | Demonstration Calculator | Source Code


How The Auto Loan Payment with Amortization Works


This calculator uses the same mathematical functions as our Simple Auto Loan Calculator, but iterates through each payment, calculating the interest and principal amounts for each payment as you pay off the loan.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator



Loan Amount:
Loan Term: months
APR Interest:

Payment:

Introduction | Demonstration Calculator | Source Code


Auto Loan Payment with Amortization Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.


<script type="text/javascript">

var amortsub = false;

function calcLoan() {

var formvals = getFormVal();

var years = formvals[0];
var months = years;

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

if (amortsub) showAm();

}

function showAm(){

amortsub = true;

formvals = getFormVal();

var years = formvals[0];
var months = years;

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

// NOW WE CALCULATE THE AMORTIZATION

var intpaid = 0;
var princpaid = 0;
var factsout = "";
var inyear = 0;
var inmonth = 0;

document.getElementById('amortsub').innerHTML = '<b style="font-size:19px;">MONTHLY AMORTIZATION</b><br><br>';

for(var i=0;i<months;i++){
intpaid = Math.round((mpr * loan) *100)/100;
princpaid = Math.round((reducto - intpaid)*100)/100;
loan = Math.round((loan - princpaid)*100)/100;

inyear = parseInt(i/12);
inmonth = i - (inyear * 12);

factsout += '<b>Year ' + (inyear + 1) + ' Month ' + (inmonth +1) + ':</b><br>   Principal Paid: $' + princpaid + '<br>   Interest Paid: $' + intpaid + '<br>   Principal Remaining: $' + loan + '<br>';

}
document.getElementById('amortsub').innerHTML += factsout;

flush();

}

function getFormVal(){

var years = parseInt(document.wcbubba.term.value);
var loan = parseInt(document.wcbubba.loan.value);
var apr = parseFloat(document.wcbubba.apr.value);

if((years <= 0)||(isNaN(years))) years = 1;
if((apr <= 0)||(isNaN(apr))) apr = 1;
if((loan <= 0)||(isNaN(loan))) loan = 1;

var mike = new Array(years,apr,loan);

return mike;
}

</script>

<form id="wcbubba" name="wcbubba" action="javascript:void();">
Loan Amount: <input type=text name="loan" size=8><br>
Loan Term: <input type=text name="term" size=8> months<br>
APR Interest: <input type=text name="apr" size=8><br><ber>

<input type="submit" value="Calculate Payment" onClick="calcLoan();"> <b>Payment:</b> <input type=text name = "payment" size=9><br>
<input type="submit" value="Show Amortization" onClick="showAm();">
</form><br><br>

<div id="amortsub">

</div> 
]]>
http://calculators-free.com/auto-loan-payment-calculator-with-amortization-12/feed
Mortgage Calculator With Amortization http://calculators-free.com/mortgage-calculator-with-amortization-11 http://calculators-free.com/mortgage-calculator-with-amortization-11#comments Thu, 03 Jul 2008 22:27:22 +0000 admin http://calculators-free.com/?p=11

Introduction | Demonstration Calculator | Source Code


How The Mortgage Calculator with Amortization Works

This calculator uses the same mathematical functions as our Simple Mortgage Payment Calculator, but creates a loop, going through all the months and calculating the interest to principal ratios for each payment as you pay down the principal each month.

The amortization display is very simple. The output for each month is generated by one line of code…


factsout += '<b>Year ' + (inyear + 1) + ' Month ' + (inmonth +1) + ':</b><br>   Principal Paid: $' + princpaid + '<br>   Interest Paid: $' + intpaid + '<br>   Principal Remaining: $' + loan + '<br>';

If you’re familiar with HTML and just have a basic knowledge of JavaScript, you can edit that to add all sorts of formatting goodness to your output.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator



Loan Amount:
Loan Term: years
APR Interest:

Payment:

Introduction | Demonstration Calculator | Source Code


Mortgage Calculator with Amortization Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.



<script type="text/javascript">

var amortsub = false;

function calcLoan() {

var formvals = getFormVal();

var years = formvals[0];
var months = years * 12;

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

if (amortsub) showAm();

}

function showAm(){

amortsub = true;

formvals = getFormVal();

var years = formvals[0];
var months = years * 12;

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

// NOW WE CALCULATE THE AMORTIZATION

var intpaid = 0;
var princpaid = 0;
var factsout = "";
var inyear = 0;
var inmonth = 0;

document.getElementById('amortsub').innerHTML = '<b style="font-size:19px;">MONTHLY AMORTIZATION</b><br><br>';

for(var i=0;i<months;i++){
intpaid = Math.round((mpr * loan) *100)/100;
princpaid = Math.round((reducto - intpaid)*100)/100;
loan = Math.round((loan - princpaid)*100)/100;

inyear = parseInt(i/12);
inmonth = i - (inyear * 12);

factsout += '<b>Year ' + (inyear + 1) + ' Month ' + (inmonth +1) + ':</b><br>   Principal Paid: $' + princpaid + '<br>   Interest Paid: $' + intpaid + '<br>   Principal Remaining: $' + loan + '<br>';

}
document.getElementById('amortsub').innerHTML += factsout;

flush();

}

function getFormVal(){

var years = parseInt(document.wcbubba.term.value);
var loan = parseInt(document.wcbubba.loan.value);
var apr = parseFloat(document.wcbubba.apr.value);

if((years <= 0)||(isNaN(years))) years = 1;
if((apr <= 0)||(isNaN(apr))) apr = 1;
if((loan <= 0)||(isNaN(loan))) loan = 1;

var mike = new Array(years,apr,loan);

return mike;
}

</script>

<form id="wcbubba" name="wcbubba" action="javascript:void();">
Loan Amount: <input type=text name="loan" size=8><br>
Loan Term: <input type=text name="term" size=8> years<br>
APR Interest: <input type=text name="apr" size=8><br><ber>

<input type="submit" value="Calculate Payment" onClick="calcLoan();"> <b>Payment:</b> <input type=text name = "payment" size=9><br>
<input type="submit" value="Show Amortization" onClick="showAm();">
</form><br><br>

<div id="amortsub">

</div> 
]]>
http://calculators-free.com/mortgage-calculator-with-amortization-11/feed
Body Mass Index (BMI) Calculator http://calculators-free.com/body-mass-index-bmi-calculator-10 http://calculators-free.com/body-mass-index-bmi-calculator-10#comments Fri, 27 Jun 2008 21:02:55 +0000 admin http://calculators-free.com/?p=10

Introduction | Demonstration Calculator | Source Code


How The Body Mass Index (BMI) Calculator Works

Body Mass Index (BMI) is a general indicator of whether or not you are maintaining a healthy weight based on the ratio of your weight to your height. It’s an imperfect scale as it doesnt account for differences in body types. For example, a 5 foot 9 inch bodybuilder who weighs 215 pounds and has a 6% body fat would be labeled obese. And there is already a new scale just for people from Southeast Asia where the ranges are lowered.

While it can be a good indicator of the healthiness of your weight if you fall within certain statistical norms that were used to develop it, it should be taken with a significant grain of salt and should not be used as a substitute for a professional evaluation of your health by a doctor.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator


Weight:

Height:

Your BMI is:

Introduction | Demonstration Calculator | Source Code


Body Mass Index (BMI) Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.

<script type="text/javascript">

function calcBMI(){

// Get Variables and validate to make sure they're numbers, 
// setting them to a value of 1 if they're not.

var weight = (isNaN(document.wcbubba.weight.value)) ? 1 : document.wcbubba.weight.value;

if (weight == 0) alert("Results will be inaccurate.  Weight is not a valid number.");

var height = (isNaN(document.wcbubba.height.value)) ? 1 : document.wcbubba.height.value;

if (height == 0) alert("Results will be inaccurate.  Height is not a valid number.");

// set multipliers based on whether metric or English units were selected

var wmult = (document.wcbubba.units.value == "pounds") ? 2.204 : 1;

// Turns inches/centimeters into meters

var hmult = (document.wcbubba.hunits.value == "inches") ? .0254 : .01;

// Do the calculation (weight in kg divided by the height in meters 
// times itself). The multiplication by 10 and then division by ten
// work in conjunction with Math.round() to round the value to one
// decimal place of precision.

var BMI = Math.round(((weight / wmult)/((height * hmult)*(height * hmult))) *10)/10;

// get the analysis - note this is for general purpose, there is a separate scale for
// Southeast Asian people and there may be more variants on the way

var result = "";
if(BMI < 16.5) result = "severely underweight";
else if((BMI >=16.5)&&(BMI<=18.49)) result = "underweight";
else if((BMI >=18.5)&&(BMI<=25)) result = "normal";
else if((BMI >=25.01)&&(BMI<=30)) result = "overweight";
else if((BMI >=30.01)&&(BMI<=35)) result = "obese";
else if((BMI >=35.01)&&(BMI<=40)) result = "clinically obese";
else result = "morbidly obese";

document.getElementById('results').innerHTML = "Your Body Mass Index (BMI) is: " + BMI + ".<br><br>This would be considered " + result + ".";

}
</script>

<form name="wcbubba" id="wcbubba" action="javascript:void()">
Weight:<br> <input type=text name="weight" size="6"> <select name="units"><option value="pounds">pounds<option value="kilos">kg</select><br><br>

Height:<br> <input type=text name="height" size="6"> <select name="hunits"><option value="inches">inches<option value="cm">cm</select><br><br>

<input type="submit" value="Calculate My BMI" onClick="calcBMI();"></form><br>

<div id="results" style="border:1px solid #000;padding:4px;font-size:15px;font-weight:bold;width:400px;">
Your BMI is:<br><br>
</div>

]]>
http://calculators-free.com/body-mass-index-bmi-calculator-10/feed
BMR And Daily Calories Burned Calculator http://calculators-free.com/bmr-and-daily-calories-burned-calculator-9 http://calculators-free.com/bmr-and-daily-calories-burned-calculator-9#comments Fri, 27 Jun 2008 18:20:06 +0000 admin http://calculators-free.com/?p=9

Introduction | Demonstration Calculator | Source Code


How The BMR & Daily Calories Burned Calculator Works

How many calories do you need to eat in a day to maintain your current weight? That’s different for each and every individual. The only way to get a highly accurate number is a lab test where you sleep at the lab and they take measurements right as you wake up from 8 hours of sleep and at least 12 hours of fasting.

This calculator uses the formula for Basal Metabolic Rate (BMR) devised by doctors at the University of Nevada Medical School and published in the American Journal of Clinical Nutrition in 1990, then uses the Harris Benedict activity multiplier to determine your estimated daily caloric burn off.

Remember that the Basal Metabolic Rate is how many calories you’d need to maintain your body weight if all you did all day was lay in bed and your only activity was eating. Just sitting up and typing a a few hours a day, walking from the couch to your car, from the car to your office, etc. boosts your daily needs up by 20%. If you lead a lifestyle where you have high levels of exertion every day, it can nearly double your calorie needs.

Just fill out the fields in the form below and click “calculate my calorie needs” to get your BMR and your daily calorie needs.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator


Weight:

Age:
(in years)

Gender:

Height:

Activity Level:

Your Basal Metabolic Rate is:

Your Average Daily Calorie Need is:

Introduction | Demonstration Calculator | Source Code


Daily Calorie Needs Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.



<script type="text/javascript">

function calcNeeds(){

var weight = (isNaN(document.wcbubba.weight.value)) ? 0 : document.wcbubba.weight.value;
if (weight == 0) alert("Results will be inaccurate.  Weight is not a valid number.");
var height = (isNaN(document.wcbubba.height.value)) ? 0 : document.wcbubba.height.value;
if (height == 0) alert("Results will be inaccurate.  Height is not a valid number.");
var age = (isNaN(document.wcbubba.height.value)) ? 0 : document.wcbubba.age.value;
if (age == 0) alert("Results will be inaccurate.  Age is not a valid number.");
var activity = (isNaN(document.wcbubba.activity.value)) ? 0 : document.wcbubba.activity.value;

var wmult = (document.wcbubba.units.value == "pounds") ? 2.204 : 1;
var hmult = (document.wcbubba.hunits.value == "inches") ? 2.54 : 1;
var genvar = (document.wcbubba.gender.value == "male") ? 5 : -161;

var BMR = Math.round((((weight / wmult) * 9.99) + ((height * hmult) * 6.25) - (age * 4.92) + genvar) * 1);

var calburn = Math.round((((weight / wmult) * 9.99) + ((height * hmult) * 6.25) - (age * 4.92) + genvar) * activity);

document.getElementById('results').innerHTML = "Your Basal Metabolic Rate is: " + BMR + " calories.<br><br>Your Average Daily Calorie Need Is: " + calburn + " calories";

}
</script>

<form name="wcbubba" id="wcbubba" action="javascript:void()">
Weight:<br> <input type=text name="weight" size="6"> <select name="units"><option value="pounds">pounds<option value="kilos">kg</select><br><br>
Age:<br><input type=text name="age" size="6"> (in years)<br><br>
Gender:<br><select name="gender"><option value="male">male<option value="female">female</select><br><br>
Height:<br> <input type=text name="height" size="6"> <select name="hunits"><option value="inches">inches<option value="cm">cm</select><br><br>
Activity Level:<br> <select name="activity">
<option value="1.2">Little or no exercise and desk job
<option value="1.375">Lightly strenuous exercise or casual sports 1-3 days a week
<option value="1.55">Moderately strenuous exercise or somewhat aggressive sports 3-5 days a week
<option value="1.725">Strenuous exercise or aggressive sports 6-7 days a week
<option value="1.9">Strenuous daily exercise or aggressive sports and a physically active job</select><br><br>
<input type="submit" value="Calculate My Calorie Needs" onClick="calcNeeds();"></form><br>
<div id="results" style="border:1px solid #000;padding:4px;font-size:15px;font-weight:bold;width:400px;">
Your Basal Metabolic Rate is:<br><br>
Your Average Daily Calorie Need is:
</div>

]]>
http://calculators-free.com/bmr-and-daily-calories-burned-calculator-9/feed
Fun Google Compatibility Calculator http://calculators-free.com/fungoogle-compatibility-calculator-8 http://calculators-free.com/fungoogle-compatibility-calculator-8#comments Fri, 27 Jun 2008 04:06:41 +0000 admin http://calculators-free.com/?p=8

Introduction | Demonstration Calculator | Source Code


How The Google Compatibility Calculator Works

Enter your name and the name of the person you want to be matched with into the appropriate boxes in the calculator, then click “Calculate Our Compatibility”. A client-side JavaScript uses AJAX to query Google for the number of search results that come up for each name at Google. It then uses those numbers to determine a compatibility score.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator

GOOGLE COMPATIBILITY CALCULATOR



Your Name:
Crush’s Name:

Introduction | Demonstration Calculator | Source Code


Fun Google Compatibility Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Download popucalc.zip. In it you will find the three graphics, PHP script for querying Google via their RESTful search API, an HTML file with the AJAX JavaScript and the search form, plus a README file with further instructions on getting it running.

Here are the two source files if you’d like to examine them.

JavaScript & HTML source code


<script type="text/javascript">

var firstval = "";
var secondval = "";
var firstdone = false;
var seconddone = false;
var offset=3;

function popucalc(){

document.getElementById('calcresults').innerHTML = '<b>Calculating</b><br /><img src="/images/pleasewait.gif">';

var firstname = escape(document.popcalc.firstname.value);
var getURL = 'popucalc.php?SP=' + firstname;
parseName(getURL,'first name');

var secondname = escape(document.popcalc.secondname.value);
getURL = 'popucalc.php?SP=' + secondname;
parseName(getURL,'second name');

}

function parseName(getURL,nameID)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }

//this is the part that processes the incoming data
    xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
        var myresults = xmlHttp.responseText; 
        parseResults(myresults,nameID);
      }
    }

//This is the part that sends it
  xmlHttp.open("get",getURL,true);
  xmlHttp.send(null);
  
  
  }
function parseResults(result,nameID){
  
    if(nameID == 'first name') {
       firstval = (isNaN(parseInt(result))) ? 0 : parseInt(result);
        firstdone = true;
       
          } else if (nameID == "second name"){
          secondval = (isNaN(parseInt(result))) ? 0 : parseInt(result);
          seconddone = true;
          }
 
     if((firstdone)&&(seconddone)) showresults(); 
 }
           
function showresults(){
     
     var topper;
     var bottomer;
     firstdone=false;
     seconddone=false;
     
     if(firstval > secondval){
          bottomer = firstval;
          topper = secondval;
          } else {
          topper = firstval;
          bottomer = secondval;
          }

     var popindex;
          
          if((topper == 0)||(bottomer==0)){
               popindex = 0;
               } else {
 
          var popindex = (topper/bottomer);
          popindex = Math.round(popindex*1000)/1000
               }
               
      var popcover = Math.round(200 - ((popindex * 190) + 10));
      var popamt = Math.round(popindex * 1000)/10;
      
     var resultspot = document.getElementById('calcresults');
     
     var resout = '<b>Matched: ' + popamt + '% </b><br>' + document.popcalc.firstname.value + ' and ' + document.popcalc.secondname.value + '<br>';
     
     resout += '<div style="width:210px;height:35px;padding:5px;border:1pt solid #222;font-size:12px;"><div style="width:100px;float:left;text-align:left">Cool</div><div style="width:100px;float:left;text-align:right">Scorching</div><br style="clear:all">';

     var quoter = "'/images/pcgradient.gif'";

     resout += '<div style="width:200px;height:20px;margin:0px;padding:0px; background:url('+quoter+');text-align:right;"><img src="/images/pcwhite.gif" height=20 width=' + popcover + ' style="margin:0px;padding:opx;border:none;" /></div></div><br /><br />';
     
     resultspot.innerHTML = resout;

   }
  
  
</script>

<div style="border:2px solid #222;margin:5px;padding:5px;width:350px;"><h3>GOOGLE COMPATIBILITY CALCULATOR</H3>
<form name="popcalc" action="javascript:void();">
Your Name: <input size=20 name="firstname" id="firstname" type=text> <br>
Crush's Name: <input size=20 name="secondname" id="secondname" type=text><br>
<input type="submit" value="Calculate Our Compatibility" onClick="popucalc()";>
</form>
<div id="calcresults" style="height:100px;"></div><br />
</div>


PHP source code


<?php

$searchphrase = $_REQUEST["SP"];

$searchphrase = str_replace(""","",$searchphrase);
$searchphrase = str_replace("%22","",$searchphrase);

$searchphrase=urlencode($searchphrase);

$booboo = passnum($searchphrase);

echo $booboo;

function passnum($searchphrase){

$url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=%22" . $searchphrase . "%22";

// sendRequest
// note how referer is set manually
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.mysite.com/index.html");
$body = curl_exec($ch);
curl_close($ch);

// now, process the JSON string
$json = json_decode($body, true);
// now have some fun with the results...

$sam = $json["responseData"]["cursor"]["estimatedResultCount"];

return $sam;
}

?>
]]>
http://calculators-free.com/fungoogle-compatibility-calculator-8/feed
Simple Auto Loan Calculator http://calculators-free.com/simple-auto-loan-calculator-7 http://calculators-free.com/simple-auto-loan-calculator-7#comments Thu, 26 Jun 2008 00:25:52 +0000 admin http://calculators-free.com/?p=7

Introduction | Demonstration Calculator | Source Code


How The Auto Loan Payment Calculator Works

This is a very simple calculator for calculating an auto loan payment. Enter in the amount of the loan, the number of months the loan is for, and the APR. Then click “Calculate Payment” to get your monthly auto loan payment.

If you change the values, click the “Calculate Payment” button again to get a new result.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator


Simple Auto Loan Calculator

Loan Amount:

Loan Term: months

APR Interest:

Payment:

Introduction | Demonstration Calculator | Source Code


Simple Auto Loan Payment Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.


<script type="text/javascript">
function calcLoan() {

var formvals = getFormVal();

var months = formvals[0];

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

if (amortsub) showAm();

}

function getFormVal(){

          var years = parseInt(document.wcbubba.term.value);
          var loan = parseInt(document.wcbubba.loan.value);
          var apr = parseFloat(document.wcbubba.apr.value);

          if((years <= 0)||(isNaN(years))) years = 1;
          if((apr <= 0)||(isNaN(apr))) apr = 1;
          if((loan <= 0)||(isNaN(loan))) loan = 1;

          var mike = new Array(years,apr,loan);

         return mike;
}
</script>

<form id="wcbubba" name="wcbubba" action="javascript:void();">

Loan Amount: <input type=text name="loan" size=8>

Loan Term: <input type=text name="term" size=8> months

APR Interest: <input type=text name="apr" size=8>

<br /><br />

<input type="submit" value="Calculate Payment" onClick="calcLoan();"> 

<br /><br />

<b>Payment:</b> <input type=text name = "payment" size=9><br>
</form></p>
]]>
http://calculators-free.com/simple-auto-loan-calculator-7/feed
Simple Mortgage Payment Calculator http://calculators-free.com/simple-mortgage-payment-calculator-1 http://calculators-free.com/simple-mortgage-payment-calculator-1#comments Tue, 24 Jun 2008 22:22:40 +0000 admin http://calculators-free.com/?p=1

Introduction | Demonstration Calculator | Source Code


How The Mortgage Payment Calculator Works

This is a very simple calculator for calculating a mortgage payment. Enter in the amount of the loan, the number of years the loan is for, and the APR. Then click “Calculate Payment” to get your monthly mortgage payment.

If you change the values, click the “Calculate Payment” button again to get a new result.

Introduction | Demonstration Calculator | Source Code


Demonstration Calculator


Simple Mortgage Calculator

Loan Amount:

Loan Term: years

APR Interest:

Payment:

Introduction | Demonstration Calculator | Source Code


Simple Mortgage Payment Calculator Source Code

This calculator is licensed to you under Creative Commons Attribution 3.0. If you would like to use the source code on your site or create a derivative work from it, you must include the following HTML on the page where the calculator appears. We’re giving you this code for free with a legal license to use it. All you have to do is credit us in the manner we specify.

Required Credit HTML

INSTALLATION

Just cut and paste the Javascript code and HTML form below into your page. If you want to customize the appearance of the form, feel free. Just make sure the input name and form id/name values are not changed.


<script type="text/javascript">
function calcLoan() {

var formvals = getFormVal();

var years = formvals[0];
var months = years * 12;

var loan = formvals[2];
var apr = formvals[1];

var mpr = apr / 1200;
var nfactor = 0 - months;
var mofactor = Math.pow((1 + mpr), nfactor);
var bofactor = 1 - mofactor;
var tofactor = mpr / bofactor;

var payment = loan * tofactor;
var reducto = Math.round(payment*100)/100;

document.wcbubba.payment.value = "$"+reducto;

if (amortsub) showAm();

}

function getFormVal(){

          var years = parseInt(document.wcbubba.term.value);
          var loan = parseInt(document.wcbubba.loan.value);
          var apr = parseFloat(document.wcbubba.apr.value);

          if((years <= 0)||(isNaN(years))) years = 1;
          if((apr <= 0)||(isNaN(apr))) apr = 1;
          if((loan <= 0)||(isNaN(loan))) loan = 1;

          var mike = new Array(years,apr,loan);

         return mike;
}
</script>

<form id="wcbubba" name="wcbubba" action="javascript:void();">

Loan Amount: <input type=text name="loan" size=8>

Loan Term: <input type=text name="term" size=8> years

APR Interest: <input type=text name="apr" size=8>

<br /><br />

<input type="submit" value="Calculate Payment" onClick="calcLoan();"> 

<br /><br />

<b>Payment:</b> <input type=text name = "payment" size=9><br>
</form></p>
]]>
http://calculators-free.com/simple-mortgage-payment-calculator-1/feed