
/**********************************
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 get_select_value(name) {
  return name.options[name.selectedIndex].value;
}



function SubmitFormContact_fra(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Veuillez entrer une civilité !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Veuillez entrer un prénom !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Veuillez entrer un nom !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Veuillez entrer un email !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Veuillez entrer un email valide !");
			return;
		}

		document.form1.submit();
	
}

function SubmitFormContact_eng(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Please select a salutation !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Please enter your firstname !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Please enter your name !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Please enter your email !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Please enter a valid email !");
			return;
		}

		document.form1.submit();
	
}

function SubmitFormContact_dut(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Titel is ongeldig !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Vul a.u.b u Voornaam !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Vul a.u.b u Achternaam !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Email is ongeldig !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Please enter a valid email !");
			return;
		}

		document.form1.submit();
	
}


function SubmitFormLivredor_fra(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Veuillez entrer une civilité !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Veuillez entrer un prénom !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Veuillez entrer un nom !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Veuillez entrer un email !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Veuillez entrer un email valide !");
			return;
		}

		document.form1.submit();
	
}

function SubmitFormLivredor_eng(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Please select a salutation !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Please enter your firstname !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Please enter your name !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Please enter your email !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Please enter a valid email !");
			return;
		}

		document.form1.submit();
	
}

function SubmitFormLivredor_dut(theform) {
var reInteger = /^[0-9]+$/
var validemail=/^([a-zA-Z0-9_\.\-\'])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;

	        if(!get_radio_value(document.form1.civilite)){
			alert("Titel is ongeldig !");
			return;	        
	        }

	        if (document.form1.prenom.value == '') {
			document.form1.prenom.focus();
			alert("Vul a.u.b u Voornaam !");
			return;
		}
	        if (document.form1.nom.value == '') {
			document.form1.nom.focus();
			alert("Vul a.u.b u Achternaam !");
			return;
		}
	
		if (document.form1.email.value == '') {
			document.form1.email.focus();
			alert("Email is ongeldig !");
			return;
		}		
		if ((document.form1.email.value != '')&&(!validemail.test(document.form1.email.value))) {
			document.form1.email.focus();
			alert("Please enter a valid email !");
			return;
		}

		document.form1.submit();
	
}

