
function HideHint(nomvar, str) {
	// Redirige le client vers le panier ou la page actuelle suivant son choix.
	DivNom = "#div" + nomvar.toLowerCase();
	valeur = document.getElementById(str).value;
	longeur = valeur.length;
	
	if (longeur<1) {
		$(DivNom).hide();
	}
}

function showHint(str,nomvar)
{
DivNom = "#div" + nomvar.toLowerCase();
DivNomA = "div" + nomvar.toLowerCase() + "a";
$(DivNom).show();
str = str.replace("'", "~");
if (str.length==0)
  { 
  document.getElementById(DivNomA).innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4)
    {
	if (xmlhttp.status==200) document.getElementById(DivNomA).innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","gethintmed.asp?q="+str+"&n="+nomvar,true);
xmlhttp.send();
}
function fill(Nomdiv, Nomchamp, thisValue) {
    nomitem = Nomchamp.toLowerCase() ;
	thisValue = thisValue.replace("~","'");
	document.getElementById(nomitem).value=thisValue;
	nomdiv1 = "#"+Nomdiv.toLowerCase() ;
	$(nomdiv1).hide();
	document.getElementById('rechrecherapide').submit();
}
