function convertCase(field) {
var tmpStr = field.value.toLowerCase();
	
	tmpStr = tmpStr.replace (/(\S*)\"(\D+)\"(\S*)/g, '$1 "$2" $3'); // put spaces around "string" (force uppercase)
	tmpStr = tmpStr.replace (/(\d+)([a-z]{3,})/gi, "$1 $2"); // add space after numbers when 3+ alphachars follow
	tmpStr = tmpStr.replace (/^o\'/gi, "O'~ ");         // change o' to O'+~space (O'~Reilly) (force uppercase)
	tmpStr = tmpStr.replace (/(\s*)o\'/gi, "O'~ ");         // change o' to O'+space (O' Reilly) (force uppercase)
	tmpStr = tmpStr.replace (/(^mc|\s+mc)([a-z])/gi, "$1~ $2"); // add tilde space combination after Mc (force uppercase)
	tmpStr = tmpStr.replace (/(\D)\./g, "$1. "); // add space after literal . (B. M. Smith > uppercase)
	tmpStr = tmpStr.replace (/\-([a-z])/g, "~ -~ $1"); // add spaces around hyphens (force uppercase)
	tmpStr = tmpStr.replace (/(^\s+)/, ""); // remove spaces at start of string
	tmpStr = tmpStr.replace (/\s{4,}/g, " "); // remove excessive spaces > 4
	
	var SplitStuff = tmpStr.split(" ");
	var ArrLen = SplitStuff.length;
	
	for (var k=0; k<ArrLen; k++) { 
		var word = SplitStuff[k];
		// roman numerals should be uppercased 
		if (word.match (/^m?m?m?(c[md]|d?c{0,3})(x[lc]|l?x{0,3})(i[xv]|v?i{0,3})$/)) { word = word.toUpperCase() }
		if (/\d/.test(word)) {word = word.toUpperCase()}
		var wordLen = word.length;
		var posn = word.search(/[a-zA-Z]/); 
		var firstChars = word.substring(0, posn+1).toUpperCase();
		var postString = word.substring(posn+1,wordLen);
		word = firstChars + postString;
		word = word.replace (/\bPhd\b/, "PhD");
		word = word.replace ( /\bPo\b/g, "PO" );
		word = word.replace (/\'a/, "'A"); // De'Ath and D'Arcy!
		
		SplitStuff[k] = word;
	}
	
	var newline = SplitStuff.join(" "); 
	newline = newline.replace (/\~\s/g, ""); // remove the spaces added by function
	newline = newline.replace (/\.\s/g, "."); // re-format names B. M. Smith > B.M.Smith
	field.value = newline;
}

