function val_contact_form()
{
	valid = true;
	
	if (document.contact_form.fname.value == "")
	{
		alert ("Please fill in your first name!");
		valid = false;
		document.contact_form.fname.focus();
		return valid;
	}
	
	if (document.contact_form.lname.value == "")
	{
		alert ("Please fill in your last name!");
		valid = false;
		document.contact_form.lname.focus();
		return valid;
	}
	
	if (document.contact_form.email.value == "")
	{
		alert ("Please fill in your email address!");
		valid = false;
		document.contact_form.email.focus();
		return valid;
	}
	else
	{
		var at = "@";
		var dot = ".";
		
		if (document.contact_form.email.value.indexOf(at) == -1 || document.contact_form.email.value.indexOf(dot) == -1)
		{
			alert ("Please fill in a valid email address!");
			valid = false;
			document.contact_form.email.focus();
			return valid;
		}
	}
	
	if (document.contact_form.message.value == "")
	{
		alert ("Please fill in a message!");
		valid = false;
		document.contact_form.message.focus();
		return valid;
	}
	
	if (document.contact_form.code.value == "")
	{
		alert ("Please fill in the turing/captcha code!");
		valid = false;
		document.contact_form.code.focus();
		return valid;
	}
	
	return valid;
}
