// trims leading and trailing blanks
function trim(str) {
	str = str.replace(/^\s+/g, "");
	return str.replace(/\s+$/g,"");
}

// round calculated currency values
function RoundPrice(curValue) {
	var curRounded =+ Math.floor(curValue)+".";
	var curCents = 100 * (curValue - Math.floor(curValue)) + 0.5;
	curRounded += Math.floor(curCents/10);
	curRounded += Math.floor(curCents%10);
	return curRounded;
}