// JavaSc	ript Document
//Verif specifique autre que controle zone obligatoire
function Specif_verif()
{
	//variable flg_submit à true => on fait la soumission, sinon il y a des erreurs et on ne fait pas la soumission
	flg_submit = true;

	//telephone numérique
	if(document.frmshop.tel.value != '')
	{
		ok = isNumeric(document.frmshop.tel.value);
		if(flg_submit==true)
		{
			flg_submit=ok;
		}
	}
	//telephone numérique
	if(document.frmshop.portable.value != '')
	{
		ok = isNumeric(document.frmshop.portable.value);
		if(flg_submit==true)
		{
			flg_submit=ok;
		}
	}
	
	//email correct
	if(document.frmshop.email.value != '')
	{
		ok = isEmailAdress(document.frmshop.email.value);
		if(flg_submit==true)
		{
			flg_submit=ok;
		}
	}
	// cgv acceptee
	if(!document.frmshop.cgvente.checked)
	{
		alert('Les CGV doivent être acceptées');
		flg_submit=false;
	}
}

//Fonction d'initialisation de la liste de vérification
function Init_tab_verif()
{

	nb_lignes_tab_verif=80;
	tab_formulaire= new Array(nb_lignes_tab_verif);
	tab_nom = new Array(nb_lignes_tab_verif);
	tab_type = new Array(nb_lignes_tab_verif);
	tab_obligation = new Array(nb_lignes_tab_verif);
	tab_message = new Array(nb_lignes_tab_verif);
	tab_verif = new Array(tab_formulaire,tab_nom,tab_type,tab_obligation,tab_message);
	i=0;
	
	//nom
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "nom";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "Le nom est obligatoire";
	
	//prenom
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "prenom";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "Le prénom est obligatoire";
	
	//adresse
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "adresse";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "L'adresse est obligatoire";
	
	//ville
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "ville";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "La ville est obligatoire";
	
	//cp
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "cp";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "Le code postal est obligatoire";

	//email
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "email";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "L'e-mail est obligatoire";

	//tel
	/*i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "tel";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "Le téléphone est obligatoire";

	//portable
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "portable";
	tab_type[i] = "text";
	tab_obligation[i] = "true";
	tab_message[i] = "Le portable est obligatoire";*/

	
	//choix bancaire
/*	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "choix";
	tab_type[i] = "radio";
	tab_obligation[i] = "true";
	tab_message[i] = "Cochez un mode de paiement";
	
	//cgv
	i++;
	tab_formulaire[i] = "frmshop";	
	tab_nom[i] = "cgv";
	tab_type[i] = "checkbox";
	tab_obligation[i] = "true";
	tab_message[i] = "L'acceptation des CGV est obligatoire";*/

}