// CONSTRUCTOR // Pass in the name of the element, then the names of the lists it depends on function DynamicOptionList() { if (arguments.length < 2) { alert("Not enough arguments in DynamicOptionList()"); } // Name of the list containing dynamic values this.target = arguments[0]; // Set the lists that this dynamic list depends on this.dependencies = new Array(); for (var i=1; i this.longestString.length) { this.longestString = arguments[i]; } this.numberOfOptions++; this.options[dependentValue][this.options[dependentValue].length] = arguments[i]; this.options[dependentValue][this.options[dependentValue].length] = arguments[i+1]; } } // Print dummy options so Netscape behaves nicely function DynamicOptionList_printOptions() { // Only need to write out "dummy" options for Netscape if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) <= 4)){ var ret = ""; for (var i=0; i