function validate(f){
	
	var er = "";
	var erObj = false;
	
	if( f.first_name.value == "" ){
		er += " - First Name is required \n";
		if( !erObj ){ erObj = f.first_name; }
	}
	
	if( f.last_name.value == "" ){
		er += " - Last Name is required \n";
		if( !erObj ){ erObj = f.last_name; }
	}
	
	if( f.address.value == "" ){
		er += " - Address is required \n";
		if( !erObj ){ erObj = f.address; }
	}
	
	if( f.city.value == "" ){
		er += " - City is required \n";
		if( !erObj ){ erObj = f.city; }
	}
	
	if( f.state.value == "" ){
		er += " - State is required \n";
		if( !erObj ){ erObj = f.state; }
	}
	
	if( f.zip.value == "" ){
		er += " - Zip / Postal Code is required \n";
		if( !erObj ){ erObj = f.zip; }
	}
	
	if( f.country.value == "" ){
		er += " - Country is required \n";
		if( !erObj ){ erObj = f.country; }
	}
	
	if( f.phone.value == "" ){
		er += " - Telephone is required \n";
		if( !erObj ){ erObj = f.phone; }
	}
	
	if ( f.user_email.value == "" ) {
		er += " - Email Address is required \n";
		if( !erObj ){ erObj = f.user_email; }
	} else if( !isEmail(f.user_email.value) ){
		er += " - A Valid Email Address is required \n";
		if( !erObj ){ erObj = f.user_email; }
	}
	
	if ( !radioChecked(f.interest) ) {
		er += " - Please choose a product of interest \n";
		if( !erObj ){ erObj = f.interest[0]; }
	}
	
	if( f.primary_sport.value == "please choose" && f.other_sport.value == "" ){
		er += " - Primary Sport is required \n";
		if( !erObj ){ erObj = f.other_sport; }
	}
	
	if( !f.magazine.checked && !f.friend_coach.checked && !f.used_one.checked && !f.search.checked && !f.other.checked ){
		er += " - Please let us know how you heard about us \n";
		if( !erObj ){ erObj = f.magazine; }
	} else if ( f.magazine.checked && f.adcode.value == "" && f.magazine_name.value == "" ) {
		er += " - Please tell us more information about the magazine \n";
		if( !erObj ){ erObj = f.adcode; }
	} else if ( f.search.checked && f.keywords.value == "" ) {
		er += " - Please tell us the search keywords you used \n";
		if( !erObj ){ erObj = f.keywords; }
	} else if ( f.other.checked && f.otherheard.value == "" ) {
		er += " - Please let us know how you heard about us \n";
		if( !erObj ){ erObj = f.otherheard; }
	}
	
	
/*	if( f.lName.value == "" ){
		er += " - Last Name is required \n";
		if( !erObj ){ erObj = f.lName; }
	}
	if( f.addr.value == "" ){
		er += " - Address is required \n";
		if( !erObj ){ erObj = f.addr; }
	}
	if( f.city.value == "" ){
		er += " - City is required \n";
		if( !erObj ){ erObj = f.city; }
	}
	if( f.state.value == "" ){
		er += " - State or Province is required \n";
		if( !erObj ){ erObj = f.state; }
	}
	if( (f.zip.value == "") && ((f.country[f.country.selectedIndex].text == "United States") || (f.country[f.country.selectedIndex].text == "Canada")) ){
		er += " - Zip/Postal Code is required \n";
		if( !erObj ){ erObj = f.zip; }
	}
	if( f.country[f.country.selectedIndex].text == "Select Country" ){
		er += " - Country is required \n";
		if( !erObj ){ erObj = f.country; }
	}
	
	if( f.dayPhone.value == "" ){
		er += " - Daytime Phone Number is required \n";
		if( !erObj ){ erObj = f.dayPhone; }
	}
	
*/
	
	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
	
}

/*
function ValidateCart2(f){
	
	var er = "";
	var erObj = false;

	if( !isEmail(f.emailAddr.value) ){
		er += " - a valid Email Address is required \n";
		if( !erObj ){ erObj = f.emailAddr; }
	}
	 
	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
	
}

function ValidateCart3(f){
	
	var er = "";
	var erObj = false;

	if( f.fName.value == "" ){
		er += " - First Name is required \n";
		if( !erObj ){ erObj = f.fName; }
	}
	if( f.lName.value == "" ){
		er += " - Last Name is required \n";
		if( !erObj ){ erObj = f.lName; }
	}
	if( f.addr.value == "" ){
		er += " - Address is required \n";
		if( !erObj ){ erObj = f.addr; }
	}
	if( f.city.value == "" ){
		er += " - City is required \n";
		if( !erObj ){ erObj = f.city; }
	}
	if( f.state.value == "" ){
		er += " - State or Province is required \n";
		if( !erObj ){ erObj = f.state; }
	}
	if( (f.zip.value == "") && ((f.country[f.country.selectedIndex].text == "United States") || (f.country[f.country.selectedIndex].text == "Canada")) ){
		er += " - Zip/Postal Code is required \n";
		if( !erObj ){ erObj = f.zip; }
	}
	if( f.country[f.country.selectedIndex].text == "Select Country" ){
		er += " - Country is required \n";
		if( !erObj ){ erObj = f.country; }
	}
if( f.dayPhone.value == "" ){
		er += " - Daytime Phone Number is required \n";
		if( !erObj ){ erObj = f.dayPhone; }
	}
	
	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
	
}

function ValidateCart4(f){
	
	var er = "";
	var erObj = false;

	if( f.fName.value == "" ){
		er += " - First Name is required \n";
		if( !erObj ){ erObj = f.fName; }
	}
	if( f.lName.value == "" ){
		er += " - Last Name is required \n";
		if( !erObj ){ erObj = f.lName; }
	}
	if( f.addr1.value == "" ){
		er += " - Address is required \n";
		if( !erObj ){ erObj = f.addr1; }
	}
	if( f.city.value == "" ){
		er += " - City is required \n";
		if( !erObj ){ erObj = f.city; }
	}
	if( f.state.value == "" ){
		er += " - State or Province is required \n";
		if( !erObj ){ erObj = f.state; }
	}
	if( (f.zip.value == "") && ((f.country[f.country.selectedIndex].text == "United States") || (f.country[f.country.selectedIndex].text == "Canada")) ){
		er += " - Zip/Postal Code is required \n";
		if( !erObj ){ erObj = f.zip; }
	}
	if( f.country[f.country.selectedIndex].text == "Select Country" ){
		er += " - Country is required \n";
		if( !erObj ){ erObj = f.country; }
	}
	if( f.dayPhone.value == "" ){
		er += " - Daytime Phone Number is required \n";
		if( !erObj ){ erObj = f.dayPhone; }
	}
	
	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
	
}

function ValidateCart5(f){
	
	var er = "";
	var erObj = false;

	if( f.payMethod.value == "cc" ){

		if( f.ccType.value == "" ){
			er += " - Credit Card is required \n";
			if( !erObj ){ erObj = f.ccType; }
		}
	
		var cardNumber = stripSpaces(f.ccNum.value);
		if( cardNumber == "" || !isNumber(cardNumber) || cardNumber.length < 13 || cardNumber.length > 16){
			er += " - Credit Card Number is required (13-16 digits)\n";
			if( !erObj ){ erObj = f.ccNum; }
		}
	
		cvvLen = stripSpaces(f.ccCVV.value);
		cvvLen = cvvLen.length;
		if( isEmpty( f.ccCVV.value ) || cvvLen < 3 || cvvLen > 4 || !isNumber(f.ccCVV.value)){
			er += " - CVV Code is required (3-4 digits)\n";
			if( !erObj ){ erObj = f.ccCVV; }
		}
	
		if( !isNumber(f.ccExpMonth.value) ){
			er += " - Expiration Month is required \n";
			if( !erObj ){ erObj = f.ccExpMonth; }
		}
	
		if( !isNumber(f.ccExpYear.value) ){
			er += " - Expiration Year is required \n";
			if( !erObj ){ erObj = f.ccExpYear; }
		}
	
		if( f.ccName.value == "" ){
			er += " - Name on Card is required \n";
			if( !erObj ){ erObj = f.ccName; }
		}

	} else if ( f.payMethod.value == "chk" ) {

		if( f.chkNum.value == "" ){
			er += " - Check Number is required \n";
			if( !erObj ){ erObj = f.chkNum; }
		}

		if( f.chkType.value == "" ){
			er += " - Check Type is required \n";
			if( !erObj ){ erObj = f.chkType; }
		}

	} else if ( f.payMethod.value == "po" ) {

		if( f.poNum.value == "" ){
			er += " - P.O. Number is required \n";
			if( !erObj ){ erObj = f.poNum; }
		}

		if( f.poPhone1.value == "" ){
			er += " - Office Phone Number is required \n";
			if( !erObj ){ erObj = f.poPhone1; }
		}

		if( f.poPhone2.value == "" ){
			er += " - Ordering Phone Number is required \n";
			if( !erObj ){ erObj = f.poPhone2; }
		}

	}

	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }

}

function ValidateIntlShip(f){
	
	var er = "";
	var erObj = false;

	if( !f.chkIntlShipReq.checked && f.shipQuote.value == "" ){
		er += " - You have not chosen a shipping option \n";
		if( !erObj ){ erObj = f.shipQuote; }
	}

	if( !f.chkIntlShipReq.checked && f.shipQuote.value != "" && isNaN(f.shipQuote.value) ){
		er += " - The shipping quote must be a numeric value \n";
		if( !erObj ){ erObj = f.shipQuote; }
	}

	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
}

function ValidateProduct(f){
	
	var er = "";
	var erObj = false;

	if( isNaN(f.price.value) ){
		er += " - Price must be a numeric value \n";
		if( !erObj ){ erObj = f.price; }
	}

	if( isNaN(f.weight.value) ){
		er += " - Weight must be a numeric value \n";
		if( !erObj ){ erObj = f.weight; }
	}

	if( isNaN(f.sale_price.value) ){
		er += " - Sale Price must be a numeric value \n";
		if( !erObj ){ erObj = f.sale_price; }
	}

	if( isNaN(f.flat_ship_ground_rate.value) ){
		er += " - Flat Ground Rate must be a numeric value \n";
		if( !erObj ){ erObj = f.flat_ship_ground_rate; }
	}

	if( isNaN(f.flat_ship_two_day_rate.value) ){
		er += " - Flat 2-Day Rate must be a numeric value \n";
		if( !erObj ){ erObj = f.flat_ship_two_day_rate; }
	}

	if( isNaN(f.flat_ship_one_day_rate.value) ){
		er += " - Flat Next Day Rate must be a numeric value \n";
		if( !erObj ){ erObj = f.flat_ship_one_day_rate; }
	}

	if( isNaN(f.flat_ship_special_loc_rate.value) ){
		er += " - Flat Special Rate must be a numeric value \n";
		if( !erObj ){ erObj = f.flat_ship_special_loc_rate; }
	}

	if( isNaN(f.mach_ship_ground_rate.value) ){
		er += " - Flat Ground Rate with Units must be a numeric value \n";
		if( !erObj ){ erObj = f.mach_ship_ground_rate; }
	}

	if( isNaN(f.mach_ship_two_day_rate.value) ){
		er += " - Flat 2-Day Rate with Units must be a numeric value \n";
		if( !erObj ){ erObj = f.mach_ship_two_day_rate; }
	}

	if( isNaN(f.mach_ship_one_day_rate.value) ){
		er += " - Flat Next Day Rate with Units must be a numeric value \n";
		if( !erObj ){ erObj = f.mach_ship_one_day_rate; }
	}

	if( isNaN(f.mach_ship_special_loc_rate.value) ){
		er += " - Flat Special Rate with Units must be a numeric value \n";
		if( !erObj ){ erObj = f.mach_ship_special_loc_rate; }
	}

	if( er == "" ){ return true; }else{ formError( er, erObj ); return false; }
}

function formError( message, obj ){
	var out = "Form is incomplete\n============================\n\n";
	out += message;
	alert( out );
	if( obj ){
		obj.focus(); 
	}
	return;
}
*/
