anchor.diff:    if(i != -1) {
       adminArray.splice(i, 1);
     }
  +}
  +
  +function onRepresentativeSelectChange() {
  +  if(updateSelect2_representative) {
  +    updateSelect2_representative = false;
  +    return;
  +  }
  +  
  +  var selected_option = representativeSelect.find("option");
  +  var id = selected_option.attr("value");
  +  console.log(id);
  +  var name = selected_option.text();
  +  console.log(name);
  +
  +  addRepresentative(id, name);
  +
  +  selected_option.remove();
  +  updateSelect2_representative = true;
  +  representativeSelect.val(null).trigger('change');
   }
   
   function addRepresentative(id, name){
  
positive.code: 
  var adminArray = [-1<% @chair.admin_users.each do |admin| %>,<%= admin.id %><% end %>];
  var adminDiv = $( "#admins" );
  
  function addAdmin(id, name){
    if($.inArray(id,adminArray) == -1) {
      adminDiv.append("<div id=\"admin_"+id+"\"><li>"+name+" <a onClick=\"removeAdmin("+id+")\"><font color=\"red\">entfernen</font></a></li><input type=\"hidden\" name=\"admins["+id+"]\" value=\""+id+"\" /></div>");
      adminArray.push(id);
    }
    $('#search-box-admin').val("");
    $("#search-results-admin").hide();
  }
  
  function removeAdmin(id){
  
negative.code:           <% end %>
          </div>
  
          <select id="search_box_representative" name="q" type="text" class="form-control user-auto-complete" autocomplete="off" onchange="onRepresentativeSelectChange()"></select>
        </div>
      </div>
    </div>
  