function controle()
{
	if(document.affichage.oui.checked)
        { document.getElementById("doui").style.visibility = 'visible'; }
    else
        { document.getElementById("doui").style.visibility = 'hidden';  }
   
}
//Configuration des infos entrée par le client *******************************************************************--------------
function verifForm(LogClient) {

	// Verification du Login
	if (LogClient.LoginClient.value=="") {
		alert ("You have to seize your login!");
		LogClient.LoginClient.focus();
		return false;	}
		
	// Verification du pass
	if (LogClient.PasseClient.value=="") {
		alert ("You have to seize your password !");
		LogClient.PasseClient.focus();
		return false;	}
	
}

//Vérification du Ticket *******************************************************************--------------
function verifFormTicket(TicketCode) {

	// Verification du Login
	if (TicketCode.Code.value=="") {
		alert ("Vous devez saisir votre code de Réduction !");
		TicketCode.Code.focus();
		return false;	}
		
	// Verification du pass
	if (TicketCode.Code.value.length !=5) {
		alert ("Votre code est erroné !");
		TicketCode.Code.focus();
		return false;	}
	
}


// *********************************************************************************************************************
// INSCRIPTION D'UN CLIENT LORS d4UN ACHAT *****************************************************************************
// *********************************************************************************************************************

function verifForm9(InsClient) {
	if(InsClient.society.value==""){
		// Verification de la civilite
		if (InsClient.civilite.value=="") {
			alert ("You have to choose your civility !");
			InsClient.civilite.focus();
			return false;	}
			
		// Verification du nom du client
		if (InsClient.nomClient.value=="") {
			alert ("You have to seize your name !");
			InsClient.nomClient.focus();
			return false;	}
		
		// Verification du prénom du client
		if (InsClient.prenomClient.value=="") {
			alert ("You have to seize your first name !");
			InsClient.prenomClient.focus();
			return false;	}
	}
	
	// Verification de l'adresse du client
	if (InsClient.adresseClient.value=="") {
		alert ("You have to seize your address !");
		InsClient.adresseClient.focus();
		return false;	}
		
	// Verification du code Postal du client
	if (InsClient.CodePoClient.value=="") {
		alert ("You have to seize your Zip code !");
		InsClient.CodePoClient.focus();
		return false;	}
		
	// Verification de la ville du client
	if (InsClient.CommuneClient.value=="") {
		alert ("You have to seize your city of residence !");
		InsClient.CommuneClient.focus();
		return false;	}
		
	// Vérification de lemail et de sa validité
		if (InsClient.MailClient.value=="") {
			alert ("You have to seize your E-mail !");
			InsClient.MailClient.focus();
			return false;	}
		else {
		mail = /^[a-zA-Z0-0_9][a-zA-Z0-9\.\-_]+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
		VerifFormeEmail=mail.test(document.InsClient.MailClient.value)
			if(!VerifFormeEmail) {	
				alert ("You have to enter a valid email !!!");
				InsClient.MailClient.focus();
				return false;	}
				}
		
	// Verification de la Téléphone du client
	if (InsClient.phoneClient.value=="") {
		alert ("You have to seize your phone number !");
		InsClient.phoneClient.focus();
		return false;	}
		
		// Verification de l'acceptation du contrat
	if (InsClient.acceptation.checked==false) {
		alert ("You have to accept the terms of sale to make your command !");
		InsClient.acceptation.focus();
		return false;	}
}
function verifForm9B(InsClient) {
	// Vérification des coordonnées de livraison si sélectionnées.
	if(InsClient.SameAdress[1].checked){
		var onTest=true;
		try{if(InsClient.idadresLivr.value!="Choose")onTest=false;}catch(e){}
		if(onTest){
			// Verification du nom du client
			if (InsClient.nomClientLivr.value=="") {
				alert ("You have to seize your name !");
				InsClient.nomClientLivr.focus();
				return false;	}
			// Verification du prénom du client
			if (InsClient.prenomClientLivr.value=="") {
				alert ("You have to seize your first name !");
				InsClient.prenomClientLivr.focus();
				return false;	}
			// Verification de l'adresse du client
			if (InsClient.adresseClientLivr.value=="") {
				alert ("You have to seize your address !");
				InsClient.adresseClientLivr.focus();
				return false;	}
			// Verification du code Postal du client
			if (InsClient.CodePoClientLivr.value=="") {
				alert ("You have to seize your Zip code !");
				InsClient.CodePoClientLivr.focus();
				return false;	}
			// Verification de la ville du client
			if (InsClient.CommuneClientLivr.value=="") {
				alert ("You have to seize your city of residence !");
				InsClient.CommuneClientLivr.focus();
				return false;	}
		}
	}
	return true;
}
// Un client ouvre un compte
function verifForm9C(InsClient) {
	if(InsClient.society.value==""){
		// Verification de la civilite
		if (InsClient.civilite.value=="") {
			alert ("You have to choose your civility !");
			InsClient.civilite.focus();
			return false;	}
			
		// Verification du nom du client
		if (InsClient.nomClient.value=="") {
			alert ("You have to seize your name !");
			InsClient.nomClient.focus();
			return false;	}
		
		// Verification du prénom du client
		if (InsClient.prenomClient.value=="") {
			alert ("You have to seize your first name !");
			InsClient.prenomClient.focus();
			return false;	}
	}
	
	// Verification de l'adresse du client
	if (InsClient.adresseClient.value=="") {
		alert ("You have to seize your address !");
		InsClient.adresseClient.focus();
		return false;	}
		
	// Verification du code Postal du client
	if (InsClient.CodePoClient.value=="") {
		alert ("You have to seize your Zip code !");
		InsClient.CodePoClient.focus();
		return false;	}
		
	// Verification de la ville du client
	if (InsClient.CommuneClient.value=="") {
		alert ("You have to seize your city of residence !");
		InsClient.CommuneClient.focus();
		return false;	}
		
	// Vérification de lemail et de sa validité
		if (InsClient.MailClient.value=="") {
			alert ("You have to seize your E-mail !");
			InsClient.MailClient.focus();
			return false;	}
		else {
		mail = /^[a-zA-Z0-0_9][a-zA-Z0-9\.\-_]+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9])+$/;
		VerifFormeEmail=mail.test(document.InsClient.MailClient.value)
			if(!VerifFormeEmail) {	
				alert ("You have to enter a valid email !!!");
				InsClient.MailClient.focus();
				return false;	}
				}
		
	// Verification de la Téléphone du client
	if (InsClient.phoneClient.value=="") {
		alert ("You have to seize your phone number !");
		InsClient.phoneClient.focus();
		return false;	}
		
}

function confirmEffCadd()
{
	var accord=confirm("You are about to validate your command. To continue?")
		if (accord)
			return true;
		else 
			return false;
}

