if (typeof (EIS) == 'undefined') EIS = {};

EIS.DOM = new function() {

var n = 0;

    this.outparam = outparam;
    this.addOption = addOption;
    this.removeAllOptions = removeAllOptions;
    this.removeSelectedOption = removeSelectedOption;

    
    function outparam() {
        this.array = new Array(1);

        this.setValue = function(setto) { this.array[0] = setto; }
        this.getValue = function() { return this.array[0]; }
    }

    function addOption(selectbox, text, value, classname) {
        var optn = document.createElement("OPTION");
        optn.text = text;
        optn.value = value;
        if (classname) {optn.className=classname};
        selectbox.options.add(optn);
    };

    function removeAllOptions(selectbox) {
        var i;
        for (i = selectbox.options.length - 1; i >= 0; i--) {
            selectbox.remove(i);
        }
    };


    function removeSelectedOption(selectbox) {
        var i;
        for (i = selectbox.options.length - 1; i >= 0; i--) {
            if (selectbox.options[i].selected)
                selectbox.remove(i);
        }
    }


}
