// Original Code Copyright 2006 by e-QualIT.  All rights reserved.
<!-- Hide
function remAllSpaces(inStr) {
	if (inStr != null) {
		inStr = inStr.replace(/\s/g, "");
	}
	return inStr
}
function trim(inStr) {
	if (inStr != null) {
		inStr = inStr.toString();
		var reBeg = /^\s/;
		var reEnd = /\s$/;
		while (inStr.length > 0) {
			if (inStr.match(reBeg) == null) {
				break;
			}
			inStr = inStr.replace(reBeg,"");
		}
		while (inStr.length > 0) {
			if (inStr.match(reEnd) == null) {
				break;
			}
			inStr = inStr.replace(reEnd,"");
		}
	}
	return inStr;
}
function validEmail(inStr) {
	var blnRes = false;
	if (inStr != null) {
		inStr = inStr.toString();
		var rePat = /^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/;
		var matches = inStr.match(rePat);
		if (matches) {
			blnRes = true;
		}
	}
	return blnRes;
}
function verScrapbook(fncTgtForm) {
	var blnErr = false;
	var arrFldNames;
	if (fncTgtForm) {
		arrFldNames = Array("FirstName", "LastName", "Phone", "Email", "EventDates", "BestFeature", "Comments");
		for (var i=0;i<arrFldNames.length;i++) {
			var curFld = eval("fncTgtForm."+arrFldNames[i]);
			if (arrFldNames[i] == "Email") {
				var emlFld = curFld;
			}
			var curVal = curFld.value;
			if (trim(curVal) == "") {
				blnErr = true;
				curFld.focus();
				aWin = alert("You must make an entry in this field!");
				break;
			}
		}
		if (! blnErr) {
			blnErr = ! validEmail(emlFld.value);
			if (blnErr) {
				emlFld.focus();
				aWin = alert("You must enter a valid e-mail address!");
			}
		}
	}
	if (! blnErr) {
		fncTgtForm.submit();
	}
}
function setPhoto(fncV, fncW, fncH) {
	if (! isNaN(fncV) && ! isNaN(fncW) && ! isNaN(fncH)) {
		fForm = document.forms["photo"];
		if (fForm) {
			fForm.fV.value = fncV;
			fForm.iW.value = fncW;
			fForm.iH.value = fncH;
			fForm.submit();
		}
	}
}
// Unhide -->
