		function fnValidate(f){
			if (IsEmpty(f.name.value)){
				alert('Please enter your name to continue.');
				f.name.focus();
				return false;
			}
			if (IsEmpty(f.fromemail.value)){
				alert('Please enter your email address to continue.');
				f.fromemail.focus();
				return false;
			}
			if (!IsValidEmail(f.fromemail.value)){
				alert('Please enter a valid email address to continue.');
				f.fromemail.focus();
				return false;
			}
			if (IsEmpty(f.email.value)){
				alert('Please enter your friend`s email address to continue.');
				f.email.focus();
				return false;
			}
			if (!IsValidEmail(f.email.value)){
				alert('Please enter a valid email address to continue.');
				f.email.focus();
				return false;
			}
			if (IsEmpty(f.comments.value)){
				alert('Please enter your comments to continue.');
				f.comments.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 IsEmpty(val) {
			for (i=0; i<val.length; i++) { 
				if (val.charAt(i) != ' ') 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;
		}