function verifForm()
{
	testm = false ;
	for(var j=1 ; j<(document.mailami.email.value.length) ; j++)
	{
		if (document.mailami.email.value.charAt(j) == '@')
		{
			if (j<(document.mailami.email.value.length-4))
			{
				for (var k=j ; k<(document.mailami.email.value.length-2) ; k++)
				{
					if (document.mailami.email.value.charAt(k)=='.')
						testm = true;
				}
			}
		}
	}
	
	testmami = false ;
	for(var j=1 ; j<(document.mailami.emailami.value.length) ; j++)
	{
		if (document.mailami.emailami.value.charAt(j) == '@')
		{
			if (j<(document.mailami.emailami.value.length-4))
			{
				for (var k=j ; k<(document.mailami.emailami.value.length-2) ; k++)
				{
					if (document.mailami.emailami.value.charAt(k)=='.')
						testmami = true;
				}
			}
		}
	}
	
	a="0";
	
	if (document.mailami.prenom_nom.value.length == 0) {alert('Vous n\'avez pas saisi votre nom.'); a="1"; document.mailami.prenom_nom.focus();}
	else if (document.mailami.email.value.length == 0) {alert('Vous n\'avez pas saisi votre email.'); a="1"; document.mailami.email.focus();}
	else if (document.mailami.emailami.value.length == 0) {alert('Vous n\'avez pas saisi l\'email de votre ami.'); a="1"; document.mailami.emailami.focus();}
	else if ((testm==false) && (document.mailami.email.value.length != 0)) {alert('Votre adresse email est incorrecte.'); a="1"; document.mailami.email.focus();}
	else if ((testmami==false) && (document.mailami.emailami.value.length != 0)) {alert('L\'adresse email de votre ami est incorrecte.'); a="1"; document.mailami.emailami.focus();}
	
	if (a == 0)
	{
		document.mailami.submit();
	}
}


function verifForm2()
{
	a="0";
	
	if (document.commentaire.nom.value.length == 0) {alert('Vous n\'avez pas saisi votre nom.'); a="1"; document.commentaire.nom.focus();}
	else if (document.commentaire.texte.value.length == 0) {alert('Vous n\'avez pas saisi votre commentaire.'); a="1"; document.commentaire.texte.focus();}
	
	if (a == 0)
	{
		document.commentaire.submit();
	}
}


function aff_cache(id)
{
	if(document.getElementById(id).style.display == "none")
		document.getElementById(id).style.display = "";
	else
		document.getElementById(id).style.display = "none";
}


function iFrameHeight()
{
	var h = 0;
	var g = 0;
	var i = 0;
	if ( !document.all ){
		h = document.getElementById('bloc_news1').contentDocument.height;
		document.getElementById('bloc_news1').style.height = h + 'px';
		
		g = document.getElementById('bloc_news2').contentDocument.height;
		document.getElementById('bloc_news2').style.height = g + 'px';
		
		i = document.getElementById('bloc_news3').contentDocument.height;
		document.getElementById('bloc_news3').style.height = i + 'px';
	}else if( document.all ){
		h = document.frames('bloc_news1').document.body.scrollHeight;
		document.all.bloc_news1.style.height = h + 'px';
		
		g = document.frames('bloc_news2').document.body.scrollHeight;
		document.all.bloc_news2.style.height = g + 'px';
		
		i = document.frames('bloc_news3').document.body.scrollHeight;
		document.all.bloc_news3.style.height = i + 'px';
	}
	//alert(h);
}

function iFrameHeight_video()
{
	var h = 0;
	if ( !document.all ){
		h = document.getElementById('bloc_video').contentDocument.height;
		document.getElementById('bloc_video').style.height = h + 'px';
	}else if( document.all ){
		h = document.frames('bloc_video').document.body.scrollHeight;
		document.all.bloc_video.style.height = h + 'px';
	}
	//alert(h);
}