    function validateForm()
    {
	formObj = document.MeasuringKitOrderForm;

	//Email Address
	if (formObj.A1.value == "") {	
		alert("Please fill in the email address field.");
		formObj.A1.focus();
		return false;
	}

	//Email Address
	var emailAddress=formObj.A1.value;
	if ((emailAddress.indexOf('@') == -1) || (emailAddress.indexOf('.') == -1)) {	
		alert("The email address does not appear to be valid.");
		formObj.A1.focus();
		return false;
	}

	//Name
	if (formObj.A2.value == "") {	
		alert("Please fill in the name field.");
		formObj.A2.focus();
		return false;
	}

	//Address
	if (formObj.A3.value == "") {	
		alert("Please fill in the address field.");
		formObj.A3.focus();
		return false;
	}

	//City
	if (formObj.A4.value == "") {	
		alert("Please fill in the city field.");
		formObj.A4.focus();
		return false;
	}

	//State
	if (formObj.A5.value == "") {	
		alert("Please fill in the state field.");
		formObj.A5.focus();
		return false;
	}

	//ZipCode
	if (formObj.A6.value == "") {	
		alert("Please fill in the zipcode field.");
		formObj.A6.focus();
		return false;
	}

	//Phone
	if (formObj.A7.value == "") {	
		alert("Please fill in the phone number field.");
		formObj.A7.focus();
		return false;
	}

	//Credit Card No - Value
	if (formObj.B2.value == "") {	
		alert("Please fill in the credit card number field.");
		formObj.B2.focus();
		return false;
	}

	//Credit Card No - Length
	if (formObj.B2.value.length < 15) {	
		alert("The credit card number does not appear to be valid.");
		formObj.B2.focus();
		return false;
	}

	//Exp Date
	if (formObj.B3.value == "") {	
		alert("Please fill in the expiration date field.");
		formObj.B3.focus();
		return false;
	}

	//Exp Date - Length
	//if (formObj.B3.value != 5) {	
	//	alert("The expiration date does not appear to be valid.");
	//	formObj.B3.focus();
	//	return false;
	//}

	//Billing Address
	//If they fill out at least one of the fields in this group
	//then require all of the fields in that group
	if ((formObj.C1.value != "") || (formObj.C2.value != "") ||
		 (formObj.C3.value != "") || (formObj.C4.value != "") ||
		(formObj.C5.value != ""))
	{
		//Billing Name
		if (formObj.C1.value == "") {	
			alert("Please fill in the name field.");
			formObj.C1.focus();
			return false;
		}

		//Billing Address
		if (formObj.C2.value == "") {	
			alert("Please fill in the address field.");
			formObj.C2.focus();
			return false;
		}

		//Billing City
		if (formObj.C3.value == "") {	
			alert("Please fill in the city field.");
			formObj.C3.focus();
			return false;
		}

		//Billing State
		if (formObj.C4.value == "") {	
			alert("Please fill in the state field.");
			formObj.C4.focus();
			return false;
		}

		//Billing ZipCode
		if (formObj.C5.value == "") {	
			alert("Please fill in the zipcode field.");
			formObj.C5.focus();
			return false;
		}
	}

	//First Style Length
	if (formObj.D2.value == "") {	
		alert("Please fill in the front length of the piece you will be measuring.");
		formObj.D2.focus();
		return false;
	}

	//First Style Width
	if (formObj.D3.value == "") {	
		alert("Please fill in the front width of the piece you will be measuring.");
		formObj.D3.focus();
		return false;
	}

	//Front Picture
	if (formObj.FILEFRONT.value == "") {	
		alert("Please choose an image for the front view.");
		formObj.D3.focus();
		return false;
	}

	//Back Picture
	if (formObj.FILEBACK.value == "") {	
		alert("Please choose an image for the back view.");
		formObj.D3.focus();
		return false;
	}

	//Side Picture
	if (formObj.FILESIDE.value == "") {	
		alert("Please choose an image for the side view.");
		formObj.D3.focus();
		return false;
	}

    }
