<!-- hide this script from non-JavaScript browsers
var MAX_ENGINES = 30;
var SNARK_STRING = "01+02+03";
function MakeArray(n) {
for (var i = 1; i <= n; i++) {
this[i] = 0;
}
this.maxlen = n;
this.len = 0;
return this;
}
var engs = MakeArray(MAX_ENGINES);
function find_substring(needle, haystack) {
var i, needlen = needle.length, haylen = haystack.length;
for (i=0; i<=haylen-needlen; i++) {
if (needle == haystack.substring(i,i+needlen))
return i;
}
return false;
}
function Engine(name, opts, home, search) {
var snark = find_substring(SNARK_STRING, search);
this.name = name;
this.opts = opts;
this.home = home;
this.pre_snark = search.substring(0,snark);
this.post_snark= search.substring(snark+SNARK_STRING.length, search.length);
}
function Add(name, opts, home, search) {
engs.len++;
if (engs.len <= engs.maxlen) {
engs[engs.len] = new Engine(name, opts, home, search)
}
else {
alert("Better increase MAX_ENGINES: " + engs.len + ">" + engs.maxlen)
}
}
Add("Dictionnaire", "",
"http://www.le-dictionnaire.com",
"http://www.le-dictionnaire.com/resultats.php?mot=01+02+03" );
Add("Dictionnaire Wiki", "",
"http://fr.wiktionary.org",
"http://fr.wiktionary.org/wiki/Special:Search?search=01+02+03" );
Add("Dictionnaire synonymes", "",
"http://www.synonymes.com",
"http://www.synonymes.com/resultats.php?mot=01+02+03" );
Add("Conjugaison", "",
"http://www.les-verbes.com",
"http://www.les-verbes.com/conjuguer.php?verbe=01+02+03" );
Add("Citations", "",
"http://www.iladit.com",
"http://evene.fr/citations/mot.php?mot=01+02+03&origin=affieffi" );
function HandleForm(form)

{

            var i, oldq=form.query.value, newq="";

            for (i=0; i<oldq.length; i++)

            {

                        var thischar = oldq.charAt(i);



                        if (thischar != ' ')

                                   newq += thischar;

                        else if (lastchar != ' ')

                                   newq += '+';



                        lastchar = thischar;

            }

            var eng = engs[1 + form.service.selectedIndex];



            window.location.href = newq ? eng.pre_snark + newq + eng.post_snark : eng.home;

}
function DisplayForm() {
document.writeln('<FORM OnSubmit="HandleForm(this); return false"><table BORDER=0 CELLSPACING=0 CELLPADDING=0><tr><td valign=top>');

document.writeln('<INPUT type="text" name="query" size=27 >');

document.writeln('<SELECT name="service">');
for (i=1; i <= engs.len; i++) {
document.writeln("<OPTION " + engs[i].opts + "> " + engs[i].name);
}
document.writeln('</SELECT></td><td valign="top">&nbsp;<input type="image" SRC="images/ok.gif"></td></tr></table></form>');


}
DisplayForm();
// done hiding from old browsers -->