/**************************************** CampaignBuilder.js ****************************************************
'Author(s)			: Victor Joseph
'Date				: May 29, 2008
'Version			: v1.0.0
'Description		: Validation for Campaign member accq page AFFID : 59946 www.hotelclub.com/mook/ - /hotelclub/mook/  
'Called From		: /Hotelclub/mook/default.asp
****************************************************************************************************************/

function FormSubmit(btn) {
	var formObj = btn.form

	with (formObj)
	{
		if (isEmpty(fname, "", fname_val.value)) return;
		//if (charCheck(fname, langMsg_val.value)) return;

		if (isEmpty(lname, "", lname_val.value)) return;
        //if (charCheck(lname, langMsg_val.value)) return;

		if (isEmpty(email, "", email_val.value)) return;
		if (notEmail(email, "", emailnotvalid_val.value)) return;

		if (typeof emailconfirm != "undefined" && typeof emailconfirm_req != "undefined") {
			if (email.value != emailconfirm.value) {
				alert(emailreconfirm_val.value)
				emailconfirm.focus() 
				return
			}
		}

		if (typeof password != "undefined" && typeof password_req != "undefined") {
			if (isEmpty(password, "", password_val.value)) return;
			//if (charCheck(password, langMsg_val.value)) return;
		}

		if (typeof cpassword != "undefined" && typeof cpassword_req != "undefined") {
			if (password.value != cpassword.value) {
				alert(passwordreconfirm_val.value)
				cpassword.focus() 
				return
			}
		}

        if (typeof address != "undefined") {
			//if (charCheck(address, langMsg_val.value)) return;
			if (typeof address_req != "undefined") {
			    if (isEmpty(address, "", address_val.value)) return;
			}
		}

		if (typeof city != "undefined") {
			//if (charCheck(city, langMsg_val.value)) return;
			if (typeof city_req != "undefined") {
                if (isEmpty(city, "", city_val.value)) return;			
			}
		}

		if (typeof state != "undefined") {
			//if (charCheck(state, langMsg_val.value)) return;
			if (typeof state_req != "undefined") {
                if (isEmpty(state, "", state_val.value)) return;			
			}
		}

		if (typeof postcode != "undefined" && typeof postcode_req != "undefined") {
			if (isEmpty(postcode, "", postcode_val.value)) return;
		}

		if (typeof countryid != "undefined" && typeof country_req != "undefined") {
			if (notSelected(countryid, "", country_val.value)) return
		}
		
		if (typeof memlang != "undefined" && typeof memlang_req != "undefined") {
			if (notSelected(memlang, "", memlang_val.value)) return
		}


		if (typeof iaccept != "undefined" && typeof iaccept_req != "undefined") {
			if (!iaccept.checked) {
				alert(iaccept_val.value);
				iaccept.focus();
				return;
			}
		}
	}
	
	formObj.submit()
}
