/* Find In Page Script- By Mike Hall (MHall75819@aol.com) */
//var NS6 = (document.getElementById);    // Which browser?

var NS6 =(!document.all && document.getElementById)? true:false
var NS4 = (document.layers);
var IE4 = (document.all);
var win = window;    // window to search.
var n   = 0;

function findInPage(str) {
 //alert(str);

var txt, i, found;
if (str == "")
return false;
// 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("Not found.");
}
if (NS6) {
// 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("Not found.");
}






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++) {
txt.moveStart("character", 1);
txt.moveEnd("textedit");
}
// If found, mark it and scroll it into view.
if (found) {
txt.moveStart("character", -1);
txt.findText(str);
txt.select();
txt.scrollIntoView();

 if (navigator.appName=="Microsoft Internet Explorer")
                       {

    window.scrollTo(0,Math.max(0,document.body.scrollTop+500))

                       }
                else
                        {
                       offseti = window.pageYOffset;

             window.scrollTo(0,Math.max(0,offseti+500))
                        }


 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("Not found.");
}
}
return false;
}



var cherche;
cherche="";
var requete=window.location.search ;
if (requete){
requete= requete.substring(1);



String.prototype.startsWith = function(texte){
        var i;
        var sc = texte.length;
        for (i=0;i<sc;i++){
                if (texte.charAt(i) != this.charAt(i)) {
                        return false;
                }
        }
        return true;
}

requmoi=requete;
 
if (requmoi.startsWith("cherche")) {



requete=unescape(requete);

var extrait = requete.slice(9);

 extrait= extrait.replace(/'/,"");


//alert( extrait );      

cherche=extrait;


} 
}



