And this is silly:
ni = eval('document.editFrm.numitems');
Think "eval is evil"! (It isn't 100% of the time, but it's a good rule.)
You don't need the eval() at all.
ni = document.editFrm.numitems;
Though I would point out that this means that you are using a named <form>.
<form>s with names are considered obsolete; you should be using in ID with each <form>, instead.