function cal_aj(f)
{
txt="Il manque :";
valid=1;

     if (f[4].value == ""){txt=txt+"\n -> La description";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function date_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer cette date ?'))return(true);
   else return(false);
}

function date_edit(f)
{
txt="Il manque :";
valid=1;

     if (f[1].value == ""){txt=txt+"\n -> La description";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function voy_edit(f)
{
txt="";
valid=1;

     if (f[0].value == ""){txt=txt+"\n -> Il faut sélectionner un voyage pour le modifier";valid=0;}
 
if (txt!=""){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);	
}

function voy_aj(f)
{
txt="Il manque :";
valid=1;

     if (f[0].value == ""){txt=txt+"\n -> Le lieu";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function voy_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer ce voyage ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function foto_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer cette photo ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function catfoto_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer cette catégorie de photo ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function foto_aj(f)
{
txt="Il manque :";
valid=1;

     if (f[1].value == "aaaa-mm-jj" && f[2].value != ""){txt=txt+"\n -> La date";valid=0;}
	 if (f[1].value == "" && f[2].value != ""){txt=txt+"\n -> La date";valid=0;}
	 if (f[3].value == ""){txt=txt+"\n -> Le fichier";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function video_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer cette vidéo ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function vid_aj(f)
{
txt="Il manque :";
valid=1;

     if (f[0].value == "aaaa-mm-jj" || f[0].value == ""){txt=txt+"\n -> La date";valid=0;}
	 if (f[1].value == ""){txt=txt+"\n -> Le nom";valid=0;}
	 if (f[2].value == ""){txt=txt+"\n -> L'image d'illustration";valid=0;}
	 if (f[3].value == ""){txt=txt+"\n -> Le fichier .wmv";valid=0;}
	 if (f[4].value == ""){txt=txt+"\n -> Le fichier .mp4";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function img_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer cette image ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function nv_mess_ld(f)
{
txt="Il manque :";
valid=1;

     if (f[0].value == ""){txt=txt+"\n -> Votre nom";valid=0;}
     if (f[1].value == ""){txt=txt+"\n -> Votre message";valid=0;}
     if (f[2].value == ""){txt=txt+"\n -> Le code de vérification";valid=0;}

 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}

function ld_supp(f)
{
   if(confirm('Voulez-vous vraiment supprimer ce message ?\n\nAttention, action irremediable !!!'))return(true);
   else return(false);
}

function edit_mess_ld(f)
{
txt="Il manque :";
valid=1;

     if (f[0].value == ""){txt=txt+"\n -> Votre nom";valid=0;}
     if (f[1].value == ""){txt=txt+"\n -> Votre message";valid=0;}
 
if (txt!="Il manque :"){alert(txt);return(false);}
if (valid == 0)return(false);

return(true);
}