function validatePick4() {							
	var errMsg = "";
	var itemQty = $("#qty").val();
	
	$("#youpick4_bar,#youpick4_body,#youpick4_mist,#youpick4_wash").each(function() {																		
		if (this.value == "") {
			errMsg = "Please select a blend for each product!";										
		}
	});
	
	//validate qty
	if (!errMsg.length) {		
		if (isNaN(itemQty) || itemQty == '') {				
			errMsg = "Please enter a numeric quantity and try again.";
		}				
	}
								
	if (errMsg.length) {
		alert(errMsg);
		return false;
	}
	else {
		return true;
	}
}	
							
							
function addPick4(objForm) {
	if (!validatePick4()) return false;
								
	//get blends
	var barblend = $("#youpick4_bar").val();
	var bodyblend = $("#youpick4_body").val();
	var mistblend = $("#youpick4_mist").val();								
	var washblend = $("#youpick4_wash").val();
								
	//build parameters
	var params = "method=CreateYouPick4";
	params += "&barblend=" + escape(barblend);
	params += "&bodyblend=" + escape(bodyblend);
	params += "&mistblend=" + escape(mistblend);
	params += "&washblend=" + escape(washblend);
	//alert(params);
								
	//lookup product for youpick4
	$.ajax({
		type: "POST",
		url: "/shopping/youpick.cfm",									
		data: params,
		dataType: "html",
		async: false,
		success: function(strProductID, textStatus) {
			//alert(strProductID);
			if (strProductID != "") {
				$("#productID").val(strProductID); //set productID in form
				addToCart(objForm); //see store_functions.js								
			}			
			else { //unexpected failure
				alert("An unexpected error occurred while adding your product.  Please try again.  If the problem continues, please contact us!")				
			}
		},
		error: function(XMLHttpRequest, textStatus, errorThrown){						
			alert("An unexpected error occurred.  Please try again.  If the problem continues, please contact us!")			
		}									
	}); //$.ajax({																																																				
}
