function VerifForm(formulaire)
{
nom = formulaire.nom.value;
societe = formulaire.societe.value;
telephone = formulaire.telephone.value;
message = formulaire.message.value;
adresse = formulaire.email.value;
var place = adresse.indexOf("@",1);
var point = adresse.indexOf(".",place+1);
if (nom.length<1){alert('Le nom doit être renseigné !'); return(false);}
if (societe.length<1){alert('La société doit être renseignée !'); return(false);}
if (telephone.length<1){alert('Le n° de téléphone doit être renseigné !'); return(false);}
if (message.length<1){alert('Vous avez oublié de saisir votre message !'); return(false);}
if ((place > -1)&&(adresse.length >2)&&(point > 1))
	{
	formulaire.submit();
	return(true);
	}
else
	{
	alert('Entrez une adresse e-mail valide !');
	return(false);
	}
}

function VerifFormEn(formulaire)
{
nom = formulaire.nom.value;
societe = formulaire.societe.value;
telephone = formulaire.telephone.value;
message = formulaire.message.value;
adresse = formulaire.email.value;
var place = adresse.indexOf("@",1);
var point = adresse.indexOf(".",place+1);
if (nom.length<1){alert('Please enter your name !'); return(false);}
if (societe.length<1){alert('Please enter your company\'s name !'); return(false);}
if (telephone.length<1){alert('Please enter your telephone number !'); return(false);}
if (message.length<1){alert('You have forgotten to enter your message !'); return(false);}
if ((place > -1)&&(adresse.length >2)&&(point > 1))
	{
	formulaire.submit();
	return(true);
	}
else
	{
	alert('Please enter a valid e-mail address !');
	return(false);
	}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function postpage(index){
document.body.innerHTML+="<form id='formpostpage' action='nectavigne.php' method='post'><input name='pg' type='hidden' value='"+index+"'/></form>";
document.getElementById("formpostpage").submit();
}


// Animation français : 
 
var theText2 = "ecnadnet"; 
function nextSize2(i,textLength) { 
return (20*Math.abs( Math.sin(i/(textLength/3.14)))+15); 
} 

function sizeCycle2(text2,dis2) { 
zob2 = "" 
for(i = text2.length; i > (-1) ; i--) { 
size2 = parseInt(nextSize2(i +dis2,text2.length));
if ( navigator.userAgent.indexOf('MSIE') != -1 ) {
zob2 += "<font color='#910025' style='font-size: "+ size2 +"pt; letter-spacing: 0.1em;'>" +text2.substring(i,i+1)+ "</font>";
} 
else if ( navigator.userAgent.indexOf('Mozilla') != -1 ) { 
zob2 += "<font color='#910025' style='font-size: "+ size2 +"pt; letter-spacing: 0.0em;'>" +text2.substring(i,i+1)+ "</font>";  
} 
} 
document.getElementById("theDiv2").innerHTML = zob2; 
} 

function doWave2(n) { 
sizeCycle2(theText2,n) 
if (n > theText2.length) {n=0} 
tempowave2 = setTimeout("doWave2(" + (n+1) + ")", 150); 
} 

function stopdoWave2() 
{ 
clearTimeout(tempowave2); 
} 

function initwave() 
{ 
doWave2(3); 
stopdoWave2(); 
} 


// Version anglaise : 

var theText3 = "ydnert"; 
function nextSize3(i,textLength) { 
return (20*Math.abs( Math.sin(i/(textLength/3.14)))+15); 
} 

function sizeCycle3(text3,dis3) { 
zob3 = "" 
for(i = text3.length; i > (-1) ; i--) { 
size3 = parseInt(nextSize3(i +dis3,text3.length));
if ( navigator.userAgent.indexOf('MSIE') != -1 ) {
zob3 += "<font color='#910025' style='font-size: "+ size3 +"pt; letter-spacing: 0.1em;'>" +text3.substring(i,i+1)+ "</font>";
} 
else if ( navigator.userAgent.indexOf('Mozilla') != -1 ) { 
zob3 += "<font color='#910025' style='font-size: "+ size3 +"pt; letter-spacing: 0.0em;'>" +text3.substring(i,i+1)+ "</font>";  
} 
} 
document.getElementById("theDiv2").innerHTML = zob3; 
} 

function doWave3(n) { 
sizeCycle3(theText3,n) 
if (n > theText3.length) {n=0} 
tempowave3 = setTimeout("doWave3(" + (n+1) + ")", 150); 
} 

function stopdoWave3() 
{ 
clearTimeout(tempowave3); 
} 

function initwave3() 
{ 
doWave3(3); 
stopdoWave3(); 
}





imgPath1 = new Array;
imgPath2 = new Array;
imgPath3 = new Array;
version = navigator.appVersion.substring(0,1);
if (version >= 3)
	{
	i0 = new Image;
	i0.src = 'images/4-1.jpg';
	imgPath1[0] = i0.src;
	i1 = new Image;
	i1.src = 'images/4-2.jpg';
	imgPath1[1] = i1.src;
	i2 = new Image;
	i2.src = 'images/4-3.jpg';
	imgPath1[2] = i2.src;
	}
a = 0;

if (version >= 3)
	{
	j0 = new Image;
	j0.src = 'images/6-1.jpg';
	imgPath2[0] = j0.src;
	j1 = new Image;
	j1.src = 'images/6-2.jpg';
	imgPath2[1] = j1.src;
	//j2 = new Image;
	//j2.src = 'images/6-3.jpg';
	//imgPath2[2] = j2.src;
	}
b = 0;

if (version >= 3)
	{
	k0 = new Image;
	k0.src = 'images/8.jpg';
	imgPath3[0] = k0.src;
	k1 = new Image;
	k1.src = 'images/8-2.jpg';
	imgPath3[1] = k1.src;
	k2 = new Image;
	k2.src = 'images/8-3.jpg';
	imgPath3[2] = k2.src;
	}
c = 0;

function defilimg1()
	{
	if (a == 3)
		{
		a = 0;
		}
	if (version >= 3)
		{
		document.defil1.src = imgPath1[a];
		tempoimg1 = setTimeout("defilimg1()",1000);
		a++;
		}
	}
	
function stopdefilimg1()
	{
	clearTimeout(tempoimg1);
	document.defil1.src ='images/4.jpg';
	}
	
function defilimg2()
	{
	if (b == 2) // mettre le nombre d'images du tableau (2 ou 3)
		{
		b = 0;
		}
	if (version >= 3)
		{
		document.defil2.src = imgPath2[b];
		tempoimg2 = setTimeout("defilimg2()",1000);
		b++;
		}
	}
	
function stopdefilimg2()
	{
	clearTimeout(tempoimg2);
	document.defil2.src ='images/6-2.jpg';
	}
	
function defilimg3()
	{
	if (c == 3)
		{
		c = 0;
		}
	if (version >= 3)
		{
		document.defil3.src = imgPath3[c];
		tempoimg3 = setTimeout("defilimg3()",1000);
		c++;
		}
	}
	
function stopdefilimg3()
	{
	clearTimeout(tempoimg3);
	document.defil3.src ='images/8.jpg';
	}

