function FSfncCheckTime(thisTime) {
	if (thisTime.indexOf(":")==-1) {return false}
	var ArrayTime = thisTime.split(":");
	if (ArrayTime.length!=2) {return false}
	if ((isNaN(ArrayTime[0])) || (ArrayTime[0]=="")) {return false}
	if ((isNaN(ArrayTime[1])) || (ArrayTime[1]=="")) {return false}
	if ((parseInt(ArrayTime[0],10)<0) || (parseInt(ArrayTime[0],10)>23)) {return false}
	if ((parseInt(ArrayTime[1],10)<0) || (parseInt(ArrayTime[1],10)>59)) {return false}
	return true;
	}

function FSfncValidateEmailAddress(FormField,TheMessage) {
	// CheckTLD is optional, it accepts values of true, false, and null.
	emailStr = FormField.value.toLowerCase()
	var emailPat=/^(.+)@(.+)$/;
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
	var validChars="\[^\\s" + specialChars + "\]";
	var quotedUser="(\"[^\"]*\")";
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
	var atom=validChars + '+';
	var word="(" + atom + "|" + quotedUser + ")";
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
	var matchArray=emailStr.match(emailPat);
	if (matchArray==null) {alert(TheMessage); FormField.focus(); FormField.focus(); return false}
	var user=matchArray[1];
	var domain=matchArray[2];
	for (i=0; i<user.length; i++) {if (user.charCodeAt(i)>127) {alert(TheMessage); return false}}
	for (i=0; i<domain.length; i++) {if (domain.charCodeAt(i)>127) {alert(TheMessage); FormField.focus(); return false}}
	if (user.match(userPat)==null) {alert(TheMessage); FormField.focus(); return false}
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {for (var i=1;i<=4;i++) {if (IPArray[i]>255) {alert(TheMessage); FormField.focus(); return false}}; return true}
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	for (i=0;i<len;i++) {if (domArr[i].search(atomPat)==-1) {alert(TheMessage); FormField.focus(); return false}}
	if (len<2) {alert(TheMessage); FormField.focus(); return false}
	return true;
	}

function FSfncCheckNumber(FormField,TheMessage,AllowBlank,PositiveOnly,IntegerOnly) {
	// AllowBlank, PositiveOnly, and IntegerOnly are optional
	if ((isNaN(FormField.value)) || (FormField.value.search(/\s/g)>-1)) {alert(TheMessage); FormField.focus(); return false}
	if ((AllowBlank==false) && (FormField.value=="")) {alert(TheMessage); FormField.focus(); return false}
	if ((PositiveOnly) && (FormField.value<0)) {alert(TheMessage); FormField.focus(); return false}
	if ((IntegerOnly) && (FormField.value.indexOf(".")>-1)) {alert(TheMessage); FormField.focus(); return false}
	return true;
	}

function FSfncCheckString(FormField,TheMessage,AllowBlank,MaxLength) {
	// MaxLength is optional, when not provided the string is only checked for being blank.
	if ((AllowBlank==false) && (FormField.value=="")) {alert(TheMessage); FormField.focus(); return false}
	if ((MaxLength!="") && (FormField.value.length>MaxLength)) {alert(TheMessage); FormField.focus(); return false}
	return true;
	}

