function do_move_top() {
    var min_rank = min_selected_rank();
    if (num_selected < 1) {
        alert("No choices were selected. "+
              "Click (or shift-click) to select choices");
        return;
    }
    //if (min_rank <= cur_top)
    cur_top = 1;
    scan_ranks();
    var collision = num_at_rank[min_rank];
    for (var i = 0; i < num_choices; i++) {
        if (selected[i]) {
            if (set_rank(i, cur_top)) i--;
        } else if (collision && rank[i] >= cur_top &&
                    rank[i] < min_rank &&
                    rank[i] < num_choices) {
            set_rank(i, rank[i] + 1);
        }
    }
    cur_top++;
    set_row_borders();
}
// move the suggested choices to the top ranking (1)
move the suggested choices to the top ranking (1)
move the suggested choices to the top ranking ( 1 )
function do_move_top() {
    var min_rank = min_selected_rank();
    if (num_selected < 1) {
        alert("No choices were selected. "+
              "Click (or shift-click) to select choices");
        return;
    }
    cur_top = 1;
    scan_ranks();
    var collision = num_at_rank[min_rank];
    for (var i = 0; i < num_choices; i++) {
        if (selected[i]) {
            if (set_rank(i, cur_top)) i--;
        } else if (collision && rank[i] >= cur_top &&
                    rank[i] < min_rank &&
                    rank[i] < num_choices) {
            set_rank(i, rank[i] + 1);
        }
    }
    cur_top++;
    set_row_borders();
}
function do_move_top ( ) { var min_rank = min_selected_rank ( ) ; if ( num_selected < 1 ) { alert ( "No choices were selected. " + "Click (or shift-click) to select choices" ) ; return ; } cur_top = 1 ; scan_ranks ( ) ; var collision = num_at_rank [ min_rank ] ; for ( var i = 0 ; i < num_choices ; i ++ ) { if ( selected [ i ] ) { if ( set_rank ( i , cur_top ) ) i -- ; } else if ( collision && rank [ i ] >= cur_top && rank [ i ] < min_rank && rank [ i ] < num_choices ) { set_rank ( i , rank [ i ] + 1 ) ; } } cur_top ++ ; set_row_borders ( ) ; }
move the suggested choices to the top ranking (1)
move the suggested choices to the top ranking ( 1 )
//if (min_rank <= cur_top)