function dropdown(objectID,opacity) {if (document.getElementById) document.getElementById(objectID).style.visibility = (opacity) ? "visible" : "hidden";}

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 fnValidate(f) {
	if (f.name.value.length == 0) {
		alert('Please enter your name to continue.');
		f.name.focus();
		return false;
	}
	if ((f.phone.value.length < 10 || !isNumeric(f.phone.value))&&(!IsValidEmail(f.email.value))) {
		alert('Please enter your phone number or email address to continue.');
		f.phone.focus();
		return false;
	}
	return true;
}