function verifyForm(oForm) {
	var sError_message = ""
	var bSelect_ok = false
	var dToday = new Date();

	// Personal Details
	if (oForm.email.value.length == 0) {
		sError_message = sError_message + "\n * Email was not entered"
		oForm.email.focus();
	}
	if (oForm.title.value.length == 0) {
		sError_message = sError_message + "\n * Title was not entered"
		oForm.title.focus();
	}
	if (oForm.firstname.value.length == 0) {
		sError_message = sError_message + "\n * First Name was not entered"
		oForm.firstname.focus();
	}
	if (oForm.lastname.value.length == 0) {
		sError_message = sError_message + "\n * Last Name was not entered"
		oForm.lastname.focus();
	}
	if (oForm.companyname.value.length == 0) {
		sError_message = sError_message + "\n * Company Name was not entered"
		oForm.companyname.focus();
	}
	if (oForm.jobtitle.value.length == 0) {
		sError_message = sError_message + "\n * Your Position was not entered"
		oForm.jobtitle.focus();
	}
	if (oForm.address1.value.length == 0) {
		sError_message = sError_message +  "\n * Address1 was not entered" 
	}
	if (oForm.address2.value.length == 0) {
		sError_message = sError_message + "\n * Address2 was not entered" 
	}
	if (oForm.city.value.length == 0) {
		sError_message = sError_message + "\n * City was not entered" 
	}
	if (oForm.postcode.value.length == 0) {
		sError_message = sError_message + "\n * Postcode was not entered"
	}
	
	bSelect_ok = false;
	for (i=0; i<oForm.country.length; i++) {
		if (oForm.country.options[i].selected) {
			bSelect_ok = true
		}
	}
	if (!bSelect_ok) {
		sError_message = sError_message + "\n * Country was not selected"
	}

	if (!oForm.termsandconditions.checked) {
		sError_message = sError_message + "\n * You cannot continue without agreeing to the terms and conditions." 
	}

	// show the error dialog or submit the form
	if (sError_message.length == 0) {
		return true;
	} else {
   	alert(sError_message);
   	return false;
	}
}

var bSubmited = false;

function submitFormDisable(oForm, sAction, sTarget, bIgnore_validation) {
	if ((bIgnore_validation || verifyForm(oForm)) && !bSubmited) {
		if (isFilled(sAction)) 
			oForm.action = sAction;
		
		if (isFilled(sTarget)) 
			oForm.target = sTarget;
		
		bSubmited = true;

		oForm.submit();
		
		oForm.target = '_self';
	} //else
		//return false;
}