<% if @obj %>
    $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
    $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_list',
                             :locals => {:obj => @obj,:object_flag =>  @obj_flag}) %>');
    $("#tags_name_<%=@obj.id%>").val("");
    $("#add_tag_<%=@obj.id%>").hide();
    $("#files_tag").html("<%= escape_javascript(render :partial => "files/subfield_tags", :locals => {:tag_list => @tag_list,:org_subfield => @org_subfield,:tag_name => @select_tag_name}) %>");
<% else %>
    $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'files/org_subfield_list',
        :locals => {org_subfield: @org_subfield,all_attachments: @all_attachments,sort:@sort,order:@order,org_subfield_attachments:@obj_attachments}) %>");
    $("#files_tag").html("<%= j(render :partial => "files/subfield_tags", :locals => {:tag_list => @tag_list,:org_subfield => @org_subfield,:tag_name => @tag_name}) %>")
<% end %>
