

// for the contact form
function validate(url)
{
x=document.contact;

fn=x.name.value.length;
em=x.email.value.length;
at=x.email.value.indexOf("@")
dot=x.email.value.indexOf(".")

if (fn<1)  
	{
	alert ("Please enter your name")
	x.name.focus()
	return false
	}
else if (em<6)      
	{
	alert("Please check that you have entered a valid email address")
	x.email.focus()
	return false
	}
else if (at == -1)
	{
	alert("Please check that you have entered a valid email address")
	x.email.focus()
	return false
	}
else if (dot == -1)
	{
	alert("Please check that you have entered a valid email address")
	x.email.focus()
	return false
	}

// this next section needs to call the ASP page that sends the email
else {
	x.method="post";
	x.action=url;
	x.submit();
	}
}
