Can I use JavaScript to select 2 non-contiguous areas in an html document?
<p>Suppose I have a DIV with many sentences.  I want to select the third word in each sentence (for example).  I have a collection of range objects that correspond to each word.  Is there a way to select each?</p>

<p>I could use the selectionRange addRange method, and add each range to it.  Hopefully this means that all the third words would be selected the same way as if I dragged my mouse across them with the left mouse button pressed down.  But I don't know if thats true.</p>

<p>Finally, the purpose of doing this is that, once I have the selection, I can color its background somehow.  I can't do that by an alternative method fo processing each range one by one surrounding each third word by span nodes with a colored background, because as soon as I do that, I throw off the parameters of the other stored ranges, whose computed offsets assume a DOM that was not tampered with.</p>

<p>Thanks.</p>