home *** CD-ROM | disk | FTP | other *** search
- function FindNextKeyword(sKeyword,iDirection,iFlags)
- {
- var range,range0;
- // debugger;
- if (document.selection.type=='Text')
- {
- range0=document.selection.createRange();
- range=range0.duplicate();
- range.collapse(iDirection<0);
- }
- else
- range=document.body.createTextRange();
- var bFound=range.findText(sKeyword,iDirection*100000,iFlags);
- if (bFound) range.select();
- if (bFound) return "Found";
- else if (document.selection.type=='Text') return "EndOfPage";
- else return "NotFound";
- }