}
function lockoptions(form, master, subitems) {
- // subitems is an array of names of sub items
- // requires that each item in subitems has a
+ // Subitems is an array of names of sub items.
+ // Optionally, each item in subitems may have a
// companion hidden item in the form with the
- // same name but prefixed by "h"
+ // same name but prefixed by "h".
if (eval("document."+form+"."+master+".checked")) {
for (i=0; i<subitems.length; i++) {
unlockoption(form, subitems[i]);
function lockoption(form,item) {
eval("document."+form+"."+item+".disabled=true");/* IE thing */
- eval("document."+form+".h"+item+".value=1");
+ if(document.forms[form].elements['h'+item]) {
+ eval("document."+form+".h"+item+".value=1");
+ }
}
function unlockoption(form,item) {
eval("document."+form+"."+item+".disabled=false");/* IE thing */
- eval("document."+form+".h"+item+".value=0");
+ if(document.forms[form].elements['h'+item]) {
+ eval("document."+form+".h"+item+".value=0");
+ }
}
function submitFormById(id) {