In IE, we wrote our own Javascript Find/Next Dialog.

var PageRange = document.body.createTextRange();
PageRange.findText("Ethics"); // by default forward only

We have next section in the Find/Next Dialog, which loads next section content through Javascript.

Find/Next when it reaches end of search in current section, we load next section. That time the above code searches backward also.

What could be the problem in this scenario?