function dfp_submit(event){
	event.preventDefault();
	var email_field = this.querySelector('[name="emailAddress"]');
	var sms_field = this.querySelector('[name="mobile_number"]');
	var signupcode_field = this.querySelector('[name="signupcode"]');
	var signupurl_field = this.querySelector('[name="signupurl"]');
	if(email_field != null)
	{
		var entered_email = email_field.value;
		var reg = /^[1-9a-zA-Z\-\_.]+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/;
		if(reg.test(entered_email) === true)
		{
			/*
			if(typeof top.gtag !== 'undefined')
			{
				var signupcode = (signupcode_field != null ? signupcode_field.value : null);
				var signupurl = (signupurl_field != null ? signupurl_field.value : null);
				top.gtag('event', 'signup_collection', {
					signupcode: signupcode,
					signupurl: signupurl
				});
			}
			if(typeof top.fbq !== 'undefined')
			{
				top.fbq('track', 'Lead');
			}
			*/
			var validation_field = document.createElement('input');
			validation_field.setAttribute('type', 'hidden');
			validation_field.setAttribute('name', 'submitted');
			validation_field.setAttribute('value', 1);
			this.appendChild(validation_field);
			this.submit();
			this.closest('.dfp_all').style.display = 'none';
		}
		else
		{
			if(entered_email === '')
			{
				email_field.validity.valid = false;
				email_field.setCustomValidity("You forgot to enter your email address");
				this.reportValidity();
			}
			else
			{
				email_field.validity.valid = false;
				email_field.setCustomValidity(entered_email+" is not a valid email address");
				this.reportValidity();
			}
		}
		return false;
	}
	if(sms_field != null)
	{
		var entered_sms = sms_field.value;
		var clean_sms = entered_sms.replace(/\D/g,'');
		if(clean_sms && clean_sms.length == 10)
		{
			var validation_field = document.createElement('input');
			validation_field.setAttribute('type', 'hidden');
			validation_field.setAttribute('name', 'lime_sms_submitted');
			validation_field.setAttribute('value', 1);
			this.appendChild(validation_field);
			this.submit();
			this.closest('.dfp_all').style.display = 'none';
		}
		else
		{
			if(entered_sms === '')
			{
				sms_field.validity.valid = false;
				sms_field.setCustomValidity("You forgot to enter your mobile number");
				form.reportValidity();
			}
			else
			{
				sms_field.validity.valid = false;
				sms_field.setCustomValidity('Please enter your 10-digit mobile number. Your entry has '+m.length+' digits.');
				form.reportValidity();
			}
		}
		return false;
	}
}