title: Javascript selecting right element
body: <p>Here is my html:</p>
  
  <pre><code>&lt;div id="TAB_CLIENTPANE" class="panel_tabs k-widget k-header k-tabstrip" style="height: 328px;" data-role="tabstrip" tabindex="0" role="tablist" aria-activedescendant="TAB_CLIENTPANE_ts_active"&gt;
      &lt;ul class="k-tabstrip-items k-reset"&gt;
          &lt;li class="k-item k-state-default k-tab-on-top k-state-active k-first" role="tab" aria-controls="TAB_CLIENTPANE-1" aria-selected="true"&gt;
              &lt;span class="k-link"&gt;Summary Report&lt;/span&gt;
              &lt;a class="tab_win k-button"&gt;&lt;span class="k-icon k-i-maximize"&gt;&lt;/span&gt;&lt;/a&gt;
              &lt;a class="tab_close k-button"&gt;&lt;span class="k-icon k-i-close"&gt;&lt;/span&gt;&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="k-item k-state-default k-last" role="tab" aria-controls="TAB_CLIENTPANE-2"&gt;
              &lt;span class="k-link"&gt;Profit Report&lt;/span&gt;
              &lt;a class="tab_win k-button"&gt;&lt;span class="k-icon k-i-maximize"&gt;&lt;/span&gt;&lt;/a&gt;
              &lt;a class="tab_close k-button"&gt;&lt;span class="k-icon k-i-close"&gt;&lt;/span&gt;&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
      &lt;div class="k-content k-state-active" style="display: block; height: 290px;" aria-expanded="true" role="tabpanel" id="TAB_CLIENTPANE-1"&gt;
          &lt;div id="POSITIONREPORT" data-role="grid" class="k-grid k-widget k-secondary" style="height: 288px;"&gt;
              &lt;!--lots of divs etc--&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="k-content" style="display: none; height: 290px;" aria-hidden="true" aria-expanded="false" role="tabpanel" id="TAB_CLIENTPANE-2"&gt;
          &lt;div id="PROFITREPORT" data-role="grid" class="k-grid k-widget k-secondary" style="height: 288px;"&gt;
              &lt;!--lots of divs etc--&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to write a method that works as explained in the following description:</p>
  
  <pre><code>function get_li(id_of_div){
      // the parameter id_of_div will be the id of divs, 
      // eg: "POSTIONREPORT", "PROFITREPORT" etc.
      // let's say the parameter passed to the function is "PROFITREPORT"
      // PROFITREPORT is the second div after the ul element, so
      // the function has to return the second li element of the ul
  }
  </code></pre>
  
  <p>How do I have to select the right li?</p>
  
  <p>Thanks in advance,</p>