// JavaScript Document
<!--


		$('textarea').autogrow();
		
		
		
		

		$(document).ready( function () {
									 
									 
			$('a[href*=#premier]').click(function(){
				
				
				if ($("div.premier:visible").length != 0) {
				
					null;
					
				} else {
					$('.premier').show(200, setFooter);
					$('.valeurs').hide(200);
					$('.contact').hide(200);
					
					$('.premier').parent('li').css('backgroundImage','url(images/fleche2.gif)');
					$('.valeurs').parent('li').css('backgroundImage','url(images/fleche.gif)');
					$('.contact').parent('li').css('backgroundImage','url(images/fleche.gif)');
					
				}
				
				
				
				return false;
			
			});
			
			$('a[href*=#valeurs]').click(function(){
				
				
				if ($("div.valeurs:visible").length != 0) {
				
					null;
					
				} else {
					$('.valeurs').show(200, setFooter);
					$('.premier').hide(200);
					$('.contact').hide(200);
					
					$('.valeurs').parent('li').css('backgroundImage','url(images/fleche2.gif)');
					$('.premier').parent('li').css('backgroundImage','url(images/fleche.gif)');
					$('.contact').parent('li').css('backgroundImage','url(images/fleche.gif)');
					
				}
				
				
				
				return false;
			
			});
			
			$('a[href*=#contact]').click(function(){
				
				
				if ($("div.contact:visible").length != 0) {
				
					null;
					
				} else {
					$('.contact').show(200, setFooter);
					$('.valeurs').hide(200);
					$('.premier').hide(200);
					
					$('.contact').parent('li').css('backgroundImage','url(images/fleche2.gif)');
					$('.valeurs').parent('li').css('backgroundImage','url(images/fleche.gif)');
					$('.premier').parent('li').css('backgroundImage','url(images/fleche.gif)');
					
				}
				
				
				
				return false;
			
			});
			
			
									 
									 
			$('a[href*=#]').click(function() { return false; });
			$('a[href*=#top]').click(function() { $('html, body').animate({scrollTop:0}, 'normal'); });
			
			$('textarea').autogrow();
			
			var plop = $('.contact p:eq(0)').attr("class");
			
			if (plop){
				
				$('.block').not('.contact').hide(200, setFooter);
				$('.contact').parent('li').css('backgroundImage','url(images/fleche2.gif)');
				
			} else {
			
				$('.block').not('.premier').hide(200, setFooter);
				$('.premier').parent('li').css('backgroundImage','url(images/fleche2.gif)');
			
			}
			
			
			$('.contenu li > a').click(function(){
				
				
				
			
				$("#footer").css("top",0+"px");;
				if ($(this).next("div.block:visible").length != 0) {
					//$(".block").slideUp(200, setFooter);
					$(this).next("div.block").hide(200, setFooter);
					$(this).parent('li').css('backgroundImage','url(images/fleche.gif)');
				}
				// Si le sous-menu est caché, on ferme les autres et on l'affiche :
				else {
					
					$(".block").not($(this).next("div.block")).hide(200, setFooter);
					$(this).next("div.block").show(200);
					$('.contenu li').css('backgroundImage','url(images/fleche.gif)');
					$(this).parent('li').css('backgroundImage','url(images/fleche2.gif)');
					
					
				}
				// On empêche le navigateur de suivre le lien :
				return false;

											  
				//$(this).find('.block').slideUp('fast');
											  
											  });
			
			
			
			});
		
			
		
		//-->
		
		
		<!--
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('conteneur').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight + 10)) + 'px';
					}
					else {
						footerElement.style.top = '0px';
					}
				}
			}
		}
	


		window.onresize = function() {
			setFooter();
		}
		window.onload = function() {
			setFooter();
		}
		
		//-->