calculate number 3 places ahead when at the end of looped sequence
<p>Lets say I have a sequence of 8 items, these loop such that after 8 comes 1.</p>

<p>1, 2, 3, 4, 5, 6, 7, 8</p>

<p>If the selected item is number 7 how do I get the number three places ahead, ie: 2 ?</p>

<p>I have:</p>

<pre><code>var total; // (total number in sequence)
var pos; // (current position number)

if ( pos &lt; total) {
  threeIncrement = pos+3;
} else {
  threeIncrement = ??????
  }
</code></pre>
