having issues filtering select option list with another select option list

having issues filtering select option list with another select option list

I have tested this and it works in FF but not in IE. I initially tried show and hide select options but that works only in FF. 

Does someone have a good example of how to remove and add back options into the select list?
My main confusion is how to get back the variables (like a reset button).

        $("#filterlist").change(function() {
           var filter = $(this).val();
           
           $("#mainlist option").each(function() {
              if (filter == "*"){
                 $(this).attr("disabled","");
              } else
              {
                 var match = $(this).text().search(new RegExp(filter, 'i'));
                 if (match != -1) {
                    $(this).attr("disabled","");
                 }
                 else{
                    $(this).attr("disabled","disabled");
                 }
              }
           });
        });