$('select').change(function() {
reEvaluateAvailableOptions();
});
function reEvaluateAvailableOptions() {
var selectElements = $('#select1, #select2,#select3, #select4, #select5');
var selectedValues = [];
selectElements.each(function() {
var value = $(this).val();
value >= 0 && selectedValues.push(value);
});
selectElements.each(function() {
var currentValue = $(this).val();
$(this).children('option')
.removeAttr("disabled")
.each(function() {
var value = this.value;
if (selectedValues.indexOf(value) >= 0 && currentValue != value) {
$(this).attr('disabled', "disabled");
}
});
});
}