function ValidateCartQuantity(form, packsize) {
 var qty = parseInt(form.qty.value);
 packsize = (typeof packsize == "undefined") ? parseInt(form.packsize.value) : parseInt(packsize);
 if (isNaN(packsize)) packsize = 1;
 if (isNaN(qty)) {
  alert("Quantity must be a positive number");
  form.qty.value = packsize;
  form.qty.select();
  return false;
 }
 else if (qty <= 0) {
  alert("Quantity must be greater than 0");
  form.qty.value = packsize;
  form.qty.select();
  return false;
 }
 else if ((qty % packsize) != 0) {
  alert("Quantity must be in multiples of " + packsize + "\nThe next valid quantity has been\nselected for you");
  form.qty.value = qty + (packsize - (qty % packsize));
  form.qty.select();
  return false;
 }
 return true;
}
