function CG_validateForm(theForm){
	for (i=0; i< theForm.length; i++){
		theField = theForm.elements[i];
		if(theField.id == "required"){
			if(theField.type == "select-one"){
				if(theField.options[theField.selectedIndex].value == ""){
					alert("Please Select " + theField.name + ".");
					theField.focus();
					return false;
				}
			}
			else{
				if(theField.value == ""){
					alert("Please Enter " + theField.name + ".");
					theField.focus();
					return false;
				}
			}
		}
		if(theField.id == "email"){
			if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theField.value))){
				alert("Email address is Incorrect");
				theField.focus();
				return false;
			}
		}
	}

	return true;
}
