
	//****************************************************************
	//		Register On Line form validation
	//		The Customer Connection, Inc. 
	//		
	//		Author:
	//		Revision History:	
	//			
	//
	//****************************************************************

	function validateROL(f)
		{
		
		if(f.location.value == "")
			{
			alert("Please select the restaurant location that you frequent most often.");
			f.location.focus();
			return false;
			}

		if(!checkString(f.firstName,'first name',false)){return false}
		if(!checkString(f.lastName,'last name',false)){return false}
		if(!checkString(f.address,'street',false)){return false}
		if(!checkString(f.city,'city',false)){return false}
		if(f.state.value == "")
			{
			alert("Please select the state in which you live.");
			f.state.focus();
			return false;
			}
		if(!checkZIPCode(f.zipCode, false)){return false}
		
		
		// Birthday 
		if(f.birthMonth.value == "")
			{
			alert("Please select the month you were your born.");
			f.birthday_month.focus();
			return false;
			}
		if(f.birthDay.value == "")
			{
			alert("Please select the day you were your born.");
			f.birthday_day.focus();
			return false;
			}
		if(f.birthYear.value == "")
			{
			alert("Please select the year you were your born.");
			f.birthday_year.focus();
			return false;
			}
			f.clientCode.value = clientID;
			f.postUrl.value  = postUrl;			
		}
		
	function validateROLFamily(f)
		{
		
		// Spouse entry
		if(f.spouseFirst.value != "" || f.spouseLast.value != "" || f.spouseEmail.value != "")
			{
			
			// Verify that all fields are complete
			if(!checkString(f.spouseFirst,'spouses first name',false)){return false}
			if(!checkString(f.spouseLast,'spouses last name',false)){return false}
			if(!checkEmail(f.spouseEmail,'spouses email address',false)){return false}
			
			
			// Check the spouses birthday
			var bday = f.spouseBirthMonth.value+"/"+f.spouseBirthDay.value+"/"+f.spouseBirthYear.value
			if(bday != "//")
				{
				//Validate the birthdate
				if(!isDate(f.spouseBirthYear.value, f.spouseBirthMonth.value, f.spouseBirthDay.value))
					{
					alert("Please enter a valid bithdate for your spouse");
					f.spouseEmail.focus();
					return false;
					}
				}
				
			// Check the anniversary date
			bday = f.spouseAnnMonth.value+"/"+f.spouseAnnDay.value+"/"+f.spouseAnnYear.value
			if(bday != "//")
				{
				// Validate the anniversary date
				if(!isDate(f.spouseAnnYear.value, f.spouseAnnMonth.value, f.spouseAnnDay.value))
					{
					alert("Please enter a valid anniversary date");
					f.spouseEmail.focus();
					return false;
					}
				}
			
			}
			
		// Validate Child #1 Entry
		if(f.childFirst_01.value != "" || f.childLast_01.value != "" || f.childEmail_01.value != "")
			{
			
			// Verify that all fields are complete
			if(!checkString(f.childFirst_01,'child 1 first name',false)){return false}
			if(!checkString(f.childLast_01,'child 1 last name',false)){return false}
			if(!checkEmail(f.childEmail_01,'child 1 email address',false)){return false}
			
			// Check the birthday
			var bday = f.ChildBirthMonth_01.value+"/"+f.childBirthDay_01.value+"/"+f.childBirthYear_01.value
			if(bday != "//")
				{
				//Validate the birthdate
				if(!isDate(f.childBirthYear_01.value, f.ChildBirthMonth_01.value, f.childBirthDay_01.value))
					{
					alert("Please enter a valid bithdate for your child");
					f.childEmail_01.focus();
					return false;
					}
				}
			
			}	
			
			
		// Validate Child #2 Entry
		if(f.childFirst_02.value != "" || f.childLast_02.value != "" || f.childEmail_02.value != "")
			{
			
			// Verify that all fields are complete
			if(!checkString(f.childFirst_02,'child 2 first name',false)){return false}
			if(!checkString(f.childLast_02,'child 2 last name',false)){return false}
			if(!checkEmail(f.childEmail_02,'child 2 email address',false)){return false}
			
			// Check the birthday
			var bday = f.ChildBirthMonth_02.value+"/"+f.childBirthDay_02.value+"/"+f.childBirthYear_02.value
			if(bday != "//")
				{
				//Validate the birthdate
				if(!isDate(f.childBirthYear_02.value, f.ChildBirthMonth_02.value, f.childBirthDay_02.value))
					{
					alert("Please enter a valid bithdate for your child");
					f.childEmail_02.focus();
					return false;
					}
				}
			
			}
			
		// Validate Child #3 Entry
		if(f.childFirst_03.value != "" || f.childLast_03.value != "" || f.childEmail_03.value != "")
			{
			
			// Verify that all fields are complete
			if(!checkString(f.childFirst_03,'child 3 first name',false)){return false}
			if(!checkString(f.childLast_03,'child 3 last name',false)){return false}
			if(!checkEmail(f.childEmail_03,'child 3 email address',false)){return false}
			
			// Check the birthday
			var bday = f.ChildBirthMonth_03.value+"/"+f.childBirthDay_03.value+"/"+f.childBirthYear_03.value
			if(bday != "//")
				{
				//Validate the birthdate
				if(!isDate(f.childBirthYear_03.value, f.ChildBirthMonth_03.value, f.childBirthDay_03.value))
					{
					alert("Please enter a valid bithdate for your child");
					f.childEmail_03.focus();
					return false;
					}
				}
			
			}
			
		// Validate Child #4 Entry
		if(f.childFirst_04.value != "" || f.childLast_04.value != "" || f.childEmail_04.value != "")
			{
			
			// Verify that all fields are complete
			if(!checkString(f.childFirst_04,'child 4 first name',false)){return false}
			if(!checkString(f.childLast_04,'child 4 last name',false)){return false}
			if(!checkEmail(f.childEmail_04,'child 4 email address',false)){return false}
			
			// Check the birthday
			var bday = f.ChildBirthMonth_04.value+"/"+f.childBirthDay_04.value+"/"+f.childBirthYear_04.value
			if(bday != "//")
				{
				//Validate the birthdate
				if(!isDate(f.childBirthYear_04.value, f.ChildBirthMonth_04.value, f.childBirthDay_04.value))
					{
					alert("Please enter a valid bithdate for your child");
					f.childEmail_04.focus();
					return false;
					}
				}
			
			}
			
		//+++++remove below after testing..
		//alert("Finished Validating ROL Family Form");
		//+++++
		
		//return false;


		f.clientCode.value = clientID;
		f.postUrl.value  = postUrl;		
		}