//==  promo validation
var msgOfferDetails = "Please tick the box to indicate that you have read and understood the offer details";
var msgPromoCode = "Promotional code not recognised, please check you have the correct code as printed in the newspaper and re-enter it";

function checkFormPromo() {
var objOfferTermsAccept = document.forms[1].offer_terms;
var glbPromoCode = "PROMO";
var objPromoCode = glbGetElementById(glbPromoCode);
var strPromoCode = getFieldValue(objPromoCode);
// change the string to lower case so it doesn't matter how it was entered
var strPromoCodeLC = strPromoCode.toLowerCase();

// define the codes you want to check against here
// EXAMPLE var codes = new Array ("men1","men2","men3");
var codes = new Array ("lowcostcities","lowcostsun","lowcostfun","lowcostfaro","lowcostparty","lowcostski","lowcostcanaries","lowcostcity","lowcostbeach","lowcostspain","lowcostbreak","lowcostgetaway");
var codeMatch = false;

	if (!objOfferTermsAccept.checked) {	//==	The user has not ticked the Offer Details box
		alert (msgOfferDetails);
		objOfferTermsAccept.focus();
		return false;
	}
	// now check to see that the code entered is a valid code
	for (i = 0; i < codes.length; i++) {
		if (strPromoCodeLC == codes[i]) {
			codeMatch = true;
		}
	}
	if (!codeMatch) {
		alert (msgPromoCode);
		objPromoCode.focus();
		return false;
	}
	return true;
}