
function fill_select(url, target) {
    $.getJSON(url, function(data) {
        $.each(data, function(i,item) {
            text = item[1];
            if (item[2]) { text += '/' + item[2] };
            $("<option/>").attr("value", item[0]).text(text).appendTo(target);
        });
    });
}


function reset_select(target) {
    $(target).children().remove();
    $("<option/>").appendTo(target);
}
