var NS4 = (document.layers);
var IE4 = (document.all);

var win = this;
var n   = 0;

function findInPage(str) {


if(typeof(NS4)=="undefined" && typeof(IE4)=="undefined"){
	alert("Votre navigateur semble incompatible avec cette fonction.\nVeuillez utiliser la fonction de recherche située dans la barre de menu.")
	return
}


 //alert("NS4 : " + NS4 + "\n" + "IE4 : " + IE4)

 //var thewindow = window;
  var thewindow = window.parent.Down;
 var txt, i, found;
 if (str == "")
  return false;
  
 if (typeof(NS4) != "undefined"){
  if (!thewindow.find(str))
   while(thewindow.find(str, false, true))
    n++;
  else
   n++;
  if (n == 0) alert(str + " n'a pas été trouvé sur cette page.");
  }
  
 if (typeof(IE4) != "undefined"){
  txt = thewindow.document.body.createTextRange();
  for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
   txt.moveStart("character", 1);
   txt.moveEnd("textedit");
   }
  if (found) {
   txt.moveStart("character", -1);
   txt.findText(str);
   txt.select();
   txt.scrollIntoView();
   n++;
   }
  else {
   if (n > 0) {
    n = 0;
    findInPage(str);
    }
   else
    alert(str + " n'a pas été trouvé sur cette page.");
   }
  } return false;
}


	