function PopupImage(img) {
  titre="Cognac Claude Chatelier";
  w=open("",'image','width=40,height=40,toolbar=no,scrollbars=no,resizable=yes');  
  w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
  w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+12,document.images[0].height+30); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
  w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
  w.document.write("");
  w.document.write("</BODY></HTML>");
  w.document.close();
}

function Permut (flag, img) { 
   if (document.images) { 
       if (document.images[img].permloaded) { 
           if (flag==1) document.images[img].src = document.images[img].perm.src 
           else document.images[img].src = document.images[img].perm.oldsrc 
       } 
   } 
} 


function preloadPermut (img, adresse) { 
   if (document.images) { 
       img.onload = null; 
       img.perm = new Image (); 
       img.perm.oldsrc = img.src; 
       img.perm.src = adresse; 
       img.permloaded = true; 
   } 
} 




var motif="";

function verif()

{

if (document.forms[0].nom.value==""){motif="Saisie du nom incorrecte.";}

if (document.forms[0].societe.value==""){motif+="\nNom de la Société incorrect.";}

if (document.forms[0].societe.value==""){motif+="\nIndiquez votre fonction.";}

if (document.forms[0].tel.value==""){motif+="\nNuméro de téléphone incomplet !";}

                else    {

var str=document.forms[0].tel.value;

var filter=/[a-zA-Z]/;

if (filter.test(str)){motif+="\nLe numéro de téléphone ne doit comporter que des chiffres !";}

                    }

if (document.forms[0].email.value!="")

    {

var str=document.forms[0].email.value;

var filter=/^.+@.+\..{2,3}$/;

if ((!filter.test(str))||(str.indexOf(";")!=-1)){motif+="\nSaisie du mail incorrecte.";}

    }

if (document.forms[0].message.value==""){motif+="\nVous n'avez pas saisi de message !";}


if (motif!=""){alert(""+motif);} else     {

document.forms[0].acc.value="ok";document.forms[0].submit();

                    }

motif="";

}



