code: function getSlot(i, a)
  {
  	var slot = i >> (5 * a.height);
  	while (a.lengths[slot] <= i)
  	{
  		slot++;
  	}
  	return slot;
  }
docs: Calculates in which slot of "table" the item probably is, then find the exact slot via forward searching in  "lengths". Returns the index.