
String.prototype.replaceAll = function(search, replace){
	return this.split(search).join(replace);
}

String.prototype.format = function(arguments) {
	var formatted = this;
	for(arg in arguments) {
		formatted = formatted.replaceAll("{" + arg + "}", arguments[arg]);
	}
	return formatted;
};

