function isEmpty(inputObj, strErrMsg, blnDoAlert, blnDoFocus) {
	var strTemp;
	
	strTemp = Trim(inputObj.value);
	inputObj.value = strTemp;

	if (inputObj.value == null || inputObj.value == ""){
		if (blnDoAlert == true){alert (strErrMsg + " is empty.  Please enter a value.");}
		if (blnDoFocus == true){inputObj.focus();inputObj.select();}
		return true;
	}
	return false;
}
function Trim(strInput){
	var strTemp  = new String("");
	/*var strInput = new String("")*/

	//Left Trim
	strInput = strInput + "";

	if (strInput.length == 1){
		if (strInput == " "){
			return "";
		}else{
			return strInput;
		}
	}

	strTemp = strInput.substr(0, 1);
	while ((strTemp == " " ) && (strInput.length > 0))
	{
		strInput = strInput.substr(1, strInput.length)
		strTemp = strInput.substr(0, 1)
	}
	//Right Trim
	strTemp = strInput.substr(strInput.length-1, 1)
	while ((strTemp ==" " )&& (strInput.length > 0))
	{
		strInput = strInput.substr(0, strInput.length-1)
		strTemp = strInput.substr(strInput.length-1, 1)
	}
	return strInput;
}