function getXMLHTTP(){
			  var xhr=null;
			  if(window.XMLHttpRequest) // Firefox et autres
			  xhr = new XMLHttpRequest();
			  else if(window.ActiveXObject){ // Internet Explorer
			    try {
			      xhr = new ActiveXObject("Msxml2.XMLHTTP");
			    } catch (e) {
			      try {
			        xhr = new ActiveXObject("Microsoft.XMLHTTP");
			      } catch (e1) {
			        xhr = null;
			      }
			    }
			  }
			  else {
			  }
			  return xhr;
			}

			var _xmlHttp = null;
			var _adresseRecherche = "http://poeme.creabar.com/ajax.php"
			var fenetretosend = '';
			var convtoput='';
			var old_convtoput='';
  
  function addtofav(idpoeme){
			  if(_xmlHttp&&_xmlHttp.readyState!=0){
			    _xmlHttp.abort()
			  }
			  _xmlHttp=getXMLHTTP();
			  if(_xmlHttp){
			    _xmlHttp.open("GET",_adresseRecherche+'?fav='+idpoeme,true);
			    _xmlHttp.onreadystatechange=function() {
			      if(_xmlHttp.readyState==4&&_xmlHttp.responseText) {
			      }
			    };
			    _xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
			    _xmlHttp.send(null)
			  }
			alert('Ce poème fait à présent partie de vos favoris');
      }
      
  function coupcoeur(idpoeme){
			  if(_xmlHttp&&_xmlHttp.readyState!=0){
			    _xmlHttp.abort()
			  }
			  _xmlHttp=getXMLHTTP();
			  if(_xmlHttp){
			    _xmlHttp.open("GET",_adresseRecherche+'?coupcoeur='+idpoeme,true);
			    _xmlHttp.onreadystatechange=function() {
			      if(_xmlHttp.readyState==4&&_xmlHttp.responseText) {
			      }
			    };
			    _xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
			    _xmlHttp.send(null)
			  }
			alert('Votre coup de coeur a bien été envoyé');
      }

function avertissement(idpoeme){
			  if(_xmlHttp&&_xmlHttp.readyState!=0){
			    _xmlHttp.abort()
			  }
			  _xmlHttp=getXMLHTTP();
			  if(_xmlHttp){
			    _xmlHttp.open("GET",_adresseRecherche+'?avertissement='+idpoeme,true);
			    _xmlHttp.onreadystatechange=function() {
			      if(_xmlHttp.readyState==4&&_xmlHttp.responseText) {
			      }
			    };
			    _xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
			    _xmlHttp.send(null)
			  }
			alert('Votre avertissement a été correctement envoyé');
      }

function addtoami(idmembre){
			  if(_xmlHttp&&_xmlHttp.readyState!=0){
			    _xmlHttp.abort()
			  }
			  _xmlHttp=getXMLHTTP();
			  if(_xmlHttp){
			    _xmlHttp.open("GET",_adresseRecherche+'?addami='+idmembre,true);
			    _xmlHttp.onreadystatechange=function() {
			      if(_xmlHttp.readyState==4&&_xmlHttp.responseText) {
			      }
			    };
			    _xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
			    _xmlHttp.send(null)
			  }
			alert('Ce membre fait maintenant partie de vos amis');
      }     
