
/*
FUNCTION CheckAnswer(strCognate, strCorrect, objText)
strCognate = String, user supplied answer to be compared
strCorrect = String, code supplied answer to be compared
objText = Object (designed for <input type="text">), object to write correct/incorrect

Receives the user supplied answer and checks it against 
a code suppled correct answers.  Returns "Correct!" for a direct match,
Returns "Incorrect" for a failed match.  Returns "Please give an answer"
for a trimmed null string.
*/
function CheckAnswer(strCognate, strCorrect, objText) {
	var strAnswer = strCognate.toLowerCase().replace(/\s*/g, "");
	if (strAnswer == strCorrect) {
		objText.value = "Correct!"
	}// END if(strCognate == strCorrect)
	else if (strAnswer == '') {
		alert("Please, provide an answer")
	}
	else {
		objText.value = "Incorrect!"
	}
}//END Function
