function verifyForm(oForm) {
	var sError_message = ""
	var bSelect_ok = false
	var dToday = new Date();

	for (x=0;x<oForm.form_sections.length;x++) {
		switch (oForm.form_sections[x].value) {
			case 'UserDetails':
				// Personal Details
				if (oForm.uEmailAddress && oForm.uEmailAddress.value.length == 0) {
					sError_message = sError_message + "\n * Email was not entered";
				}
				if (oForm.uTitle && oForm.uTitle.value.length == 0) {
					sError_message = sError_message + "\n * Title was not entered";
				}
				if (oForm.uForenames && oForm.uForenames.value.length == 0) {
					sError_message = sError_message + "\n * First Name was not entered";
				}
				if (oForm.uSurname && oForm.uSurname.value.length == 0) {
					sError_message = sError_message + "\n * Last Name was not entered";
				}
				if (oForm.uCompany && oForm.uCompany.value.length == 0) {
					sError_message = sError_message + "\n * Company Name was not entered";
				}
				if (oForm.uJobTitle && oForm.uJobTitle.value.length == 0) {
					sError_message = sError_message + "\n * Your Position was not entered";
				}
				
				if (oForm.companytype) {
					bSelect_ok = false;
					for (i=0; i<oForm.companytype.length; i++) {
						if (oForm.companytype.options[i].selected && oForm.companytype.options[i].value.length != 0) {
							bSelect_ok = true;
						}
					}
					if (!bSelect_ok) {
						sError_message = sError_message + "\n * Company type was not entered";
					}
				}
				break;
			case 'PaymentDetails':
				// Payment Details	
				if (oForm.paymenttype){
					if (!isRadioChecked(oForm.paymenttype)) {
						sError_message = sError_message + "\n * A payment type was not selected"
					} else {
						// credit card
						if (radioValue(oForm.paymenttype) == 'card') {
							bSelect_ok = false
							for (i=0; i<oForm.cardtype.length; i++) {
								if (oForm.cardtype[i].checked) {
									bSelect_ok = true
								}
							}
							if (!bSelect_ok) {
								sError_message = sError_message + "\n * A credit card type was not selected"
							}
							if (oForm.cardnumber.value.length == 0) {
								sError_message = sError_message + "\n * A credit card number was not entered"
							}
							if (oForm.eYear[0].selected) {
								for (i=0; i<12; i++) {
									if (oForm.eMonth[i].selected) {
										if ( (i) < dToday.getMonth() ) {
											sError_message = sError_message + "\n * The credit card expiry date is invalid"
										}
									}
								}
							}
							if (oForm.securitycode.value.length == 0) {
								sError_message = sError_message + "\n * A credit card security code was not entered"
							}
				
						}
					}
				}
				break;
			case 'AreasOfInterest':
				// Areas of Interest
				if (oForm.areaofinterest) {
					bSelect_ok = false;
					for (i=0; i<oForm.areaofinterest.length; i++) {
						if (oForm.areaofinterest[i].checked) {
							bSelect_ok = true
						}
					}
					if (!bSelect_ok) {
						sError_message = sError_message + "\n * An area of interest was not selected"
					}
				}
				break;
			default:
				break;
		}
	}

	if (oForm.addresses) {
		// Delivery Address
		if (oForm.addresses.value.indexOf('|delivery|') != -1) {
			if (oForm.deliveryAddress1.value.length == 0) {
				sError_message = sError_message +  "\n * Address 1 was not entered" 
			}
			if (oForm.deliveryCity.value.length == 0) {
				sError_message = sError_message + "\n * City was not entered" 
			}
			if (oForm.deliveryPostcode.value.length == 0) {
				sError_message = sError_message + "\n * Postcode was not entered"
			}
			if (oForm.deliveryTel.value.length == 0) {
				sError_message = sError_message + "\n * Telephone was not entered"
			}
			
			bSelect_ok = false;
			for (i=0; i<oForm.deliveryCID.length; i++) {
				if (oForm.deliveryCID.options[i].selected) {
					bSelect_ok = true
				}
			}
			if (!bSelect_ok) {
				sError_message = sError_message + "\n * Country was not selected"
			}
		}	
		
		// Billing Address
		if (oForm.addresses.value.indexOf('|billing|') != -1) {
			if (oForm.billingAddress1.value.length == 0) {
				sError_message = sError_message +  "\n * Billing address 1 was not entered" 
			}
			if (oForm.billingCity.value.length == 0) {
				sError_message = sError_message + "\n * Billing city was not entered" 
			}
			if (oForm.billingPostcode.value.length == 0) {
				sError_message = sError_message + "\n * Billing postcode was not entered"
			}
			if (oForm.billingTel.value.length == 0) {
				sError_message = sError_message + "\n * Billing telephone was not entered"
			}
			
			bSelect_ok = false;
			for (i=0; i<oForm.billingCID.length; i++) {
				if (oForm.billingCID.options[i].selected) {
					bSelect_ok = true
				}
			}
			if (!bSelect_ok) {
				sError_message = sError_message + "\n * Billing country was not selected"
			}
		}	
		
		// Telephone Address
		if (oForm.addresses.value.indexOf('|telephone|') != -1) {
			if (oForm.telephoneTel.value.length == 0) {
				sError_message = sError_message + "\n * Telephone was not entered"
			}
		}	
	}
	
	// Terms and Conditions
	if (oForm.termsandconditions && !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;
	}
}
function showSecurityCode() {
	var newWindow3
	if (typeof(newWindow3) == 'object') {
		if (!newWindow2.closed) {
			newWindow3.close();
			newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
		} else {
			newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
		}
	} else {
		newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
	}
}
