// JavaScript Document
function controle()
{ var len;
  var i;
  var nomchamp;
  var chaine;
  var typechamp;
  chaine="";
  len=document.choix.elements.length;
  for (i=0;i<len;i++)
      {	typechamp=document.choix.elements[i].type;
        if ((typechamp=="text") || (typechamp=="textarea") || (typechamp=="password"))
           { nomchamp=document.choix.elements[i].name;
             if ((nomchamp!="remarques") && (nomchamp!="fax") && (nomchamp!="mobile"))
                if (document.choix.elements[i].value.length==0)
                   chaine+=nomchamp+"\r\n";
           }
      }
  if (chaine.length>0)
     { alert("Les champs obligatoires suivants n'ont pas ete remplis\r\n"+chaine);
       return false;
     }

if (document.choix.Email.value != document.choix.Email2.value) 
		{
	alert("Erreur lors de la confirmation de votre Email");
	return false;
		}
       else return true;
}

function controle2()
{ var len;
  var i;
  var nomchamp;
  var chaine;
  var typechamp;
  chaine="";
  len=document.mail.elements.length;
  for (i=0;i<len;i++)
      {	typechamp=document.mail.elements[i].type;
        if ((typechamp=="text") || (typechamp=="textarea") || (typechamp=="password"))
           { nomchamp=document.mail.elements[i].name;
             if ((nomchamp!="remarques") && (nomchamp!="fax") && (nomchamp!="mobile"))
                if (document.mail.elements[i].value.length==0)
                   chaine+=nomchamp+"\r\n";
           }
      }
  if (chaine.length>0)
     { alert("Les champs obligatoires suivants n'ont pas ete remplis\r\n"+chaine);
       return false;
     }

if (document.mail.Email.value != document.mail.Email2.value) 
		{
	alert("Erreur lors de la confirmation de votre Email");
	return false;
		}
       else return true;
}
function Ouvrir(mypage, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes';
	win = window.open(mypage, "CtrlWindow", winprops)
	if (parseInt(navigator.appVersion) >= 4)
         { win.window.focus(); }
}
