<!--
// trouvé sur www.hypergurl.com/searchpage.html
var NS4 = (document.layers);    // Which browser?
var IE4 = (document.all);
var win = window;    // window to search
var n   = 0;
function findInPage(str) {
  var txt, i, found;
  if (str == "")
    return false;
  var strlen = str.length;
  var decalage = 10; // longueur de sdxhilitex
  // Find next occurance of the given string on the page, wrap around to the
  // start of the page if necessary.
  if (NS4) {
    // Look for match starting at the current point. If not found, rewind
    // back to the first match.
    if (!win.find(str))
      while(win.find(str, false, true))
        n++;
    else
      n++;
    // If not found in either direction, give message.
    if (n == 0)
      alert("Non trouvé");
  }
  if (IE4) {
    txt = win.document.body.createTextRange();
    // Find the nth match from the top of the page.
    for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
      if (i>0) {
        txt.moveStart("character", 1);
        }
      txt.moveEnd("textedit");
    }
    // If found, mark it and scroll it into view.
    if (txt.findText(str)) {
      txt.moveStart("character", decalage);
      txt.moveEnd("character",1); // on ne hilite que la 1ère lettre du mot car on ne connait pas sa longueur
//	      txt.findText(str); // dans la version originale, est à la place des 2 lignes précédentes
      txt.select();
      txt.scrollIntoView();
      n++;
    }
    // Otherwise, start over at the top of the page and find first match.
    else {
      if (n > 0) {
        n = 0;
        findInPage(str);
      }
      // Not found anywhere, give message.
      else
        alert("Non trouvé.\n(Le texte recherché peut être dans une note.)");
    }
  }
  return false;
}
-->