
 // edit response from customer confirm about minimun quantity
  function editresp(desc) { 
        var min = 0;
        var ndx1 = 0;
	var numericExpression = /^[0-9]+$/;
	var confirmmsg = "";
        desc = (desc.toUpperCase());
	ndx1 = desc.indexOf('QTY'); 
	if (ndx1 == -1)
	    return "Y";     // there is no minimun quantity for this product
	ndx1 = ndx1 + 3;    //set index to first character after QTY
	min = (desc.substring(ndx1));  //get end of string
	// remove leading and trailing spaces
	min = trimString(min);
	// is the amount extracted numeric?
	if (min.match(numericExpression))
	{
	//if minimun quantity found, continue to next edit
	}else{			// minimum quantity not found
	    return "Y";
	}
	confirmmsg = ("To purchase this item at this price a minimum quantity of ");
        confirmmsg = confirmmsg + min + " must be purchased. Click OK to purchase this quantity, else Click Cancel.";
        var response = confirm(confirmmsg);

        if (response)	//got OK on quantity, so set Quantity to min
           return min; 
        return "N";
   }



