var optionListCount=0; var optionListObjects = new Array(); //////////////////////////////////////////////////////////////////// function initOptionLists() { for(var i=0;i 0) { for(var i=0;i this.numberOfOptions[this.currentNodeDepth]) { this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length; } if(typeof(this.longestString[this.currentNodeDepth])=="undefined" ||(text.length > this.longestString[this.currentNodeDepth].length)) { this.longestString[this.currentNodeDepth] = text; } } this.currentNode = null;this.currentNodeDepth = 0; } /////////////////////////////////////////////////////////////////////////// function parent_addOptionsTextValue() { if(this.currentNode==null) { this.currentNode = this; } if(this.currentNode["options"] == null) { this.currentNode["options"] = new Array(); } for(var i=0;i this.numberOfOptions[this.currentNodeDepth]) { this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length; } if(typeof(this.longestString[this.currentNodeDepth])=="undefined" ||(text.length > this.longestString[this.currentNodeDepth].length)) { this.longestString[this.currentNodeDepth] = text; } } this.currentNode = null; this.currentNodeDepth = 0; } /////////////////////////////////////////////////////////////////////////// function parent_child(obj) { var listIndex = this.fieldListIndexes[obj.name]; var index = this.fieldIndexes[obj.name]; if(index <(this.fieldNames[listIndex].length-1)) { return this.form[this.fieldNames[listIndex][index+1]]; } return null; } /////////////////////////////////////////////////////////////////////////// function parent_setDefaultOptions() { if(this.currentNode==null) { this.currentNode = this; } for(var i=0;i0 && obj.selectedIndex>=0) { var o = obj.options[obj.selectedIndex]; this.populateChild(o.parentOption,child,usePreselected); this.selectChildOptions(child,usePreselected); } } else if(obj.type == "select-multiple") { var currentlySelectedOptions = new Array(); if(!usePreselected) { for(var i=0;i0) { obj.options[0].selected = true; } else if(!atLeastOneSelected && obj.type=="select-one") { obj.selectedIndex = -1; } } ///////////////////////////////////////////////////////////////////////////