function indeXys_validerFormulaire(formIn) {
  var errors='',test_radio='',test_checkbox='';
  for (i=0; i<formIn.elements.length; i++) { 
    monChamp = formIn.elements[i];
    if (monChamp.tagName == "INPUT" 
	    && monChamp.getAttribute("type") == "text" 
		&& monChamp.value == '') {
      if (monChamp.className.indexOf("obligatoire")==0) {
        errors += '- le champ '+monChamp.name+'\n';
      }
    }
	else if (monChamp.tagName == "TEXTAREA"
		&& monChamp.value == '') {
      if (monChamp.className.indexOf("obligatoire")==0) {
        errors += '- le champ '+monChamp.name+'\n';
      }
    }
	else if (monChamp.tagName == "INPUT"
	    && monChamp.getAttribute("type") == "radio"
		&& test_radio.indexOf("," + monChamp.name + ",")!=0) {
	  var checked = false;
	  for (j=0 ; j<document.getElementsByName(monChamp.name).length; j++) {
		if (document.getElementsByName(monChamp.name)[j].checked) {
		  checked = true;
		}
	  }
	  if (checked == false
&& monChamp.className.indexOf("obligatoire")==0) {
        errors += '- le champ '+monChamp.name+'\n';
	  }
	  test_radio = test_radio + "," + monChamp.name + ",";
    }
	else if (monChamp.tagName == "INPUT"
	    && monChamp.getAttribute("type") == "checkbox"
		&& test_checkbox.indexOf("," + monChamp.name + ",")!=0) {
	  var checked = false;
	  for (j=0 ; j<document.getElementsByName(monChamp.name).length; j++) {
		if (document.getElementsByName(monChamp.name)[j].checked) {
		  checked = true;
		}
	  }
	  if (checked == false
&& monChamp.className.indexOf("obligatoire")==0) {
        errors += '- le champ '+monChamp.name+'\n';
	  }
	  test_checkbox = test_checkbox + "," + monChamp.name + ",";
    }
  } 
  if (errors) {
    alert('Certains champs obligatoires ne sont pas remplis :\n'+errors);
    return false;
  }

  return true;
}