function locationChange(setId) {
	if(document.getElementById(setId).style.fontWeight="normal") {
		document.getElementById(setId).style.fontWeight="bold";
	} else {
		document.getElementById(setId).style.fontWeight="normal";
	}
}
function isNumeric(x) { 
	// I usually use this function like this: if (isNumeric(myVar)) { } 
	// regular expression that validates a value is numeric 
	var RegExp = /^(-)?(\d*)(\.?)(\d*)$/; 
	// Note: this WILL allow a number that ends in a decimal: -452. 
	// compare the argument to the RegEx 
	// the 'match' function returns 0 if the value didn't match 
	var result = x.match(RegExp); 
	return ((result != null) && (x.length > 0)); 
}
function calculate_payment() {
	var principal = document.getElementById("textLoanAmount").value;	//principal").value;
	var interest = document.getElementById("textInterest").value;	//interest").value;
	var term = document.getElementById("textTerm").value;	//term").value;
	if (isNumeric(principal) && isNumeric(interest) && isNumeric(term)) {
		var j = interest / (1200);
		var n = term * (12);
		var m = 0;
		var quotient = (1 + j);
		quotient = Math.pow(quotient, (n * -1));
		quotient = 1 - quotient;
		m = (principal * j) / quotient;
		m = Math.round(100*m)/100;
		document.getElementById("textPayment").value = "$" + m.toFixed(2);	//monthly_payment").value = "$" + m;
	} else {
		document.getElementById("textPayment").value = "";	//monthly_payment").value = "";
	}
};
var qs = location.search.substring(1);
var nv = qs.split('&');
var url = new Object();
for(i = 0; i < nv.length; i++) {
	eq = nv[i].indexOf('=');
	url[nv[i].substring(0,eq).toLowerCase()] = unescape(nv[i].substring(eq + 1));
}