// requêtes en cours
	var query = '' ;
	var moteurc = '' ;
	var rqt = "r" ;
	var att = "loupe" ;
	var com_att = "Aucun Autre" ;
	var mot_img=new Array;
	var mot_tec=new Array;
	var mot_vid=new Array;
	var mot_web=new Array;
	var mot_enc=new Array;
//	var mot_ach=new Array;
	var com_mot=new Array;
	var stylecss=new Array;
	mot_vid["youtube"]="Youtube";
	com_mot["youtube"]="Youtube";
	mot_vid["vimeo"]="Vimeo";
	com_mot["vimeo"]="Vimeo";
	mot_vid["kewego"]="Kewego";
	com_mot["kewego"]="Kewego";
//	mot_vid["vodpod"]="Vodpod";
//	com_mot["vodpod"]="Vodpod";
//	mot_vid["blip"]="Blip";
//	com_mot["blip"]="Blip";
//	mot_vid["viadeo"]="Viadeo";
//	com_mot["viadeo"]="Viadeo";
	mot_img["fotolia"]="Fotolia";
	com_mot["fotolia"]="Fotolia";
	mot_img["picsearch"]="Picsearch";
	com_mot["picsearch"]="Picsearch";
	mot_img["flickr"]="Flickr";
	com_mot["flickr"]="Flickr";
	mot_web["google"]="Google";
	com_mot["google"]="Google";
//	mot_web["optioncarriere"]="Optioncarriere";
//	com_mot["optioncarriere"]="Optioncarriere";
	mot_web["yahoo"]="Yahoo";
	com_mot["yahoo"]="Yahoo";
	mot_web["bing"]="Bing";
	com_mot["bing"]="Remplace Live Search de Microsoft";
	mot_web["lemoteur"]="Lemoteur";
	com_mot["lemoteur"]="Moteur de recherche de Orange";
	mot_web["cuil"]="Cuil";
	com_mot["cuil"]="Cuil";
	mot_web["exalead"]="Exalead";
	com_mot["exalead"]="Exalead";
	mot_web["entireweb"]="Entireweb";
	com_mot["entireweb"]="Entireweb";
	mot_web["ask"]="Ask";
	com_mot["ask"]="Ask";
	mot_tec["searchmedica"]="Search Medica";
	com_mot["searchmedica"]="Recherches M&eacute;dicales";
	com_mot["ask"]="Ask";
	mot_enc["wikipedia"]="Wikip&eacute;dia";
	com_mot["wikipedia"]="Recherches Encyclopediques";
//	mot_ach["ebay"]="eBay";
//	com_mot["ebay"]="Achat en ligne";

	stylecss["padding-bottom"] = {"GoogleChrome": "padding-bottom","Safari": "padding-bottom","Firefox": "paddingBottom","Opera": "paddingBottom","MSIE": "paddingBottom"};

var zetuto = window.document ;

var browser = function (a,b) {
if ( a == 'Microsoft Internet Explorer') {
if ( b.indexOf('Maxthon') != -1 ) {
return 'MSIE';
} else {
return 'MSIE';
}
} else if ( a == 'Opera') {
return 'Opera';
} else if ( a == 'Netscape' ) {
if ( b.indexOf('Chrome') != -1 ) {
return 'GoogleChrome';
} else if ( b.indexOf('Safari') != -1 ) {
return 'Safari';
} else if ( b.indexOf('Firefox') != -1 ) {
return 'Firefox';
}
}
}

var navigateur = browser (window.navigator.appName,window.navigator.userAgent);

function favoris() { // Accessible via navigator.appName
if (zetuto.all) { // Microsoft Internet Explorer
	window.external.AddFavorite("http://www.recherch.es","Recherch.es");
} else if (window.sidebar) { // Netscape
	window.sidebar.addPanel("Recherch.es","http://www.recherch.es","");
} else {
	window.alert("Vous devrez mettre http://www.recherch.es manuellement en favoris.");
}
}

function ajout_moteur_toolbarre(src,tit,cat) {if ((typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function")) {window.sidebar.addSearchEngine("http://www.recherch.es/moteur/home.src","http://www.recherch.es/favicon.png",tit,cat);} else {alert("Ce moteur de recherche ne peut être installé que dans les navigateurs de la famille Mozilla.");}}

function ini(m,c) {
	Modifier ('memo','SERVICE FONCTIONNEL ET DEVELOPPEMENT ENCORE EN COURS') ;
	moteur(m,c);
	DonnerMain(rqt);
	if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
		CssLargeur ('en_tete','%',100) ;
	}
}

// Choisir un moteur de recherche
function moteur(m,c) {
	moteurc = m ;
	/*
	if (zetuto.getElementById('r')) {
		query = zetuto.getElementById('r').value ;
	}
	*/
	//rep("./do?m="+m,"moteur","r");
	CssHauteur ('logo_moteur','px',16) ;
	Titre ('logo_moteur',com_mot[m]) ;
	if (c=='acc') {
	ModifierAction ("moteur","./do/web/"+m) ;
	CssFond ("logo_moteur","url('./favicon/" + m + ".gif') center no-repeat") ;
	} else if (c!='acc') {
	ModifierAction ("moteur","./"+m) ;
	CssFond ("logo_moteur","url('../../favicon/" + m + ".gif') center no-repeat") ;
	}
	if ((c=='acc')||(c=='web')) {
	m_mot (m,mot_web,c);
	} else if (c=='vid') {
	m_mot (m,mot_vid,c);
	} else if (c=='img') {
	m_mot (m,mot_img,c);
	} else if (c=='ach') {
	m_mot (m,mot_ach,c);
	} else if (c=='enc') {
	m_mot (m,mot_enc,c);
	}
	//majg () ; <!--<div id='goo'></div> // onchange="majg();" Google Custom -->
	DonnerMain(rqt);
}

function majg () {
	if ( moteurc == 'google') {
		Modifier ('goo',"\r\n\t<input type='hidden' name='cx' value='partner-pub-7761006224043115:a9uulz-blos' />" +
		"\r\n\t<input type='hidden' name='cof' value='FORID:9' />" +
		"\r\n\t<input type='hidden' name='ie' value='UTF-8' />" +
		"\r\n\t<input type='hidden' name='q' id='q' value='"+LireVal('r')+"' maxlength='255' />" +
		"\r\n\t<input type='hidden' name='sa' value='Rechercher' type='submit' />\r\n" ) ;
	} else {
		Modifier ('goo','') ;
	}
  }

// Menu pour choisir un moteur de recherche
function m_mot (m,b,c) {
	var t = '' ;
	var j = 0 ;
	for ( var i in b ) {
		if (i!=m) {
			t += "<div" ;
			if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
				t += " id=\"moteur_"+i+"\" onmouseover=\"this.style.backgroundColor='#DBE1F9';\" onmouseout=\"this.style.backgroundColor='#F1F1F1';\"" ;
			}
			t += " onClick=\"moteur('"+i+"','"+c+"');Cacher('menu_mot');\" title=\""+com_mot[i]+"\" class=\"_menu_mot\"><img src=\"" ;
			if (c!='acc') {
			t += "../." ;
			}
			t += "./favicon/"+i+".gif\" id=\"favicon_"+i+"\" class=\"_favicon_mot\" align=\"absmiddle\" />"+b[i]+"</div>\r\n" ;
		}
		j++;
	}
	if ( j == 1 ) {
			t += "<div" ;
			if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
				t += " id=\"moteur_att\" onmouseover=\"this.style.backgroundColor='#DBE1F9';\" onmouseout=\"this.style.backgroundColor='#F1F1F1';\"" ;
			}
			t += " onClick=\"DonnerMain('"+rqt+"');Cacher('menu_mot');\" title=\""+com_att+"\" class=\"_menu_mot\"><img src=\"" ;
			if (c!='acc') {
			t += "../." ;
			}
		t += "./favicon/"+att+".gif\" id=\"favicon_att\" class=\"_favicon_mot\" align=\"absmiddle\" />"+com_att+"</div>\r\n";

	}
	Modifier ('menu_mot',t) ;
	if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
		if ( j == 1 ) {
			CssPadding ('favicon_att','em',0,'0.5',0,0) ;
			CssMargin ('moteur_att','em','0.45','0.2','0.45','0.2') ;
			CssCurseur ('moteur_att','hand') ;
		} else {
			for ( var i in b ) {
				if (i!=m) {
					CssPadding ('favicon_'+i,'em',0,'0.5',0,0) ;
					CssMargin ('moteur_'+i,'em','0.45','0.2','0.45','0.2') ;
					CssCurseur ('moteur_'+i,'hand') ;
				}
			}
		}
	}

}

// Initier l'objet XMLHttpRequest
function createXhrObject() {
	try {
	return new  ActiveXObject("Microsoft.XMLHTTP");    // Internet Explorer 
	}
	catch(e) { // Echec
		return new XMLHttpRequest();  // Autres navigateurs
	}
}

// VISUELS
function visuel (requete,dest,id) {
	var req = null;
	query = LireVal (id) ;
	req = createXhrObject();

	 req.onreadystatechange = function()
		{
			if(req.readyState == 4)
			{
				if(req.status == 200)
				{
					 if ( req.responseText != 'erreur' ) {
							ModifierImg (dest,req.responseText) ;
						} else {
							ModifierImg (dest,'../../../img/visnon.gif') ;
							Titre (dest,"Visuel Introuvable") ;
						}
					/*zetuto.getElementById(dest).title = req.responseText ;*/
					 if (zetuto.getElementById(id)) {
						ModifierVal (id,query) ;
						}
					DonnerMain(id);
				}
				else
				{
				 ModifierImg (dest,'../../../img/visnon.gif') ;
				 Titre (dest,"Visuel Introuvable") ;
				}
			}
		};

		req.open("GET",requete, true);
		req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		req.send(null);
}

// REQUETE
function rep (requete,dest,id) {
	var req = null;
	req = createXhrObject();

	 req.onreadystatechange = function()
		{
			if(req.readyState == 4)
			{
				if(req.status == 200)
				{
					zetuto.getElementById(dest).innerHTML = req.responseText;
					 if (zetuto.getElementById(id)) {
						zetuto.getElementById(id).value = query ;
						}
					DonnerMain(id);
				}
				else
				{
				 zetuto.getElementById(dest).innerHTML = "Code d&rsquo;erreur retourn&eacute; " + req.status + " " + req.statusText;
				}
			}
		};

		req.open("GET",requete, true);
		req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		req.send(null);
}

function Rafraichir (dest) {
	if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
		CssLargeur ('en_tete','%',100) ;
		CssLargeur ('contenu','%',95) ;
		CssFloat ('reponses','left') ;
		CssFloat ('poursuivre','left') ;
		if ( dest != 'web' ) {
			ModifierClasseCss ('.im_visuel',stylecss["padding-bottom"][navigateur],'0','px') ;
		}
	}
	if ( dest != 'web' ) {
		//ModifierClasseCss ('.im_visuel',stylecss["padding-bottom"][navigateur],'0','px') ;
		CssLargeur ('reponses','px',690) ;
	}
}

function ModifierClasseCss (c,s,v,u) {
	var classe = ImportClasseCss (0,0) ;
	for (var i=0; i < classe.length ; i++) {
		if ( classe[i].selectorText == c ) {
			if ( ( navigateur == 'GoogleChrome' ) || ( navigateur == 'Safari' ) ) { // Google Chrome et Safari
				for (var j=0; j < classe[i].style.length ; j++) {
					if ( classe[i].style[j] == s ) {
						classe[i].style.setProperty(s,v+u,null) ;
					}/*classe[i].style.removeProperty(s) ; alert (classe[i].style.getPropertyValue(s)) ;*/
				}
			} else {
				classe[i].style[s] = v ;
			}
		}
	}
}


// REINITIALISER LA REQUETTE
function nouveau(id) {
	ModifierVal (id,'') ;
	DonnerMain(id);
}

function selectText (BoxName) {
	DonnerMain (BoxName) ;
	Selectionner (BoxName) ;
}

function Selectionner (id) {
	zetuto.getElementById(id).select();
	}

function LireVal (n) {
	return zetuto.getElementById(n).value ;
  }

function ModifierVal (n,t) {
	zetuto.getElementById(n).value = t ;
  }

function ModifierImg (n,l) {
	zetuto.getElementById(n).src = l ;
  }

function ModifierAction (n,a) {
	zetuto.getElementById(n).action = a ;
  }

function Titre (n,t) {
	zetuto.getElementById(n).title = t ;
  }

function Modifier (n,c) {
	zetuto.getElementById(n).innerHTML = c ;
  }
function ImportClasseCss (s,i) {
	if ( navigateur == 'MSIE' ) { // Microsoft Internet Explorer
		return zetuto.styleSheets[s].imports[i].rules ;
	} else if ( ( navigateur == 'Firefox' ) || ( navigateur == 'Opera' ) ) { // Firefox et Opera
		return zetuto.styleSheets[s].cssRules[i].styleSheet.cssRules ;
	} else if ( ( navigateur == 'GoogleChrome' ) || ( navigateur == 'Safari' ) ) { // Google Chrome et Safari
		return zetuto.styleSheets[s].rules[i].styleSheet.rules ;
	}
}

function CssFloat (n,p) {
//	zetuto.getElementById(n).style.display = 'block' ;
	zetuto.getElementById(n).style.styleFloat = p ;
	zetuto.getElementById(n).style.cssFloat = p ;
  }

function CssFond (n,l) {
	zetuto.getElementById(n).style.background = l ;
  }

function CssMargin (n,u,h,d,b,g) {
	zetuto.getElementById(n).style.marginTop = parseFloat (h) + u ;
	zetuto.getElementById(n).style.marginRight = parseFloat (d) + u ;
	zetuto.getElementById(n).style.marginBottom = parseFloat (b) + u ;
	zetuto.getElementById(n).style.marginLeft = parseFloat (g) + u ;
  }

function CssPadding (n,u,h,d,b,g) {
	zetuto.getElementById(n).style.paddingTop = parseFloat (h) + u ;
	zetuto.getElementById(n).style.paddingRight = parseFloat (d) + u ;
	zetuto.getElementById(n).style.paddingBottom = parseFloat (b) + u ;
	zetuto.getElementById(n).style.paddingLeft = parseFloat (g) + u ;
  }

function CssLargeur (n,u,l) {
	zetuto.getElementById(n).style.width = parseInt (l) + u ;
  }

function CssHauteur (n,u,l) {
	zetuto.getElementById(n).style.height = parseInt (l) + u ;
  }

function CssCurseur (n,c) {
	zetuto.getElementById(n).style.cursor = c ;
  }

// DETECTION DE LA TOUCHE ENTREE
function entree(a,id,ok) {
	if (a==13) {
		zetuto.getElementById(ok).click () ;
	}		
	DonnerMain (id);
	}

// NOUVELLE REQUETE
function DonnerMain (id) {
	zetuto.getElementById(id).focus () ;
	}

function Cacher (id) {
    zetuto.getElementById(id).style.visibility = "hidden" ;
	}
 
function Montrer (id) {
    zetuto.getElementById(id).style.visibility = "visible" ;
	}