<!--
var loopCount = 0;
function CheckCase(fld,checkUpper,checkLower) {
	/* NOTE: 11/7/2003
	   This script has been updated to fix an infinite loop problem on Netscape Mac.
	   The loopCount keeps the user from getting stuck on a field either by choice 
	   or by Netscape's bug on the mac.
	*/
	var uCase = String(fld.value).toUpperCase();
	var lCase = String(fld.value).toLowerCase();
	loopCount++;
	//window.status= loopCount;	
	if (fld.value == '' || !isNaN(fld.value) || loopCount > 3) {
		loopCount=0;
		return;
	}
		
	// Check for all upper case.
	if (checkUpper) {
		if (fld.value == uCase) {
			retValue = confirm('Warning:You are typing in all capital letters.\n\nIf this is the way you want this to appear in your book then click the OK button.\nIf not then click the CANCEL button and change your answer.');
			if (!retValue) {
				fld.focus();
				fld.select();	
				return					
			} 	else {
				return
			}		
		}
	}
	
	// Check for all lower case.
	if (checkLower) {
		if (fld.value == lCase) {
			retValue = confirm('Warning:You are typing in all lower case letters.\n\nIf this is the way you want this to appear in your book then click the OK button.\nIf not then click the CANCEL button and change your answer.');
			if (!retValue) {
				fld.focus();
				fld.select();				
				return
			} 	else {
				return
			}
			
		}
	}
	loopCount=0;
	
}

function ToLowerCase(fld) {
	
	if (fld.value != '') {
		fld.value = String(fld.value).toLowerCase();
	}

}

function ProperCase(fld) {
	var fldValues = fld.value.toLowerCase().split(/\b/)
	var pCase = '';
	var i = 0
	fld.value = ''
	for (i=0;i<fldValues.length;i++){
		first = fldValues[i].substr(0,1).toUpperCase()
		fld.value += fldValues[i].replace(/\w/,first)
	}
}
//-->