function preg_replace (array_pattern, array_pattern_replace, my_string)  {
  var new_string = String (my_string);
  for (i=0; i<array_pattern.length; i++) {
    var reg_exp= RegExp(array_pattern[i], "gi");
    var val_to_replace = array_pattern_replace[i];
    new_string = new_string.replace (reg_exp, val_to_replace);
  }
  return new_string;
}

function no_accent (my_string) {
  var new_string = "";
  var pattern_accent = new Array("é", "è", "ê", "ë", "ç", "à", "â", "ä", "î", "ï", "ù", "ô", "ó", "ö");
  var pattern_replace_accent = new Array("e", "e", "e", "e", "c", "a", "a", "a", "i", "i", "u", "o", "o", "o");
  if (my_string && my_string!= "") {
    new_string = preg_replace (pattern_accent, pattern_replace_accent, my_string);
  }
  return new_string;
}

function no_space (my_string) {
  var new_string = "";
  new_string = my_string.replace(/ /g, ',');
  return new_string;
}


function MM_Search() { 
  document.MM_returnValue = false;
  var szTemp=document.form1.requete.value;
  szTemp = no_accent (szTemp);
  szTemp = no_space (szTemp);
  eval("parent.location='http://www.endoloris.com/requete.php?x="+szTemp+"'");
}

