<!-- // engage cloaking device

function validate(frmName){
	// RL 08/02/2002 for CharStar
	// Simple Form Validation
	var VALID = true;
	var strList = "";
	var frmEl = "";
	var nvc = 1;
	var excl = false;
	var exclusions = ['country','enquiry','telephone']; // field NOT to be validated
	
	/**
	* Scans through all the elements in the form. Checks to see whether the field is required
	* if required and empty then field is added to the error message at the end
	*/
	for(i = 0; i < frmName.length; i++){
		frmEl = frmName.elements[i];
		excl = false;
		// Check to see whether this is a required field
		for(j=0; j < exclusions.length; j++){if(frmEl.name == exclusions[j]){excl = true;}}
	
		// if the field is required (i.e. not excluded) then add its details to the message
		if(!excl){
			if(frmEl.value == ''){
				strList += "\n\t" + nvc++ + ". " + frmEl.name + "\n";
				VALID = false;
			}
		}
	}	
	// if the form has not been filled in correctly, display message and stop form submission
	if(!VALID){
		alert("Please fill in the required information listed below: \n" + strList);
	}
	// else just exit function naturally
	return VALID
}

function checkEmail(frmField){
	if((frmField.value != '')&&((frmField.value.indexOf('@') < 0) || (frmField.value.indexOf('.') < 0))){
		alert("This email address is not correct. \n Please update it");
		frmField.focus();
		return false;
	}
}

function checkTel(frmField){
	// remove spaces and any other non-numeric characters
	frmField.value = frmField.value.replace(/[^0-9 ]/g,"");
}

function processForm(){
	checkTel(document.frmContact.telephone);
	return validate(document.frmContact);
}
// disengage -->