function validate() 
{
	var msg = "The following information is missing:\n\n";
	var goalert = false;
		if (contact.FullName.value == "") {
			msg += 'Name\n';
			goalert = true;
		}

		if (contact.EmailAddress.value == "") {
			msg += 'Email\n';
			goalert = true;
		}
		
		if (contact.Message.value == "") {
			msg += 'Message\n';
			goalert = true;
		}
	
	if (goalert == true) {
		alert(msg);
		return false;
	} else {
		var e = contact.EmailAddress.value;
		
		if (e.indexOf('@')==-1) { //does it have an @ in it?
			alert('Please provide a valid email address\n\nThe address is missing an @ symbol');
			return false;
		} 
		
		var atsplit = contact.EmailAddress.value.split('@');
		if (atsplit[0]=='') { //are there any characters before the @ symbol
			alert('Please provide a valid email address\n\nThe address is missing characters before the @ symbol');
			return false;
		}
		
		if (atsplit[1].indexOf('.')==-1) { //does it have a . after the @
			alert('Please provide a valid email address\n\nThe address is missing a . (dot) after the @ symbol');
			return false;
		} 
		
		var atdotsplit = atsplit[1].split('.');
		if (atdotsplit[0]=='') { //does it have characters immediately after the @				
			alert('Please provide a valid email address\n\nThe address is missing characters immediately after the @ symbol');
			return false;
		}
		
		var dotsplit = contact.EmailAddress.value.split('.');
		//alert(dotsplit[dotsplit.length-1]);
		if (dotsplit[dotsplit.length-1]=='') { //are there any characters after the last .
			alert('Please provide a valid email address\n\nThe address is missing characters after the last .(dot)');
			return false;
		}
		
		//otherwise submit the form
		contact.submit();		
	} 
}
