anchor.diff:       %>
   
       <script type="text/javascript">
  +
           $("#moveRight").click(function() {
  -            alert("Handler for .click() called.");
  +            moveSelectedSurveys("available_surveys", "selected_surveys");
               return false;
           });
  +
  +
  +        $("#moveLeft").click(function() {
  +            moveSelectedSurveys("selected_surveys", "available_surveys");
  +            return false;
  +        });
  +
  +        function moveSelectedSurveys(sourceBoxId, targetBoxId){
  +            //Refer to this for jQuery help on select lists:
  +            // http://www.myphpetc.com/2009/03/jquery-select-elements-tips-and-tricks.html
  +
  +            // Get the value of the selected item
  +            var selectedSurveyIDs = $.map($("#" + sourceBoxId + " option:selected"), function(e){return $(e).val();});
  +            var selectedSurveyNames = $.map($("#" + sourceBoxId + " option:selected"), function(e){return $(e).text();});
  +
  +            // Add options to the target survey list
  +            for (var index in selectedSurveyIDs) {
  +                $("#" + targetBoxId).append("<option value='" + selectedSurveyIDs[index] + "'>" + selectedSurveyNames[index] + "</option>");
  +            }
  +
  +            // Remove options to the target survey list
  +            $("#" + sourceBoxId + " option:selected").remove();
  +        }
  +
       </script>
   
   <% end %>
  
positive.code: 
            <tr>
                  <td>
                  <%= select_tag "available_surveys", options_from_collection_for_select(@target_surveys, :id, :name) , {:multiple => true, :size => 25}  %>
                  </td>
  
                  <td>
  
negative.code:                 </td>
  
                  <td>
                  <%= select_tag "selected_surveys", "", {:multiple => true, :size => 25, :style => "width:400px"}  %>
                  </td>
            </tr>
  
  