// molaa javascript
// v. 20081103

function prevPage() {
    history.go(-1);
}

//is valid email?
function isValidEmail(email) {
	return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email));
}
//
//
function validatecontact(myForm) {
 var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n"
 var error = 0;
	//nombre
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//telefono
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
 	//email
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}	
	//regarding
	if (myForm.cboCONTACT_REGARDING_NBR.value=="") {
		validacion = validacion + "Please select Regarding.\n"
		error++;
	}
	//mensaje
	if (myForm.txtMESSAGE_TXT.value=="") {
		validacion = validacion + "Please complete Comments.\n"
		error++;
	}
	//
	if (error==0) {
		pageTracker._trackEvent('Forms','Submit','Contact Us','1')
		return true
	} else {
		alert (validacion);
		pageTracker._trackEvent('Forms','Submit','Contact Us','0')
		return false
	}
}

function validateartregistry(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	hasGallery=false;
 	if (myForm.rbgHAS_GALLERY_CD[0].checked) {
		hasGallery=true;
	}
	var error = 0;
	//nombre
	if (myForm.txtFIRST_NM.value=="") {
		error++;
	}
	//apellido
	if (myForm.txtLAST_NM.value=="") {
		error++;
	}
	//fecha nacimiento
	if (myForm.txtBIRTH_DT.value=="") {
		error++;
	}		
 	//email
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		error++
	}
	if (myForm.txtBIRTH_CITY_NM.value=="") {
		error++;
	}
	if (myForm.cboBIRTH_COUNTRY_CD.value=="") {
		error++;
	}
	if (myForm.txtLIVE_CITY_NM.value=="") {
		error++;
	}	
	if (myForm.cboLIVE_COUNTRY_CD.value=="") {
		error++;
	}	
	if (myForm.txtARTIST_ADDRESS_1_TXT.value=="") {
		error++;
	}	
	if (myForm.txtZIP_CD.value=="") {
		error++;
	}	
	if (myForm.txtTELEPHONE_TXT.value=="") {
		error++;
	}	
	//agente o galeria
	if (myForm.txtTELEPHONE_TXT.value=="") {
		error++;
	}	
	//mensaje

	if (hasGallery) {
		//nombre
		if (myForm.txtGALLERY_NM.value=="") {
			error++;
		}
		//apellido
		if (myForm.txtGALLERY_ADDRESS_1_TXT.value=="") {
			error++;
		}
		//fecha nacimiento
		if (myForm.txtGALLERY_ZIP_CD.value=="") {
			error++;
		}		
		//email
		if (!isValidEmail(myForm.txtGALLERY_EMAIL_ADDR.value)) {
			error++
		}
		if (myForm.txtGALLERY_CITY_NM.value=="") {
			error++;
		}
		if (myForm.cboGALLERY_COUNTRY_CD.value=="") {
			error++;
		}
		if (myForm.txtGALLERY_TELEPHONE_TXT.value=="") {
			error++;
		}	
	}
	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}// JavaScript Document	
}


function validateartdonation(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//nombre
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//telefono
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
	 //email
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	//
	if (error==0) {
		pageTracker._trackEvent('Forms','Submit','Art Donation','1')
		return true
	} else {
		alert (validacion);
		pageTracker._trackEvent('Forms','Submit','Art Donation','0')
		return false
	}
}

// Radio Button Validation
function validateButton(btn) {
	var check=false;;
    for (var i=0; i<btn.length; i++) {
		if (btn[i].checked) {
			check=true;
		}
    }
	return check;
}
function getButtonValue(btn, valor) {
	var check=false;;
    for (var i=0; i<btn.length; i++) {
		if (btn[i].value.toLowerCase()==valor.toLowerCase()) {
			if (btn[i].checked) {
				check=true;
			}
		}
    }
	return check;
}

function validatedonationform(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//button $
	if (!validateButton(myForm.GIFT_AMOUNT)) {
		validacion = validacion + "Please select Gift Options.\n"
		error++;
	}
	//es other?
	if (getButtonValue(myForm.GIFT_AMOUNT, "other")) {
		if (myForm.OTHER.value=="") {
			validacion = validacion + "Please complete Gift Options Other value.\n"
			error++;
		}
	}	
	//datos personales
	if (myForm.FIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}

	if (myForm.TELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}		
 	//email
	if (!isValidEmail(myForm.EMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	if (myForm.ADDRESS.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}
	if (myForm.ZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}
	if (myForm.CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	if (myForm.STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}
	//miembero radio button
	if (!validateButton(myForm.MEMBER)) {
		validacion = validacion + "Please select MOLAA Member status.\n"
		error++;
	}
	//tarjeta
	if (!validateButton(myForm.CARD_TYPE)) {
		validacion = validacion + "Please select Credit Card.\n"
		error++;
	}	
	if (myForm.CARD_NUMBER.value=="") {
		validacion = validacion + "Please complete Credit Card Number.\n"
		error++;
	}	
	if (myForm.CARD_EXPIRES.value=="") {
		validacion = validacion + "Please complete Credit Card Expiration date.\n"
		error++;
	}	
	if (myForm.NAME_ON_CARD.value=="") {
		validacion = validacion + "Please complete Credit Card Name on Card.\n"
		error++;
	}		
	//recognition
	if (!validateButton(myForm.RECOGNITION_TYPE)) {
		validacion = validacion + "Please select Recognition.\n"
		error++;
	} 
	//es recognized?
	if (getButtonValue(myForm.RECOGNITION_TYPE, "Recognized")) {
		if (myForm.RECOGNITION_TEXT.value=="") {
			validacion = validacion + "Please complete Recognition.\n"
			error++;
		}
	}
	/*if (!myForm.Recognized.cheked && !myForm.NotRecognized.cheked) {
		validacion = validacion + "Please select Recognition.\n"
		error++;
	}*/
	//DESTINATIONS
	var check=false;
	for (var i=0; i<9; i++) {
		var inputName = myForm["DESTINATIONS$"+i];
		if (inputName.checked) {
			check=true;
		}
	}
	if (!check) {
		validacion = validacion + "Please select Which Apply.\n"
		error++
	}
	//miembero radio button
	if (!validateButton(myForm.RECEIPT_OPTION)) {
		validacion = validacion + "Please select Receipt Options.\n"
		error++;
	}
	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatevolunteers(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//datos personales
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//address
	if (myForm.txtCONTACT_ADDR.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}
	//zip code
	if (myForm.txtZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}	
	//city
	if (myForm.txtCITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	//state
	if (myForm.cboSTATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	//phone
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
 	//email
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatemembers(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//datos personales
	if (myForm.txtUser.value=="") {
		validacion = validacion + "Please complete Username.\n"
		error++;
	}
	//apellido
	if (myForm.txtPass.value=="") {
		validacion = validacion + "Please complete Password.\n"
		error++;
	}
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}

function validatemediaroom(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//datos personales
	if (myForm.txtName.value=="") {
		validacion = validacion + "Please complete Username.\n"
		error++;
	}
	//apellido
	if (myForm.txtPassword.value=="") {
		validacion = validacion + "Please complete Password.\n"
		error++;
	}
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}

function validatemembershipsignup(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//button $
	if (!validateButton(myForm.GIFT_MEMBERSHIP_TYPE)) {
		validacion = validacion + "Please select Membership Type.\n"
		error++;
	}
	//es gift membership
	if (getButtonValue(myForm.GIFT_MEMBERSHIP_TYPE, "Gift Membership")) {
		var gift=0;
		if (myForm.GIFT_MEMBERSHIP_FIRST_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_LAST_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_ADDR.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_ZIP_CD.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_CITY_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_STATE_CD.value=="") {
			gift++
			error++;
		}
		if (!validateButton(myForm.MAIL_TO)) {
			gift++
			error++;
		}
		if (gift>0) {
			validacion = validacion + "Please complete Gift Membership.\n"
		}
	}	
	//datos personales
	//MEMBERSHIP LEVELS
	var check=false;
	for (var i=0; i<8; i++) {
		var inputName = myForm["MembershipLevels$"+i];
		if (inputName.checked) {
			check=true;
		}
	}
	if (!check) {
		validacion = validacion + "Please select Membership Level.\n"
		error++
	}

	//datos personales primario
	if (myForm.PRIMARY_TITLE.value=="") {
		validacion = validacion + "Please select Title.\n"
		error++;
	}	
	if (myForm.PRIMARY_FIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.PRIMARY_LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
 	//email
	if (!isValidEmail(myForm.PRIMARY_EMAIL.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	if (myForm.PRIMARY_TELEPHONE.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
	if (myForm.PRIMARY_ADDR.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}	
	if (myForm.PRIMARY_ZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}	
	if (myForm.PRIMARY_CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	if (myForm.PRIMARY_STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	if (myForm.PRIMARY_BIRTH_DT.value=="") {
		validacion = validacion + "Please complete Date of birth.\n"
		error++;
	}	

	//tarjeta
	if (!validateButton(myForm.CARD_TYPE)) {
		validacion = validacion + "Please select Credit Card.\n"
		error++;
	}	
	if (myForm.CARD_NUMBER.value=="") {
		validacion = validacion + "Please complete Credit Card Number.\n"
		error++;
	}	
	if (myForm.CARD_EXPIRES.value=="") {
		validacion = validacion + "Please complete Credit Card Expiration date.\n"
		error++;
	}	
	if (myForm.NAME_ON_CARD.value=="") {
		validacion = validacion + "Please complete Credit Card Name on Card.\n"
		error++;
	}	


	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}

function validatedonationform(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//button $
	if (!validateButton(myForm.GIFT_AMOUNT)) {
		validacion = validacion + "Please select Gift Options.\n"
		error++;
	}
	//es other?
	if (getButtonValue(myForm.GIFT_AMOUNT, "other")) {
		if (myForm.OTHER.value=="") {
			validacion = validacion + "Please complete Gift Options Other value.\n"
			error++;
		}
	}	
	//datos personales
	if (myForm.FIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}

	if (myForm.TELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}		
 	//email
	if (!isValidEmail(myForm.EMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	if (myForm.ADDRESS.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}
	if (myForm.ZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}
	if (myForm.CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	if (myForm.STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}
	//miembero radio button
	if (!validateButton(myForm.MEMBER)) {
		validacion = validacion + "Please select MOLAA Member status.\n"
		error++;
	}
	//tarjeta
	if (!validateButton(myForm.CARD_TYPE)) {
		validacion = validacion + "Please select Credit Card.\n"
		error++;
	}	
	if (myForm.CARD_NUMBER.value=="") {
		validacion = validacion + "Please complete Credit Card Number.\n"
		error++;
	}	
	if (myForm.CARD_EXPIRES.value=="") {
		validacion = validacion + "Please complete Credit Card Expiration date.\n"
		error++;
	}	
	if (myForm.NAME_ON_CARD.value=="") {
		validacion = validacion + "Please complete Credit Card Name on Card.\n"
		error++;
	}		
	//recognition
	if (!validateButton(myForm.RECOGNITION_TYPE)) {
		validacion = validacion + "Please select Recognition.\n"
		error++;
	} 
	//es recognized?
	if (getButtonValue(myForm.RECOGNITION_TYPE, "Recognized")) {
		if (myForm.RECOGNITION_TEXT.value=="") {
			validacion = validacion + "Please complete Recognition.\n"
			error++;
		}
	}
	/*if (!myForm.Recognized.cheked && !myForm.NotRecognized.cheked) {
		validacion = validacion + "Please select Recognition.\n"
		error++;
	}*/
	//DESTINATIONS
	var check=false;
	for (var i=0; i<9; i++) {
		var inputName = myForm["DESTINATIONS$"+i];
		if (inputName.checked) {
			check=true;
		}
	}
	if (!check) {
		validacion = validacion + "Please select Which Apply.\n"
		error++
	}
	//miembero radio button
	if (!validateButton(myForm.RECEIPT_OPTION)) {
		validacion = validacion + "Please select Receipt Options.\n"
		error++;
	}
	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatevolunteers(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//datos personales
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//address
	if (myForm.txtCONTACT_ADDR.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}
	//zip code
	if (myForm.txtZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}	
	//city
	if (myForm.txtCITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	//state
	if (myForm.cboSTATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	//phone
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
 	//email
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatemembers(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//datos personales
	if (myForm.txtUser.value=="") {
		validacion = validacion + "Please complete Username.\n"
		error++;
	}
	//apellido
	if (myForm.txtPass.value=="") {
		validacion = validacion + "Please complete Password.\n"
		error++;
	}
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatetravelers(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	//button $
	if (!validateButton(myForm.GIFT_MEMBERSHIP_TYPE)) {
		validacion = validacion + "Please select Membership Type.\n"
		error++;
	}
	//es gift membership
	if (getButtonValue(myForm.GIFT_MEMBERSHIP_TYPE, "Gift Membership")) {
		var gift=0;
		if (myForm.GIFT_MEMBERSHIP_FIRST_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_LAST_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_ADDR.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_ZIP_CD.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_CITY_NM.value=="") {
			gift++
			error++;
		}
		if (myForm.GIFT_MEMBERSHIP_STATE_CD.value=="") {
			gift++
			error++;
		}
		if (!validateButton(myForm.MAIL_TO)) {
			gift++
			error++;
		}
		if (gift>0) {
			validacion = validacion + "Please complete Gift Membership.\n"
		}
	}	
	//datos personales
	//MEMBERSHIP LEVELS
	var check=false;
	for (var i=0; i<8; i++) {
		var inputName = myForm["MembershipLevels$"+i];
		if (inputName.checked) {
			check=true;
		}
	}
	if (!check) {
		validacion = validacion + "Please select Membership Level.\n"
		error++
	}

	//datos personales primario
	if (myForm.PRIMARY_TITLE.value=="") {
		validacion = validacion + "Please select Title.\n"
		error++;
	}	
	if (myForm.PRIMARY_FIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}
	//apellido
	if (myForm.PRIMARY_LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
 	//email
	if (!isValidEmail(myForm.PRIMARY_EMAIL.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	if (myForm.PRIMARY_TELEPHONE.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
	if (myForm.PRIMARY_ADDR.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}	
	if (myForm.PRIMARY_ZIP_CD.value=="") {
		validacion = validacion + "Please complete Zip Code.\n"
		error++;
	}	
	if (myForm.PRIMARY_CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	if (myForm.PRIMARY_STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	if (myForm.PRIMARY_BIRTH_DT.value=="") {
		validacion = validacion + "Please complete Date of birth.\n"
		error++;
	}	

	//tarjeta
	if (!validateButton(myForm.CARD_TYPE)) {
		validacion = validacion + "Please select Credit Card.\n"
		error++;
	}	
	if (myForm.CARD_NUMBER.value=="") {
		validacion = validacion + "Please complete Credit Card Number.\n"
		error++;
	}	
	if (myForm.CARD_EXPIRES.value=="") {
		validacion = validacion + "Please complete Credit Card Expiration date.\n"
		error++;
	}	
	if (myForm.NAME_ON_CARD.value=="") {
		validacion = validacion + "Please complete Credit Card Name on Card.\n"
		error++;
	}	


	//
	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatetour(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	
	//INSTITUTION_NM
	if (myForm.INSTITUTION_NM.value=="") {
		validacion = validacion + "Please complete Institution Name.\n"
		error++;
	}	
	//INSTITUTION_ADDR_1
	if (myForm.INSTITUTION_ADDR_1.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}	
	//INSTITUTION_ZIP_CD
	if (myForm.INSTITUTION_ZIP_CD.value=="") {
		validacion = validacion + "Please complete ZIP Code.\n"
		error++;
	}	
	//INSTITUTION_CITY_NM
	if (myForm.INSTITUTION_CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	//INSTITUTION_STATE_CD
	if (myForm.INSTITUTION_STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	
	//CONTACT_NM
	if (myForm.CONTACT_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}	
	//CONTACT_LAST_NM
	if (myForm.CONTACT_LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}	
	//CONTACT_DAYTIME_PHONE
	if (myForm.CONTACT_DAYTIME_PHONE.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}	
	//CONTACT_EMAIL_ADDR
	if (!isValidEmail(myForm.CONTACT_EMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	
	//TRIP_DT
	if (myForm.TRIP_DT.value=="") {
		validacion = validacion + "Please complete Date of your fieldtrip.\n"
		error++;
	}	
	//VISITORS_COUNT
	if (myForm.VISITORS_COUNT.value=="") {
		validacion = validacion + "Please select Number of visitors.\n"
		error++;
	}	
	//CHAPERONS_COUNT
	if (myForm.CHAPERONS_COUNT.value=="") {
		validacion = validacion + "Please select Number of chaperons.\n"
		error++;
	}	

	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}
function validatetouronly(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;
	
	//INSTITUTION_NM
	if (myForm.INSTITUTION_NM.value=="") {
		validacion = validacion + "Please complete Institution Name.\n"
		error++;
	}	
	//INSTITUTION_ADDR_1
	if (myForm.INSTITUTION_ADDR_1.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}	
	//INSTITUTION_ZIP_CD
	if (myForm.INSTITUTION_ZIP_CD.value=="") {
		validacion = validacion + "Please complete ZIP Code.\n"
		error++;
	}	
	//INSTITUTION_CITY_NM
	if (myForm.INSTITUTION_CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}	
	//INSTITUTION_STATE_CD
	if (myForm.INSTITUTION_STATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}	
	
	//CONTACT_NM
	if (myForm.CONTACT_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}	
	//CONTACT_LAST_NM
	if (myForm.CONTACT_LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}	
	//CONTACT_DAYTIME_PHONE
	if (myForm.CONTACT_DAYTIME_PHONE.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}	
	//CONTACT_EMAIL_ADDR
	if (!isValidEmail(myForm.CONTACT_EMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	
	//TRIP_DT
	if (myForm.TRIP_DT.value=="") {
		validacion = validacion + "Please complete Date of your fieldtrip.\n"
		error++;
	}	
	//VISITORS_COUNT
	if (myForm.VISITORS_COUNT.value=="") {
		validacion = validacion + "Please select Number of visitors.\n"
		error++;
	}	

	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}


function validatewedding(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;

	//txtFIRST_NM
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}	
	//txtLAST_NM
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//txtCONTACT_ADDR
	if (myForm.txtCONTACT_ADDR.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}
	//txtZIP_CD
	if (myForm.txtZIP_CD.value=="") {
		validacion = validacion + "Please complete ZIP Code.\n"
		error++;
	}
	//txtCITY_NM
	if (myForm.txtCITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}
	//cboSTATE_CD
	if (myForm.cboSTATE_CD.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}
	//txtTELEPHONE_TXT
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
	//txtEMAIL_ADDR
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}

	//txtGUEST_COUNT_TXT
	if (myForm.txtGUEST_COUNT_TXT.value=="") {
		validacion = validacion + "Please complete Guest Count.\n"
		error++;
	}
	//txtEVENT_DATE_TXT
	if (myForm.txtEVENT_DATE_TXT.value=="") {
		validacion = validacion + "Please complete Event Date.\n"
		error++;
	}

	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}

function validatecorporate(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;

	//txtFIRST_NM
	if (myForm.txtFIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}	
	//txtLAST_NM
	if (myForm.txtLAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//txtTELEPHONE_TXT
	if (myForm.txtTELEPHONE_TXT.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}
	//txtEMAIL_ADDR
	if (!isValidEmail(myForm.txtEMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	//txtEVENT_DATE_TXT
	if (myForm.txtEVENT_DATE_TXT.value=="") {
		validacion = validacion + "Please complete Event Date.\n"
		error++;
	}

	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}

function validateticket(myForm) {
	var validacion = "We encountered some problems processing the form.\nPlease complete all the required fields.\n\n";
	var error = 0;

	//TICKETS_COUNT
	if (myForm.TICKETS_COUNT.value=="") {
		validacion = validacion + "Please select Quantity.\n"
		error++;
	}	
	//FIRST_NM
	if (myForm.FIRST_NM.value=="") {
		validacion = validacion + "Please complete Name.\n"
		error++;
	}	
	//LAST_NM
	if (myForm.LAST_NM.value=="") {
		validacion = validacion + "Please complete Last Name.\n"
		error++;
	}
	//TELEPHONE
	if (myForm.TELEPHONE.value=="") {
		validacion = validacion + "Please complete Phone Number.\n"
		error++;
	}


	//EMAIL_ADDR
	if (!isValidEmail(myForm.EMAIL_ADDR.value)) {
		validacion = validacion + "Please enter a valid Email address.\n"
		error++
	}
	//ADDRESS
	if (myForm.ADDRESS.value=="") {
		validacion = validacion + "Please complete Address.\n"
		error++;
	}

	//ZIP_CD
	if (myForm.ZIP_CD.value=="") {
		validacion = validacion + "Please complete ZIP Code.\n"
		error++;
	}
	//CITY_NM
	if (myForm.CITY_NM.value=="") {
		validacion = validacion + "Please complete City.\n"
		error++;
	}
	//STATE_CD
	if (myForm.CITY_NM.value=="") {
		validacion = validacion + "Please select State.\n"
		error++;
	}
	//tarjeta
	if (!validateButton(myForm.CARD_TYPE)) {
		validacion = validacion + "Please select Credit Card.\n"
		error++;
	}	
	if (myForm.CARD_NUMBER.value=="") {
		validacion = validacion + "Please complete Credit Card Number.\n"
		error++;
	}	
	if (myForm.CARD_EXPIRES.value=="") {
		validacion = validacion + "Please complete Credit Card Expiration date.\n"
		error++;
	}	
	if (myForm.NAME_ON_CARD.value=="") {
		validacion = validacion + "Please complete Credit Card Name on Card.\n"
		error++;
	}		

	if (error==0) {
		
		return true
	} else {
		alert (validacion);
		return false
	}
}







