<!--
	function getbanner(area){
		switch (area){
			case 'ctop': g728x90();break
			case 'ccenter': g336x280();break			
			case 'cbottom': ;break
		}	
	}

	function g728x90(){
		google_ad_client = "ca-pub-7694865692691875";
		/* 728 x 90 */
		google_ad_slot = "9818035212";
		google_ad_width = 728;
		google_ad_height = 90;
		document.write('<sc'+'ript type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></sc'+'ript>');
	}
	function g336x280(){
		google_ad_client = "ca-pub-7694865692691875";
		/* 336x280, created 30/09/09 */
		google_ad_slot = "5303708976";
		google_ad_width = 336;
		google_ad_height = 280;
		document.write('<sc'+'ript type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></sc'+'ript>');
	}
		
	function calculate() {
		// Get the user's input from the form. Assume it is all valid.
		// Convert interest from a percentage to a decimal, and convert from
		// an annual rate to a monthly rate. Convert payment period in years
		// to the number of monthly payments.
		var principal = $("#principal").val();
		var interest = $("#interest").val()/100/12;
		var payments = $("#years").val()*12;

		// Now compute the monthly payment figure, using esoteric math.
		var x = Math.pow(1 + interest, payments);
		var monthly = (principal*x*interest)/(x-1);

		// Check that the result is a finite number. If so, display the results
		if (!isNaN(monthly) && 
			(monthly != Number.POSITIVE_INFINITY) &&
			(monthly != Number.NEGATIVE_INFINITY)) {

			$("#payment").text(round(monthly));
			$("#total").text(round(monthly * payments));
			$("#totalinterest").text(round((monthly * payments) - principal));
			$("#result").css("display","block");
		}
		// Otherwise, the user's input was probably invalid, so don't
		// display anything.
		else {
			$("#result").css("display","none");
		}
	}

	// This simple method rounds a number to two decimal places.
	function round(x) {
	  return Math.round(x*100)/100;
	}
-->

