// JavaScript Document


	function rubriqueActive(rub)
	{
		document.getElementById(rub).className = "actif";
	}
	
	function positionPiedDePage(){
		if(navigator.userAgent.indexOf("Safari")!=-1)
		{
		
		}
		else
		{
			hauteurPage=document.getElementById("repere").offsetTop+1;
			hauteurPied=document.getElementById("pied").offsetHeight;
			if(document.all)
			{
				hauteurContenu=document.getElementById("global").offsetHeight+hauteurPied;
				espaceLibre=(hauteurPage-hauteurContenu);
			}
			else
			{
				hauteurContenu=document.getElementById("global").offsetHeight+hauteurPied;
				espaceLibre=(hauteurPage-hauteurContenu);
			}
			
			
			if(espaceLibre>0)
			{
				document.getElementById("elastique").style.height=(espaceLibre)+"px";
			}
			else
			{
				document.getElementById("elastique").style.height=20+"px";
			}
		}

	}
	
	
	function positionPiedDePage2(){
		hauteurPage=document.getElementById("repere").offsetTop+1;
		hauteurPied=document.getElementById("pied").offsetHeight;
		if(navigator.userAgent.indexOf("Safari")!=-1)
		{
		
		}
		else
		{
			if(document.all)
			{
				window.scroll(0,0);
			}
			hauteurPage=document.getElementById("repere").offsetTop+1;
			hauteurPied=document.getElementById("pied").offsetHeight;
			
			if(document.all)
			{
				espaceLibre=(hauteurPage-hauteurContenu);
			}
			else
			{
				espaceLibre=(hauteurPage-hauteurContenu);
			}
			
			if(espaceLibre>0)
			{
				document.getElementById("elastique").style.height=(espaceLibre)+"px";
			}
			else
			{
				document.getElementById("elastique").style.height=20+"px";
			}
		}

	}
	
	function validationForm(monform)
	{
		var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
		monform.nom.style.border="1px solid  #7f9db9";
		monform.prenom.style.border="1px solid  #7f9db9";
		monform.email.style.border="1px solid  #7f9db9";
		monform.message.style.border="1px solid  #7f9db9";
		if (monform.nom.value=="")
		{
			alert("Veuillez indiquer votre nom");
			monform.nom.style.border="1px solid #bb2500";
			monform.nom.focus();
			return false;
		}
		if (monform.prenom.value=="")
		{
			alert("Veuillez indiquer votre prénom");
			monform.prenom.style.border="1px solid #bb2500";
			monform.prenom.focus();
			return false;
		}
		if (monform.email.value=='')
		{
			alert("Veuillez indiquer votre adresse mail");
			monform.email.style.border="1px solid #bb2500";
			monform.email.focus();
			return false;
		}
		if(!reg_email.test(monform.email.value))
		{
			alert("Le format de votre adresse mail est invalide");
			monform.email.style.border="1px solid #bb2500";
			monform.email.focus();
			return false;
		}
		if (monform.message.value=='')
		{
			alert("Veuillez indiquer votre message");
			monform.message.style.border="1px solid #bb2500";
			monform.message.focus();
			return false;
		}
		return true;
	}
	
	
/* ============================== AFFICHAGE DES FLASH */
	function afficheFlash(version,nom,largeur,hauteur){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+',0,0,0" width='+largeur+' height='+hauteur+'>\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="movie" value='+nom+' />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('<embed src='+nom+' quality="high" wmode="transparent" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width='+largeur+' height='+hauteur+'></embed>\n');
		document.write('</object>\n');
	}
/* ============================== AFFICHAGE DES FLASH */