function CaseConverter(type) {
  this.type = type;
}

CaseConverter.prototype = new TrConverter();

CaseConverter.prototype.getFormatHint = function() {
	return null;
}

String.prototype.toTitleCase = function () {
	var str = "";	
	var wrds = this.split(" ");	
	for(keyvar in wrds)	{	
		str += ' ' + wrds[keyvar].substr(0,1).toUpperCase()	 
		    + wrds[keyvar].substr(1,wrds[keyvar].length).toLowerCase();	
	}   
	return str.substring(1);
}

function convertCase (value, label) {
	alert('convertCase: type = ' + this.type + ', value = ' + value + '.');
	if (this.type == "upper") {
		return value.toUpperCase();
	} else if (this.type == "title") {
		return value.toTitleCase();
	} else {
		return value.toLowerCase();
	}	
}

CaseConverter.prototype.getAsString = convertCase
CaseConverter.prototype.getAsObject = convertCase