function validate(that){
	if (trimSpaces(that.EMAIL.value)==""){
		window.alert ("Please enter an e-mail address.");
		return false;
	} 

	//Email Validation - start
	var email = that.EMAIL.value

	var invalid = ' /:,;'

	for(var i=0; i<invalid.length; i++)
	{
		var badChar = invalid.charAt(i)

		if (email.indexOf(badChar,0) != -1)
		{
			alert( 'The e-mail address you entered \ncontains one or more invalid characters.' )
			return false;
		}
	}

	var atSignPos = email.indexOf('@',1)

	if (atSignPos == -1)
	{
		alert( 'The e-mail address you entered \nis missing its @ sign.' )
		return false;
	}
	else if (email.indexOf('@',atSignPos+1) != -1)
	{
		alert( 'The e-mail address you entered \ncontains too many @ signs.' )
		return false;
	}

	var dotPos = email.indexOf('.',atSignPos+2)

	if (dotPos == -1)
	{
		alert( 'The e-mail address you entered \nis missing its extension. (.com, .net, .org, etc)' )
		return false;
	}
	
	// Validation - end

	if (trimSpaces(that.Full_Name.value)==""){
		alert( 'Please the organizers full name.' )
		return false;
	}
	
	if (trimSpaces(that.Phone1.value)==""){
		alert( 'Please enter a phone number where we can reach you.' )
		return false;
	}
	
	if (trimSpaces(that.Contact_Time.value)==""){
		alert( 'Please a contact time.' )
		return false;
	}	
	
	if (trimSpaces(that.Group_Name.value)==""){
		alert( 'Please enter a name of your group.' )
		return false;
	}

	if (trimSpaces(that.Number_Passengers.value)==""){
		alert( 'Please enter a number of passengers you would like to fly.' )
		return false;
	}

	if (trimSpaces(that.Trip.value)==""){
		alert( 'Please select Round Trip or One Way.' )
		return false;
	}	
	
	if (trimSpaces(that.Outbound_Route.value)==""){
		alert( 'Please enter the outbound routes you would like to fly.' )
		return false;
	}	

	if (trimSpaces(that.Outbound_Date.value)==""){
		alert( 'Please enter the outbound date you would like to fly.' )
		return false;
	}		
	
	if (trimSpaces(that.Outbound_Flight_Time.value)==""){
		alert( 'Please select the outbound time of day.' )
		return false;
	}	
	
	if (trimSpaces(that.Return_Route.value)==""){
		alert( 'Please select enter the return routes you would like to fly.' )
		return false;
	}	
	
	if (trimSpaces(that.Return_Date.value)==""){
		alert( 'Please enter the return date you would like to fly.' )
		return false;
	}	
	
	if (trimSpaces(that.Return_Flight_Time.value)==""){
		alert( 'Please select the return time of day.' )
		return false;
	}	
		
that.submit();
} 

//this function will strip preceding and following 
//spaces
//
function trimSpaces(sDataToTrim)
{
	var sReturnDataF = '';
	var sReturnDataE = '';
	var bFrontDone = false;
	var bEndDone = false;

	//strip leading spaces
	//
	for(x=0;x<sDataToTrim.length;x++)
	{
		//if not a space, append to the return
		//value
		//
		if(sDataToTrim.charAt(x)!=' ')
		{
			sReturnDataF = sReturnDataF + sDataToTrim.charAt(x);
			bFrontDone = true;
		}
		else
		{
			if(bFrontDone)
				sReturnDataF = sReturnDataF + sDataToTrim.charAt(x);
		}	
	}

	//strip trailing spaces
	//
	for(x=sReturnDataF.length-1;x>=0;x--)
	{
		//if not a space, append to the return
		//value
		//
		if(sReturnDataF.charAt(x)!=' ')
		{
			sReturnDataE = sReturnDataF.charAt(x) + sReturnDataE;
			bEndDone = true;
		}
		else
		{
			if(bEndDone)
				sReturnDataE = sReturnDataF.charAt(x) + sReturnDataE;
		}	
	}
	return sReturnDataE;
}