
function ValidateForm() {

	var firstName = document.registrationForm.firstName.value;

	var lastName = document.registrationForm.lastName.value;

	var login = document.registrationForm.emailAddress.value;

	var comfirmEmailAddress = (document.getElementById("comfirmEmailAddress")).value;

	var address1 = document.registrationForm.address1.value;

	var city = document.registrationForm.city.value;

	var state = document.registrationForm.state.value;

	var postalCode = document.registrationForm.postalCode.value;

	var country = document.registrationForm.country.value;

	var fieldTrails = document.registrationForm.fieldTrails;
	var hunting = document.registrationForm.hunting;
	var huntTests = document.registrationForm.huntTests;

	var other = document.registrationForm.other;
	var breeds = document.registrationForm.influencerBreeds;

	//var OffersByEMailFlag = document.registrationForm.sd_optInTwo;

	//var SpecialMailingsFlag = document.registrationForm.sd_optInThree;

	var dayOfBirth = (document.getElementById("dayOfBirth")).value;

	var monthOfBirth = (document.getElementById("monthOfBirth")).value;

	var yearOfBirth = (document.getElementById("yearOfBirth")).value;
	

	
	var alertMessage = "";
	if (isEmptyString(firstName)) {
		alertMessage = alertMessage + "\n" + "Please enter first name";
	}
	if (isEmptyString(lastName)) {
		alertMessage = alertMessage + "\n" + "Please enter last name";
	}
	if (isEmptyString(login)) {
		alertMessage = alertMessage + "\n" + "Please enter email address";
	} else {
		if (eMailIDcheck(login)) {
			alertMessage = alertMessage + "\n" + "Please enter valid email address";
			loginError = true;
		}
	}
	if (!checkEqualString(login, comfirmEmailAddress)) {
		alertMessage = alertMessage + "\n" + "Please confirm the email address";
	}
	
	if (checkEqualString(monthOfBirth, "")) {
		alertMessage = alertMessage + "\n" + "Please enter month of birth";
	}
	if (checkEqualString(dayOfBirth, "")) {
		alertMessage = alertMessage + "\n" + "Please enter day of birth" + monthOfBirth;
	}
	if (checkEqualString(yearOfBirth, "")) {
		alertMessage = alertMessage + "\n" + "Please enter year of birth";
	}
	if (isEmptyString(address1)) {
		alertMessage = alertMessage + "\n" + "Please enter mailing address";
	}
	if (isEmptyString(city)) {
		alertMessage = alertMessage + "\n" + "Please enter city";
	}
	if (state == "None") {
		alertMessage = alertMessage + "\n" + "Please select state";
	}
	if (isEmptyString(postalCode)) {
		alertMessage = alertMessage + "\n" + "Please enter valid postal code";
	} else {			
		if(!isEmptyString(country)){
			if(country == "USA"){
				if (!validateZIP(postalCode)) {
					alertMessage = alertMessage + "\n" + "Please enter valid postal code";
				}
			}else{
				if (!isPostCode(postalCode)) {
					alertMessage = alertMessage + "\n" + "Please enter valid postal code";
				}	
			}	
		}
	}
	if (isEmptyString(country)) {
		alertMessage = alertMessage + "\n" + "Please enter country";
	}
	if (!fieldTrails.checked && !hunting.checked && !huntTests.checked && !other.checked) {
		alertMessage = alertMessage + "\n" + "Please select your interest as a sporting dog enthusiast";
	}
	if (breeds.length > 5) {
		alertMessage = alertMessage + "\n" + "Please do not select more than 5 breeds";
	}
	/*if (!radio_button_checker(OffersByEMailFlag)) {
		alertMessage = alertMessage + "\n" + "Please opt for offer by mail";
	}
	if (!radio_button_checker(SpecialMailingsFlag)) {
		alertMessage = alertMessage + "\n" + "Please opt for special mailing";
	}*/
	if (alertMessage != "") {
		alert(alertMessage);
		return false;
	}
	return true;
}


