<!--
//var url_ajax="http://localhost/conctrib-amateur.com/";
var url_ajax="http://www.contrib-amateur.com/";

function affichage(div,texte) {
  if(document.getElementById(div)) { document.getElementById(div).innerHTML=texte; }
}

function file(fichier) {
  if(window.XMLHttpRequest) { xhr_object=new XMLHttpRequest(); } // FIREFOX
  else if(window.ActiveXObject) { xhr_object=new ActiveXObject("Microsoft.XMLHTTP"); } // IE
  else { return(false); }
  xhr_object.open("GET", fichier, false);
  xhr_object.send(null);
  if(xhr_object.readyState==4) { return(xhr_object.responseText); }
  else { return(false); }
}

function ajax(id, type, text, div) {
  if(texte=file(url_ajax+'ajax.php?type='+type+'&id='+id+'&'+text)) { affichage(div, texte); }
}

function aff_div(a) {
  if(document.getElementById(a).style.display=="none") { document.getElementById(a).style.display="block"; }
  else { document.getElementById(a).style.display="none"; }
}

function limite(zone,max) {
  if(zone.value.length>=max){zone.value=zone.value.substring(0,max);}
}
-->