1 var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
\r
3 function addOption(theSel, theText, theValue)
\r
5 var newOpt = new Option(theText, theValue);
\r
6 var selLength = theSel.length;
\r
7 theSel.options[selLength] = newOpt;
\r
10 function deleteOption(theSel, theIndex)
\r
12 var selLength = theSel.length;
\r
15 theSel.options[theIndex] = null;
\r
19 function moveOptions(theSelFrom, theSelTo)
\r
22 var selLength = theSelFrom.length;
\r
23 var selectedText = new Array();
\r
24 var selectedValues = new Array();
\r
25 var selectedCount = 0;
\r
29 for(i=selLength-1; i>=0; i--)
\r
31 if(theSelFrom.options[i].selected)
\r
33 selectedText[selectedCount] = theSelFrom.options[i].text;
\r
34 selectedValues[selectedCount] = theSelFrom.options[i].value;
\r
35 deleteOption(theSelFrom, i);
\r
40 for(i=selectedCount-1; i>=0; i--)
\r
42 addOption(theSelTo, selectedText[i], selectedValues[i]);
\r
45 if(NS4) history.go(0);
\r
48 function selectAllOptions(id)
\r
51 for (var i=0; i<select.options.length; i++) {
\r
52 select.options[i].selected = true;
\r