    <h2><%= betrieb.confidentiable_value('name','Facility') %></h2>



    <div id="article-links">
      <% if betrieb.confidential? || betrieb['geo_x'].nil? || betrieb['geo_y'].nil? %>
        <p class="confidential">Facility location is confidential</p>
      <% else %>
        <img src="PATH-DETAIL-MAP?mode=MAP&MAPXY=<%= betrieb['geo_x'] %>+<%= betrieb['geo_y'] %>&BUFFER=1500&map_size=330+238" alt="Map section with facility location">
      <% end %>
    </div>
    <div id="article-rechts">

      <table class="betrieb-daten">
        <tbody>
          <tr>

            <td class="td-0"><p><b>Identification Code</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_html_value('kennnr') %></td>

          </tr>
          <tr>
            <td class="td-0"><p><b>Reporting year</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_html_value('jahr') %></td>

          </tr>
          <tr>
            <td class="td-0"><p><b>Address</b></p></td>

            <td class="td-1"><%= betrieb.wrapped_confidentiable_value('address') %></td>
          </tr>
          <tr>
            <td class="td-0"><p><b>Federal state</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_html_value('buland') %></td>
          </tr>
          <tr>

            <td class="td-0"><p><b>River basin district</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_html_value('flusseinzugsgebiet') %></td>
          </tr>

          <tr>
            <td class="td-0"><p><b>Parent company name</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_confidentiable_value('muttergesellschaft') %></td>

          </tr>
          <tr>
            <td class="td-0"><p><b>Owner</b></p></td>
            <td class="td-1"><%= betrieb.wrapped_confidentiable_value('eigname') %></td>

          </tr>
          <tr>
            <td class="td-0"><p><b>Operator</b></p></td>

            <td class="td-1"><%= betrieb.wrapped_confidentiable_value('betname') %></td>
          </tr>
          <% if betrieb['prodvol'] %>
            <tr>
              <td class="td-0"><p><b>Production volume</b></p></td>
              <td class="td-1"><%= betrieb.wrapped_confidentiable_value('prodvol','<p></p>') %></td>
            </tr>
          <% end %>
          <% if betrieb['anlzahl'] %>
            <tr>
              <td class="td-0"><p><b>Number of installations</b></p></td>
              <td class="td-1"><%= betrieb.wrapped_confidentiable_value('anlzahl','<p></p>') %></td>
            </tr>
          <% end %>
          <% if betrieb['betriebh'] %>
            <tr>
              <td class="td-0"><p><b>Number operating hours/year</b></p></td>
              <td class="td-1"><%= betrieb.wrapped_confidentiable_value('betriebh','<p></p>') %></td>
            </tr>
          <% end %>
          <% if betrieb['prtrinfo'] %>
            <tr>
              <td class="td-0"><p><b>Information for public</b></p></td>
              <td class="td-1"><%= betrieb.wrapped_confidentiable_value('prtrinfo','<p></p>') %></td>
            </tr>
          <% end %>

		<% unless betrieb.confidential? %>
          <tr>
            <td class="td-0"><p><b>More details</b></p></td>
            <td class="td-1"><p><a href="javascript:toggle('details')" class="toggle">show</a></p></td>
          </tr>
        <% end %>
        
        </tbody>

      </table>

      <% if betrieb.confidential? %>
        <div id="confidentialDetails" class="confidentialLegend">

          <h4>Confidentiality allowed due:</h4>
          <p>
          <ul>
            <% betrieb.geheimk.each do |gk| %>
              <li><span class="confidentialTag">[<%=  gk[0] %>]</span><span><%=  gk[1] %></span></li>
            <% end %>
          </ul>
          </p>
        </div>
      <% else %>
        <div id="details" style="display: none;">
          <table class="betrieb-daten">
            <tbody>
            <% unless betrieb['prodvol'] %>
                <tr>
                  <td class="td-0"><p><b>Production volume</b></p></td>
                  <td class="td-1"><%= betrieb.wrapped_confidentiable_value('prodvol','<p></p>') %></td>
                </tr>
            <% end %>
            <% unless betrieb['anlzahl'] %>
                <tr>
                  <td class="td-0"><p><b>Number of installations</b></p></td>
                  <td class="td-1"><%= betrieb.wrapped_confidentiable_value('anlzahl','<p></p>') %></td>
                </tr>
            <% end %>
            <% unless betrieb['betriebh'] %>
                <tr>
                  <td class="td-0"><p><b>Number operating hours/year</b></p></td>
                  <td class="td-1"><%= betrieb.wrapped_confidentiable_value('betriebh','<p></p>') %></td>
                </tr>
            <% end %>
            <% unless betrieb['prtrinfo'] %>
                <tr>
                  <td class="td-0"><p><b>Information for public</b></p></td>
                  <td class="td-1"><%= betrieb.wrapped_confidentiable_value('prtrinfo','<p></p>') %></td>
                </tr>
            <% end %>
            </tbody>
          </table>
          <p>&nbsp;</p>

        </div>
      <% end %>

    </div>
    <hr class="hidden">
    <div class="text-clear"></div>
    <h3>Activities</h3>


    <table class="betrieb-taetigkeiten">
      <tbody>
        <tr>

          <td class="td-0"><p><b>NACE-Code</b></p></td>
          <td class="td-1"><%= betrieb.wrapped_html_value('nace') %></td>
        </tr>
        <tr>

          <td class="td-0"><p><b>Main activity</b></p></td>
          <td class="td-1"><%= betrieb.taet.first.wrapped_confidentiable_value('text') rescue '' %></td>

        </tr>
        <tr class="no-border">
          <td class="td-0"><p><b>Non-main activities</b></p></td>
          <td class="td-1">
            <% if betrieb.taet.length > 1 %>
              <ul>
                <% for i in (1...betrieb.taet.length) %>
                  <li><%= betrieb.taet[i].wrapped_confidentiable_value('text') %></li>
                <% end %>
              </ul>
            <% else %>
              <p>&mdash;</p>
            <% end %>
          </td>

        </tr>

      </tbody>
      <% if !betrieb.taet.empty? && betrieb.taet.first.confidential? %>
        <tfoot>
          <tr>
            <td colspan="2">
              <div class="confidentialLegend" style="background-color: #f4f4f4;">
                <h4>Confidentiality allowed due:</h4>

                <% betrieb.taet.first.geheimk.each do |gk| %>
                  <p><span class="confidentialTag">[<%=  gk[0] %>]</span><span><%=  gk[1] %></span></p>
                <% end %>
              </div>
            </td>
          </tr>
        </tfoot>
      <% end %>
    </table>


    <% unless betrieb.freis[2].empty? %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Release to air</h3>
      <%= RenderEngine.render('templates/_freis_table_en.erb', {:container => betrieb.freis[2], :kompartiment => 'air'}) %>
    <% else
      @no_emission_list << 'Release to air'
     end %>


    

    <% unless betrieb.freis[3].empty? %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Release to water</h3>
      <%= RenderEngine.render('templates/_freis_table_en.erb', {:container => betrieb.freis[3], :kompartiment => 'water'}) %>
    <% else
      @no_emission_list << 'Release to water'
     end %>


    <% unless betrieb.freis[1].empty? %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Release to soil</h3>
      <%= RenderEngine.render('templates/_freis_table_en.erb', {:container => betrieb.freis[1], :kompartiment => 'soil'}) %>
    <% else
      @no_emission_list << 'Release to soil'
     end %>

      
    <% unless betrieb.vabw.empty? %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Transfer of pollutant in waste water</h3>

      <table class="zeilen6">
        <thead>
          <tr>

            <th>Pollutant amount</th>
            <th>Pollutant</th>
            <th>CAS-Number</th>
            <th>Threshold</th>
            <th>Determination method /Method used</th>
          </tr>

        </thead>
        <tbody>
          <% betrieb.vabw.each do |vabw| %>
            <tr>

              <td class="td-0"><p><%= vabw.float_value('jfracht', betrieb.vabw.get_digit_length('jfracht')) %> kg</p></td>
              <td class="td-2">
                <% if vabw.geheimk.empty? %>
                  <%= vabw.wrapped_html_value('stoffname') %>
                <% else %>
                  <% gkcollect |= vabw.geheimk %>
                  <p><%= vabw['stoffgruppe'] %><span class="confidentialTag"><%= vabw.get_kuerzel %></span></p>
                <% end %>
              </td>
              <td class="td-3"><%= vabw.wrapped_confidentiable_value('cas_nr','&mdash;') %></td>
              <td class="td-4">
                <%  if vabw.confidential? %>
                  <%= vabw.wrapped_confidentiable_value("schwellenwert",'&mdash;') %>
                <% else %>
                  <p><%= vabw.float_value("schwellenwert", betrieb.vabw.get_digit_length('schwellenwert'))%> kg/year</p>
                <% end %>
              </td>

              <td class="td-5"><p><%= vabw['bmeth'] %> (<%=  vabw.wrapped_confidentiable_value('bverf','confidential', 'span') %>)</p></td>
            </tr>
          <% end %>
        </tbody>
        <% unless betrieb.vabw.gklist.empty? %>
          <tfoot>
            <tr>
              <td colspan="5">
                <div class="confidentialLegend" style="background-color: #f4f4f4;">
                  <h4>Confidentiality allowed due:</h4>

                  <% betrieb.vabw.gklist.each do |gk| %>
                    <p><span class="confidentialTag">[<%=  gk[0] %>]</span><span><%=  gk[1] %></span></p>
                  <% end %>
                </div>
              </td>
            </tr>
          </tfoot>
        <% end %>
      </table>
    <% else
      @no_emission_list << 'Transfer of pollutant in waste water'
     end %>


    <% unless betrieb.vabf[:gefin][:sum] == 0 %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Transfer of hazardous waste inside country</h3>
      <%= betrieb.vabf.render_compartment(:gefin) %>
    <% else
      nol_str = 'Transfer of hazardous waste inside country'
      nol_str << ' (or this is to be kept confidential)' unless betrieb.vabf[:gehgef].empty?
      @no_emission_list << nol_str
     end %>
    
    
    <% unless betrieb.vabf[:gefaus][:sum] == 0 %>
      <hr class="hidden">
      <div class="trenner"></div>    
      <h3>Transfer of hazardous waste outside country</h3>
      <% unless betrieb.vabf[:gefaus][:ver].empty? %>
        <h4>Waste for recovery</h4>
        <table class="zeilen4">
          <thead>
            <tr>
              <th>Waste amount</th>
              <th>Determination method</th>
              <th>Receiver</th>
              <th>Site of recovery</th>
            </tr>
          </thead>
          <tbody>
            <% betrieb.vabf[:gefaus][:ver].each do |abf| %>
              <tr>
                <td class="td-0"><p><%= abf['menge'].to_html %> t/year</p></td>
                <td class="td-1"><p><%= abf['bmeth'] %> (<%= abf['bverf'] %>)</p></td>
                <td class="td-2"><p>
                  <%= abf['vbname'] %>,
                  <%= abf['vbstr'] %>,
                  <%= abf['vbort'] %>,
                  <%= abf['vbstaat'] %>
                </p></td>
                <td class="td-3"><p>
                  <%= abf['vbsstr'] %>,
                  <%= abf['vbsort'] %>,
                  <%= abf['vbsstaat'] %>
                </p></td>
              </tr>
            <% end %>
          </tbody>
        </table>
      <% end %>
      <% unless betrieb.vabf[:gefaus][:bes].empty? %>
        <h4>Waste for disposal</h4>
        <table class="zeilen4">
          <thead>
            <tr>
              <th>Waste amount</th>
              <th>Determination method</th>
              <th>Receiver</th>
              <th>Site of disposal</th>
            </tr>

          </thead>
          <tbody>
            <% betrieb.vabf[:gefaus][:bes].each do |abf| %>
              <tr>
                <td class="td-0"><p><%= abf['menge'].to_html(betrieb.vabf[:gefaus][:bes].get_digit_length('menge')) %> t/year</p></td>
                <td class="td-1"><p><%= abf['bmeth'] %> (<%= abf['bverf'] %>)</p></td>
                <td class="td-2"><p>
                  <%= abf['vbname'] %>,
                  <%= abf['vbstr'] %>,
                  <%= abf['vbort'] %>,
                  <%= abf['vbstaat'] %>
                </p></td>
                <td class="td-3"><p>
                  <%= abf['vbsstr'] %>,
                  <%= abf['vbsort'] %>,
                  <%= abf['vbsstaat'] %>
                </p></td>
              </tr>
            <% end %>
          </tbody>
        </table>
      <% end %>

      <h4>Waste amount total</h4>
      <p><%= betrieb.vabf[:gefaus][:sum].to_html %> t/year</p>

    <% else
      nol_str = 'Transfer of hazardous waste outside country'
      nol_str << ' (or this is to be kept confidential)' unless betrieb.vabf[:gehgef].empty?
      @no_emission_list << nol_str
     end %>
      
      
    <% unless betrieb.vabf[:nigef][:sum] == 0 %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Transfer of non-hazardous waste</h3>
      <%= betrieb.vabf.render_compartment(:nigef) %>
    <% else
      @no_emission_list << 'Transfer of non-hazardous waste' if betrieb.vabf[:gehnig].empty?
     end %>
      
      
      
    <% unless betrieb.vabf[:geheim].empty?  %>
      <hr class="hidden">
      <div class="trenner"></div>
      <h3>Confidential informations are available for:</h3>
      <ul id="confidential-waste-list">
        <% unless betrieb.vabf[:gehgef].empty?  %>
          <li>Transfer of hazardous waste <%= betrieb.vabf[:gehgef].inject(""){|str, gk| str << %Q^<span class="confidentialTag">[#{gk[0]}]</span>^} %></li>
        <% end %>
        <% unless betrieb.vabf[:gehnig].empty?  %>
          <li>Transfer of non-hazardous waste <%= betrieb.vabf[:gehnig].inject(""){|str, gk| str << %Q^<span class="confidentialTag">[#{gk[0]}]</span>^} %></li>
        <% end %>
        </ul>

        <div class="confidentialLegend" style="background-color: #f4f4f4;">

          <h4>Confidentiality allowed due:</h4>
          <p>
          <ul>
            <% betrieb.vabf[:geheim].each do |gk| %>
              <li><span class="confidentialTag">[<%=  gk[0] %>]</span><span><%=  gk[1] %></span></li>
            <% end %>
          </ul>
          </p>
        </div>
      <% end %>
      
      <% unless @no_emission_list.empty? %>
        <hr class="hidden">
        <div class="trenner"></div>
        <h3>No information with respect to releases and transfers have been reported:</h3>
        <ul id="no-emission-list">
          <% @no_emission_list.each do |nol| %>
            <li><%= nol %></li>
          <% end %>
        </ul>
      <% end %>

        <hr class="hidden">
        <div class="clear-text"></div>
