function CCEValidMsgUID() {
	var i, s;

	s = document.form1.DEST_UID_TXT.value;
	s = s.toUpperCase();
	document.form1.DEST_UID_TXT.value = s;
	if (s == "" || s == null) {
		// ok as long as something is selected in the dropdown
		if (document.form1.DEST_UID_CDE.selectedIndex < 1) {
			alert("You must enter a UID (or 'ALL') or select from the dropdown.");
			document.form1.DEST_UID_TXT.focus();
			return false;
		}
		else {
			return true;
		}
	}
		
	// something in typein box - must match entry in dropdown		
	for (i=1; i<document.form1.DEST_UID_CDE.length; ++i) {
		if (s == document.form1.DEST_UID_CDE.options[i].value) {
			return true;
		}
	}
	alert("Invalid UID specified: " + s);
	document.form1.DEST_UID_TXT.value = "";
	document.form1.DEST_UID_TXT.focus();
	return false;
}

function MSG_TXTonblur(cMaxMsgSize) {
	// NOTE! if max message size changes in the VBScript, you need to change it here as well!
	//var cMaxMsgSize = 2000;
	var s = document.form1.MSG_TXT.value;
	if (s.length <= cMaxMsgSize) {
		return true;
	}
	else {
		alert('Message exceeds ' + cMaxMsgSize + ' chars, (' + (s.length - cMaxMsgSize) + ' chars over limit). Please remove some text.');
		document.form1.MSG_TXT.focus();
		return false;
	}
	
}
