//***********************************************iframe ***********

 function iframe(indice,indice2,indice3,indice4)
{		
			
		if (indice4==1)	
		{
		document.getElementById('page').style.visibility= "visible";
		document.getElementById(indice2).style.visibility= "hidden"; //  pagecadre
		}		
		else
		{		
		document.getElementById('page').style.visibility= "hidden";
		document.getElementById(indice2).style.visibility= "visible";	// pagecadre
		document.getElementById(indice2).src=indice;
		}
		

}


function validation() 
{

 if (document.form1.nom && document.form1.nom.value.length < 2) {
	    window.alert("Veuillez entrer votre nom.");
		document.form1.nom.focus();
		return false;}
 
  if (document.form1.prenom && document.form1.prenom.value.length < 2) {
	    window.alert("Veuillez entrer votre prénom.");
		document.form1.prenom.focus();
		return false;}
/*
if (document.form1.entreprise && document.form1.entreprise.value.length < 3) {
	    window.alert("Veuillez entrer le nom de votre entreprise.");
		document.form1.entreprise.focus();
		return false;}

if (document.form1.adresse && document.form1.adresse.value.length < 5) {
	    window.alert("Veuillez entrer votre adresse.");
		document.form1.adresse.focus();
		return false;}
		
if (document.form1.codpost && document.form1.codpost.value.length < 5) {
	    window.alert("Veuillez entrer votre code postal.");
		document.form1.codpost.focus();
		return false;}
		
if (document.form1.ville && document.form1.ville.value.length < 5) {
	    window.alert("Veuillez entrer le nom de votre Ville.");
		document.form1.ville.focus();
		return false;}

if (document.form1.message && document.form1.message.value.length < 5) {
	    window.alert("Veuillez entrer votre message.");
		document.form1.message.focus();
		return false;}
	
if (document.form1.tel && document.form1.tel.value.length < 10) {
	    window.alert("Veuillez entrer votre numéro de téléphone.");
		document.form1.tel.focus();
		return false;}

if (document.form1.fax && document.form1.fax.value.length < 10) {
	    window.alert("Veuillez entrer votre numéro de fax.");
		document.form1.fax.focus();
		return false;}
*/
if (document.form1.emailclient && document.form1.emailclient.value.length < 5) {
	    window.alert("Veuillez entrer votre E-mail.");
		document.form1.emailclient.focus();
		return false;}

var adresse = window.document.form1.emailclient.value;
var place = adresse.indexOf("@",1);
var point = adresse.indexOf(".",place+2);

  if (place > -1 && point > 1&&  adresse.length < point+5  && point+2 < adresse.length )

  {
    //form1.submit();
  }
   else
  {
  alert('Entrez une adresse E-mail valide');
  document.form1.emailclient.select(); // select() : sŽlectionne tout le texte du champ
  return false;
  }



  

}
//---------------------fin ---fonctions validations---------------------


