I currently am creating a form where I allow the user to add new select lists on the fly. I do not want the new selects to have the options that are selected in any of the others. For example, if a user selected Windows in a select box, then Windows should not appear in any of the others.

As I see it, this involves doing 2 things:
1) Whenever I add a new select, I need to remove all elements that are selected in any other select.
2) Whenever I change the value of a select, I need to update every select to remove that option from the list and add the old one back in.

I have implemented part 1, but I would be welcome to ideas on how it could be done faster or cleaner:

Code JavaScript:
function addOSFields( dupID )
{
    var newField = document.getElementById(dupID).cloneNode(true);
    newField.id = '';
    newField.style.display = '';
 
    // Remove all of the options that are already selected from our menu
    var osTable = document.getElementById('os_add_table');
    var oss = osTable.getElementsByTagName('select');
    var selOS = getSelectedOS(oss);
    var opts = newField.getElementsByTagName('option');
    for( var i=0; i < selOS.length; i++  )
    {
        for( var j=0; j < opts.length; j++  )
        {
            if( selOS[i] == opts[j].value )
            {
                alert( "REMOVE " + selOS[i] );
                opts[j].parentNode.removeChild(opts[j]);
            }
        }
    }
 
    document.getElementById('os_add_table').firstChild.appendChild(newField);
}
 
function getSelectedOS( oss )
{
    var sel = new Array();
 
    // Get all of our OS selects and put their values in an array
    for( var i=0; i < oss.length; i++  )
    {
        if( oss[i].value )
        {
            sel[i] = oss[i].value;
        }
    }
 
    return sel;
}

As for the second part, I need to figure out a way to determine what is the value that must be added to all of my lists. Either that or I could replace all of the lists on the fly and just remove any of the selected items.

Any suggestions?