	function check_email_syntax(email_addy) 
	{	

		var i = 0;
		var the_test = 0;
		var testString = email_addy;
		var msg_alert= "Please use a valid email address.";
			
		//check email address:
		if (testString.length < 8) 
		{
			msg_alert = msg_alert + "\nYour email address is too short to be valid."
			the_test = 1;
		}
		if ((i = testString.indexOf ("@",1)) < 1) 
		{
			msg_alert = msg_alert + "\nAll email addresses, must include the '@' sign.";
			the_test = 1;
		}
		if (testString.indexOf (".",i) <= i+2) 
		{
			msg_alert = msg_alert + "\nThere must be at least 2 characters between the '@' sign and the dot '.'";
			the_test = 1;
		}
		
		if (the_test) 
		{
			// this means the email addy is NOT valid, so show the message and return false!
			alert(msg_alert);
			return 0;
		}
		else
		{
			// this means that the email addy is good, so just return true.
			return 1;
		}
	}


