/** Fondu image **/
	
	var nbimage  = 6;
	var numimage = 1;
	nextimage = new Image;
	nextimage.src = '/img/'+ nompage +'-mg1'+ numimage +'.jpg';
	nextimage2 = new Image;
	nextimage2.src = '/img/'+ nompage +'-mg2'+ numimage +'.jpg';
	
	function RefreshImg1() 
	{
		nextimage  = new Image;
		nextimage2 = new Image;
		numimage=numimage+1; if (numimage>nbimage) {numimage=1;}
		nextimage.src = '/img/'+ nompage +'-mg1'+ numimage +'.jpg';
		nextimage2.src = '/img/'+ nompage +'-mg2'+ numimage +'.jpg';
		ModifAlpha(1,100);
		ModifAlpha(2,100);
		timeOutR1Img = window.setTimeout("RefreshImg2()",5000);
	}
	
	function RefreshImg2() 
	{
		ModifAlpha(1,0);
		ModifAlpha(2,0);
		timeOutR2Img = window.setTimeout("RefreshImg3()",1000);
	}
	
	function RefreshImg3() 
	{
		document.images.img1.src = nextimage.src;
		document.images.img2.src = nextimage2.src;
		timeOutR3Img = window.setTimeout("RefreshImg1('rien')",1000);
	}
	
	var TabAlpha=new Array();
	TabAlpha.length=1;		// 5 images alpha A MODIFIER SI PLUS D'IMAGES
	
	for (var alphaI=0;alphaI<TabAlpha.length;alphaI++) {
		TabAlpha[alphaI]=-1;
	}
	
	function ModifAlpha(no,alpha){
		if (document.images["img"+no]) {
			if (document.images["img"+no].filters) {
				TabAlpha[no]=alpha;
				if (tjstimer==0) {setTimeout("tjstimerAlpha()",10)}
			}
		}
	}
	
	var tjstimer=0;
	
	function tjstimerAlpha() {
		var opacity=0;
		for (var alphaI=0;alphaI<TabAlpha.length;alphaI++) {
			if (TabAlpha[alphaI]!=-1) {
				opacity =TabAlpha[alphaI] - document.images["img"+alphaI].filters.alpha.opacity;
				if (opacity!=0) {
					tjstimer=1;
					document.images["img"+alphaI].filters.alpha.opacity+=Math.abs(opacity)/opacity * 5;		
				} else {
					TabAlpha[alphaI]=-1
				}
			}
		}
		if (tjstimer==1) {setTimeout("tjstimerAlpha()",25);} else {tjstimer=0}
	}
/** VERIFICATION DE L'EMAIL **/
function check_nl_mail(email)
	{if (email.length<5 || email.indexOf("@")<1 || email.indexOf("@") >= (email.lastIndexOf(".")-1))
		{alert("Veuillez saisir un email Valide SVP !");
		 return(false);}
	 else
		{return(true);}}
		
function ValidationNL(prenom,email,jj,mm,aa)
{prenomlen    = prenom.length;
 if (prenomlen == 0)
 		{alert("Veuillez saisir votre prénom !");return false;}
 if (!check_nl_mail(email)) {return false;}
 if (jj.length == 0 || aa.length == 0 || jj.length == 0) {alert("Veuillez saisir votre date de naissance !"); return false;}
 if (!(aa > 1900 && aa < 2015 && mm > 0 && mm < 13 && jj > 0 && jj < 32))	{alert("Veuillez saisir une date de naissance valide !");return false;}
 }
