Remove values from drop down lists
<p>Currently, I have two drop down lists that are populated with users' first and last names.  When a user is selected from the first drop down list, the name is unavailable in the second drop down list.</p>

<p>I would like to add a third drop down list that makes the values selected in the first and second lists unavailable.  How may I modify my current code to support this feature?</p>

<p>The current code may be found here:  <a href="http://jsfiddle.net/NfTNA/" rel="nofollow">http://jsfiddle.net/NfTNA/</a></p>

<pre><code>    function removeOptions(selectA,selectB,selectC) {
    var firstValue = $(selectA).children(":selected").attr("value");
    var secondValue = $(selectB).children(":selected").attr("value");
    var thirdValue = $(selectC).children(":selected").attr("value");
    // get the other element from the hidden select to put back
    var prior = $("#hiddenContainer").children("[value!="+secondValue+"]").data("prior");
    if (prior != undefined) {
        $("#hiddenContainer").children("[value!=" + secondValue + "]").insertAfter($(selectB).children("[value=" + prior.prior + "]"));
    }
    if (firstValue != 0) {
        // add the prior id data to the element before removing it
        var priorValue = $(selectB).children("[value="+firstValue+"]").prev().attr("value");
        $(selectB).children("[value="+firstValue+"]").data("prior",{prior:priorValue});

        // move the selected element of selectA in selectB to hidden select 
        $(selectB).children("[value="+firstValue+"]").appendTo("#hiddenContainer");
    }
    // reselect the option in the secondary select
    $(selectB).val(secondValue);

}
</code></pre>

<p>Thanks in advance.</p>
