
/**********************************
get_radio_value
Wait   : a radio button object
Job    : found the selected radio and return its value
Return : radio button value or false if no radio selected
**********************************/
function get_radio_value(obj_radio) {
  var i;
  var res = false;

  for (i=0; i < obj_radio.length; i++){
    if (obj_radio[i].checked) {
      res = obj_radio[i].value;
    }
  }
  return res;
} /// get_radio_value


function SubmitFormContact(theform) {

var reInteger = /^[0-9]+$/
var reFloat = /^((\d+(\.\d*)?)|((\d*\.)?\d+))$/
var reFloatb = /^((\d+(\,\d*)?)|((\d*\,)?\d+))$/
var validemail=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

		if (theform.nom.value == '') {
			theform.nom.focus();
			alert("Veuillez entrer un nom !");
			return;
		}
		if (theform.tel.value == '') {
			theform.tel.focus();
			alert("Veuillez entrer un numéro de téléphone !");
			return;
		}
		if (theform.email.value == '') {
			theform.email.focus();
			alert("Veuillez entrer une adresse email !");
			return;
		}
		if ((theform.email.value != '')&&(!validemail.test(theform.email.value))) {
			theform.email.focus();
			alert("Veuillez entrer un email valide!");
			return;
		}

	theform.submit();
}        
