title: Index or size is negative or greater than allowed amount (non-negative indices)
body: <p>While using Firefox, I keep getting the error described in the subject line for this block of code:</p>
  
  <pre><code>for(var i = 0; i &lt; tables.length; i++)
  {
      var j = rows.length - 1;
      while(j--)
      {                   
          if(hideDP &amp;&amp; tables[i].innerHTML.indexOf("&gt;D&lt;") != -1)
          {   
              if(!platTag &amp;&amp; !soulSilverTag &amp;&amp; pearlTag)
              {
                  tables[i].deleteRow(j);//ERROR IS ON THIS LINE
              }
          }
  
      }//end while loop (rows)
  }//end for loop (tables)
  </code></pre>
  
  <p>I suspect that this error is because I'm somewhat new to making reverse loops, but I specifically made a reverse loop in this instance because it made deleting rows from a table easier. Note also that j is something like 24 and i is 0, so they're non-negative. Could someone shed some light on this for me? </p>
  
  <p><strong>EDIT :</strong> The full code <a href="http://pastebin.com/zNLSm3vP" rel="nofollow">can be found here</a>.</p>