   function verif(a) {
         var arobase = a.indexOf("@")
         var point = a.lastIndexOf(".")
         if((arobase < 3)||(point + 2 > a.length)
            ||(point < arobase+3)) return false;
         return true;
         }
   
function commande(){
if(document.all.nom.value=="" ||document.all.prenom.value=="" ||document.all.email.value=="" ||document.all.pays.value==""){
alert('* The fields are Obligatory ');
return false;
}
else
 if(!verif(document.all.email.value)) {
alert('Email invalid !');
document.all.email.focus();
return false;
}

else
if(document.all.fax.value!=""){
if(document.all.fax.value.length<8){
alert('Fax invalid !');
document.all.fax.focus();
return false;
}}
return true;
}
function choix(){
if(document.all.Neptune.checked==false &&document.all.Virgile.checked==false &&document.all.Quatre_saisons.checked==false &&document.all.La_dame_de_Carthage.checked==false &&document.all.invention_miraculeuse_de_la_vigne.checked==false ){
alert('Il faut choisir au moin un tableau');
return false;}
return true;

}
function contact(){
if(document.all.nom.value=="" ||document.all.prenom.value=="" ||document.all.email.value=="" ||document.all.pays.value==""){
alert('* The fields are obliguatoire');
return false;
}
else
 if(!verif(document.all.email.value)) {
alert('Email invalid');
document.all.email.focus();
return false;
}


return true;
}

function contact1()
{
var str=document.fo.fichier1.value;

x=str.lastIndexOf('.',str.length);


str1=str.substring(x+1,str.length); 

if((str1!='jpg') &&(str1!='JPG')&&(str1!='GIF') &&(str1!='gif')){

alert(' Extension of the image Invalid');

document.fo.fichier1.focus();
return false ;
}

if(document.all.nom.value=="" ||document.all.prenom.value=="" ||document.all.email.value=="" ||document.all.pays.value==""){
alert('* The fields are obliguatoire');

fo.focus();
return false;
}

 if(!verif(fo.email.value)) {
alert('Email invalide');
fo.email.focus();
return false;
}

if(document.all.tel.value.length<8){
alert('Phone invalid');
fo.tel.focus();
return false;
}

}

function PopupCentrer(page,largeur,hauteur,options) 
{
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

