Copy the scripts into the head area plus this line:
Here we have two products, the first has a minimum order quantity of 25, the second is 50. Click on the first button, then the second to confirm this.
As we have two minimum qty values, we have to have two scripts controlling this element, right click on the page/view page source.
To start, use a different form and name for each minimum, so if one set of products has a minimum of 25 and another set has 50 as with this page, we have to create two forms. The key is linking each form to each script, we do this by giving each form a name... name="Form1" name="Form2". For the second form, change the form name to suit and the return ChkQty(this) to return ChkQty2(this) or the next form number you're using.
So that's the forms taken care of, now let's look at the scripts... The first script has three lines needing your attention and altering:
F = document.Form;
F.qty.value = Number(F.qty1.value) + Number(F.qty2.value);
The values for these lines are fairly self explanatory if you look at the difference between the first form/script and the second.
You can make the text qty box hidden if you want to.