function fnValidate(f) {
	if (f.first_name.value.length == 0){
		alert('Please enter your first name to continue.');
		f.first_name.focus();
		return false;
	}
	if (f.last_name.value.length == 0){
		alert('Please enter your last name to continue.');
		f.last_name.focus();
		return false;
	}
	if (!IsValidEmail(f.email.value)){
		alert('Please enter a valid email address to continue.');
		f.email.focus();
		return false;
	}
	return true;
}
function isNumeric(val) {
	var ValidChars = "0123456789.-()";
	for (i=0; i<val.length; i++) if (ValidChars.indexOf(val.charAt(i)) == -1) return false;
	return true;
}
function IsValidEmail(val) {
	var iLen = val.length;
	if 	((iLen < 6) || (val.indexOf('@') < 1) || ((val.charAt(iLen - 3) != '.') && (val.charAt(iLen - 4) != '.') && (val.charAt(iLen - 5) != '.')) ) return false;
	return true;
}
function fDOM(obj) {
	if (document.getElementById) return (document.getElementById(obj));
	else return (0);
}
function dropdown(obj,stat) {
	idx=fDOM(obj);
	if (idx) idx.style.visibility=(stat) ? "visible" : "hidden";
}
