anchor.diff:    // var toggleFlag = 0;
     toggleAsteroidView(0);
   
  +  // select the sorting column
  +  var asteroidSortingDimension = designation; 
  +
     <% if @filter_type=="hazard" %>
  -    // impact2.filterRange([0.00009, 1.0]);
  -    // window.filter([null,null,null,null]);
  +    asteroidSortingDimension = impact2;
       window.danger();
     <% elsif @filter_type=="size"  %>
  +    asteroidSortingDimension = size;
       window.filter([[3500,10000],null,null,null]);
     <% elsif @filter_type=="near"  %>
  -    // window.filter([null,[0,20], [0.0,0.7], null]);
  +    asteroidSortingDimension = close_date;
       window.flyby();
     <% elsif @filter_type=="easy"  %>
  +    asteroidSortingDimension = energy;
       window.filter([null, null, null, [0.0,4.2]]);
  +  <% else %>
  +    asteroidSortingDimension = designation;
  +    window.filter([null, null, null, null]);
     <% end %> 
  +
     
  -  // start with showing table list, hiding highchart
  -  // var toggleFlag = 0;
  -  // toggleAsteroidView(0);
  -
  -  // renderAll();
  -
     // Renders the specified chart or list.
     function render(method) {
       d3.select(this).call(method);
  
positive.code:     //   date.exit().remove();
  
      div.each(function() {
        var asteroid = d3.select(this).selectAll(".asteroid")
            .data(designation.top(20), function(d) { 
                return d.index; 
            });
  
  
negative.code:     var currentDate = new Date();
  
      var day = currentDate.getDate();
      var month = currentDate.getMonth() + 1;
      var year = currentDate.getFullYear();
      var date1 = Date.UTC(year,month, day);
      //var date2 = Date.UTC(year, month+1, day);
      var date2 = date1 + 2592000000;  // milliseconds for 30 days
  