function validate() 
{
	var msg = "The following information is missing:\n\n";
	var goalert = false;
		if (service.fname.value == "") {
			msg += 'Name\n';
			goalert = true;
		}
		
		if (service.email.value == "") {
			msg += 'Email Address\n';
			goalert = true;
		}

		if (service.message.value == "") {
			msg += 'Message\n';
			goalert = true;
		}
			
	if (goalert == true) {
		alert(msg);
		return false;
	} else {
		var e = service.email.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 = service.email.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 = service.email.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
		service.submit();		
	} 
}
