function validateText(oControl, strMessage){

	if (AllTrim(oControl.value) == ""){
		oControl.focus();
		alert(strMessage);
		return false;
	}else{
		return true;
	}
	
}

function validateMonthlyMeetingRegistration(oForm){

	//**********************
	// Variable Declaration
	//**********************
	var otxtAttendeeName, otxtAttendeeEmail, otxtAttendeeState
	
	//**************************
	// Variable Initialization
	//**************************
	
	with (oForm){

		//************************
		// Contact Information
		//************************
		//Full Name
		if (!validateText(FullName,"Please provide Full Name.")){
			return false;
		}
		// Firm
		if (!validateText(Firm,"Please provide name of Firm.")){
			return false;
		}
		// Address 
		if (!validateText(Address,"Please enter your Address.")){
			return false;
		}
		
		// City
		if (!validateText(City,"Please enter the City.")){
			return false;
		}
		
		// State
		if (!validateText(State,"Please enter the State.")){
			return false;
		}
		
		// Zip
		if (!validateText(Zip,"Please enter the Zip Code.")){
			return false;
		}
		// Phone
		if (!validateText(Phone,"Please provide phone number.")){
			return false;
		}
		// email
		if (!validateText(Email,"Please enter your Email Address.")){
			return false;
		}else if (!(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(Email.value))){
			Email.focus();
			alert("Invalid email address provided. Please enter a valid Email Address.");
			return false;
		}
		/* Attendee (1)
		if (!validateText(Name1,"Please provide name of attendee #1.")){
		return false;
		}
		if (AllTrim(Email1.value) != ""){
			if (!(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(Email.value))){
				Email1.focus();
				alert("Invalid email address provided for attendee #1.");
				return false;				
			}
		}
		*/
		
		// Attendees (2 - n)
		if (typeof attendeeCount != "undefined"){
		
			for (i=2;i<=parseInt(attendeeCount.value);i++){
				
				if (document.getElementById("Name" + i) != null){
				
					otxtAttendeeName = document.getElementById("Name" + i)
					otxtAttendeeEmail = document.getElementById("Email" + i)
					otxtAttendeeState = document.getElementById("State" + i)
					
					// Verify information provided for attendee
					// If no information provided then valid ~ no attendee
					if (AllTrim(otxtAttendeeName.value) != "" || AllTrim(otxtAttendeeEmail.value) != ""){
					
						if (AllTrim(otxtAttendeeEmail.value) != ""){
							if (!validateText(otxtAttendeeName,"Please provide name of attendee #" + i + ".")){
								return false;
							}
							if (!(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(otxtAttendeeEmail.value))){
								otxtAttendeeEmail.focus();
								alert("Invalid email address provided for attendee #" + i + ".");
								return false;				
							}
						}
					
					}
					
				}
				
			}
		
		}
		
		//**********************
		// Billing Information
		//**********************
		
		// CC Number
		if (!validateText(AccountNumber,"Please provide credit card account number.")){
			return false
		}else if (!validateCreditCard(AccountNumber.value)){
			AccountNumber.focus();
			alert("Invalid credit card account number provided. Please enter a valid credit card account number.");
			return false;
		}

		// Credit Card Expiration Date
		if (ExpDateMonth.selectedIndex == 0){
			ExpDateMonth.focus();
			alert("Please provideexpiration date for credit card (Month).");
			return false;
		}
		if (ExpDateYear.selectedIndex == 0){
			ExpDateYear.focus();
			alert("Please provideexpiration date for credit card (Year).");
			return false;
		}

		// NameOfCard
		if (!validateText(NameOfCard,"Please provide name appearing on credit card.")){
			return false;
		}
		
		// zipcode
		if (typeof zipcode != "undefined"){
			if (!validateText(zipcode,"Please provide Billing Address zip code.")){
				return false;
			}
		}
		
	}

	return true;
		
}
