if (Calculators == undefined) {
	var Calculators = {};
}
if (Calculators.type == undefined) {
	Calculators.type = {};
}
Calculators.type.Rate = function Rate(amount){
	// Allow for passing in a Rate object or a number into the constructor	
	if (amount.getAmount == undefined) {
		this.amount = new Number(amount);
		// If this isn't a Rate object and it isn't a number, then default to zero
		if (isNaN(amount)) {
			this.amount = new Number(0.0);
		}
	}
	else {
		this.amount = new Number(amount.getAmount());
	}	
	this.MONTHS = 12;
	
	this.formatted = function() {
		return (this.amount * 100).toFixed(3) + "%";
	}
	
	this.monthly = function() {
		return (this.amount / this.MONTHS);
	}
	
	this.getAmount = function() {
		return this.amount;
	}
}

