function paysspotajax(f, l1, l2, what)
{
var index = l1.selectedIndex;
if(index < 1)
{
   l2.options.length = 0;
}
else {
   var xhr_object = null;
	
   if(window.XMLHttpRequest) // Firefox
      xhr_object = new XMLHttpRequest();
   else if(window.ActiveXObject) // Internet Explorer
      xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
   else { // XMLHttpRequest non supporté par le navigateur
      alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
      return;
   }

   xhr_object.open("POST", "ajax/species.php", true);
	
   xhr_object.onreadystatechange = function() {
      if(xhr_object.readyState == 4)
	  {
        eval(xhr_object.responseText);
		document.getElementById('generalbody').style.cursor="default";
		l1.style.cursor="default";
		l2.style.cursor="default";
	  }
   }
   document.getElementById('generalbody').style.cursor="wait";
   l1.style.cursor="wait";
   l2.style.cursor="wait";
   
   xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   var data = "what="+what+"&family="+escape(l1.options[index].value.substring(0,6))+"&form="+f.name+"&select="+l2.id;

   xhr_object.send(data);
   //xhr_object = null;
}
}


