// JavaScript Document

	function affichRubriqueCourante(){
		if(rubriqueCourante=="lienContact")
		{
			document.getElementById(rubriqueCourante).style.color="#2A7EDD";
		}
		else if(rubriqueCourante=="lienPlan")
		{
			document.getElementById(rubriqueCourante).style.color="#2A7EDD";
		}
		else if(rubriqueCourante=="lienRecrutement")
		{
			document.getElementById(rubriqueCourante).style.color="#2A7EDD";
		}
		else if(rubriqueCourante==0)
		{
		}
		else
		{
			document.getElementById(rubriqueCourante).style.backgroundColor="#DCDCDC";
			document.getElementById(rubriqueCourante).style.backgroundImage="url(images/cailloux.gif)";
			document.getElementById(rubriqueCourante).style.backgroundRepeat="no-repeat";
			document.getElementById(rubriqueCourante).style.backgroundPosition="3px 1px";
		}
		
	}
	
	function photoRubriqueCourante(){
			document.getElementById("visuelbandeau").src="images/"+bandeauCourant;
	}
	
	
	function hover(obj){
	  if(document.all){
		UL = obj.getElementsByTagName('ul');
		if(UL.length > 0){
		  sousMenu = UL[0].style;
		  if(sousMenu.display == 'none' || sousMenu.display == ''){
			sousMenu.display = 'block';
			sousMenu.left="0";
		  }else{
			sousMenu.display = 'none';
		  }
		}
	
	  }
	}
	
	function setHover(){
	  LI = document.getElementById('menu').getElementsByTagName('li');
	  nLI = LI.length;
	  for(i=0; i < nLI; i++){
		LI[i].onmouseover = function(){
		  hover(this);
		}
		LI[i].onmouseout = function(){
		  hover(this);
		}
	  }
	}
	
	
	function eclaireMenu(nomMenu){
		if(rubriqueCourante!=nomMenu)
		{
		document.getElementById(nomMenu).style.backgroundColor="#DCDCDC";
		document.getElementById(nomMenu).style.backgroundImage="url(images/cailloux.gif)";
		document.getElementById(nomMenu).style.backgroundRepeat="no-repeat";
		document.getElementById(nomMenu).style.backgroundPosition="3px 1px";
		}
		else if(rubriqueCourante==0)
		{
		}
		else
		{
		}
	}
	
	
	function eteintMenu(nomMenu){
		if(rubriqueCourante!=nomMenu)
		{
		document.getElementById(nomMenu).style.backgroundColor="#F0F0F0";
		document.getElementById(nomMenu).style.backgroundImage="none";
		document.getElementById(nomMenu).style.backgroundRepeat="";
		document.getElementById(nomMenu).style.backgroundPosition="";
		}
		else if(rubriqueCourante==0)
		{
		}
		else
		{
		}
	}
	
	
	function validationForm()
		{
			var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
			document.messageCogep.nom.style.backgroundColor="";
			document.messageCogep.mail.style.backgroundColor="";
			document.messageCogep.message.style.backgroundColor="";
				
			if (document.messageCogep.nom.value=='')
			{
				alert("Veuillez indiquer votre nom");
				document.messageCogep.nom.style.backgroundColor="#EBEFFA";
				document.messageCogep.nom.focus();
				return false;
			}
			else
			{
				if (document.messageCogep.mail.value=='')
				{
				alert("Veuillez indiquer votre adresse mail");
				document.messageCogep.mail.style.backgroundColor="#EBEFFA";
				document.messageCogep.mail.focus();
				return false;
				}
				else
				{
					if(!reg_email.test(document.messageCogep.mail.value))
					{
						alert("Le format de votre adresse mail est invalide");
						document.messageCogep.mail.style.backgroundColor="#EBEFFA";
						document.messageCogep.mail.focus();
						return false;
					}
					else
					{
						if (document.messageCogep.message.value=='')
						{
							alert("Veuillez indiquer votre message");
							document.messageCogep.message.style.backgroundColor="#EBEFFA";
							document.messageCogep.message.focus();
							return false;
							}
							else
							{
								return true;
								document.messageCogep.submit();
								document.location.href="contact-confirmation.php";
							}
						}
					}
				}
			}
			
	
	function validationForm2()
		{
			var reg_email = /^[A-Za-z0-9\.\-_]+[@][A-Za-z0-9\-\.]+[\.][A-Za-z][A-Za-z][A-Za-z]?$/;
			document.inscription_cogep.nom.style.backgroundColor="";
			document.inscription_cogep.mail.style.backgroundColor="";
				
			if (document.inscription_cogep.nom.value=='')
			{
				alert("Veuillez indiquer votre nom");
				document.inscription_cogep.nom.style.backgroundColor="#EBEFFA";
				document.inscription_cogep.nom.focus();
			}
			else
			{
				if (document.inscription_cogep.mail.value=='')
				{
				alert("Veuillez indiquer votre adresse mail");
				document.inscription_cogep.mail.style.backgroundColor="#EBEFFA";
				document.inscription_cogep.mail.focus();
				}
				else
				{
					if(!reg_email.test(document.inscription_cogep.mail.value))
					{
						alert("Le format de votre adresse mail est invalide");
						document.inscription_cogep.mail.style.backgroundColor="#EBEFFA";
						document.inscription_cogep.mail.focus();
					}
					
						else
						{
							document.inscription_cogep.submit();
							document.location.href="inscription-confirmation.php";
						}
				}
			}
		}
			
			
	function rollOnCarte(nomDepartement, texte){
		document.getElementById("departements").src="images/"+nomDepartement+".gif";
		//document.getElementById(nomDepartement).alt=texte;
		//document.getElementById(nomDepartement).title=texte;
		document.getElementById("departements").style.cursor="pointer";
	}
	
	function rollOffCarte(){
		document.getElementById("departements").src=departementActif;
		document.getElementById("departements").alt="";
		document.getElementById("departements").title="";
		document.getElementById("departements").style.cursor="normal";
	}
	
	
// affichage des FLASHS

	// affichage des flash

	// Flash 8
	
	function afficheFlash8(nom,largeur,hauteur,identifiant){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id='+identifiant+' 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');
	}
	
	
	// Flash 7
	
	function afficheFlash7(nom,largeur,hauteur,identifiant){
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" id='+identifiant+' 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');
	}

	
	/*function afficheFlashGroupe(){
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="257" height="344" id="carte_cogep" align="middle">\n');
		document.write('<param name="movie" value="images/carte_cogep.swf" />\n');
		document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
		document.write('<param name="quality" value="high" />\n');
		document.write('<param name="wmode" value="transparent" />\n');
		document.write('<embed src="images/carte_cogep.swf" quality="high" bgcolor="#ffffff" width="257" height="344" name="carte_cogep" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
		document.write('</object>\n');
	}*/
