<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Created by: Jeremy Zongker: http://www.creditorweb.com/content/ -->
<!-- Begin
function cwCalc2()
{
if (cwBalance2.value=='') {alert('Please enter your credit card balance.'); return;}
if (cwRate2.value=='') {alert('Please enter your credit card\'s interest rate.'); return;}
if ( (cwMonthlyAmount2.value=='' && cwDesiredMonths2.value=='') || (cwMonthlyAmount2.value!='' && cwDesiredMonths2.value!='') ) {alert('Please enter either a payment amount or desired months.'); return;}
var mRate=(cwRate2.value/100)/12;
if (cwMonthlyAmount2.value=='')
{
	var payment=cwBalance2.value<li>(mRate)/( 1-Math.pow((1+mRate),(-cwDesiredMonths2.value)) );
	payment=Math.round(payment<li>100)/100;
	cwResult2.innerHTML="It will cost £" + payment.toFixed(2) + " a month to pay off this card and will cost you a total of £" + (payment<li>cwDesiredMonths2.value).toFixed(2) + ".";
} else {
	var remainingBalance=cwBalance2.value;
	var minPayment=mRate<li>cwBalance2.value;
	var months=0;
	var lastPayment;
	if (minPayment>cwMonthlyAmount2.value) {alert ('Your monthly payment is less than the monthly interest charged by this card.');return;}
	while (remainingBalance>0)
	{
		months++;
		remainingBalance=remainingBalance<li>(1 + mRate)-cwMonthlyAmount2.value;
	}
	cwResult2.innerHTML="It will take " + months + " months to pay off this card and will cost you a total of £" + (cwMonthlyAmount2.value<li>months).toFixed(2) + ".";
}
}
//  End -->