//page accueil


$("img[title]:gt(1)").tooltip({

		// use div.tooltip as our tooltip
		tip: '.tooltip',

		// use the fade effect instead of the default
		effect: 'fade',

		// make fadeOutSpeed similar to the browser's default
		fadeOutSpeed: 100,

		// the time before the tooltip is shown
		predelay: 400,

		// tweak the position
		position: "bottom right",
		offset: [-50, -80]
	});
//infobulles sur le "title"

$(document).ready(function()
{
   // Match all <A/> links with a title tag and use it as the content (default).
 
   $('img[title]').qtip();
});

//formulaire de contact

function Affiche_liste(id_ensemble_select,id_select)
{
        // Sélection du bloc contenant les sélections liées (id = "categorie" dans notre exemple)
        var id_ensemble_select = document.getElementById(id_ensemble_select);
       
        // Sélection de la sélection liée
        var id_select = document.getElementById(id_select);
   
        if(id_ensemble_select)
                        {
                                //Initialisation d'une variable pour contenir un tableau.
                                var tab = new Array();
                   
                                // Cherche les balises select inlues dans le bloc (id = "categorie" dans notre exemple) contenant les sélections liées  et les retourne dans un tableau
                                tab = id_ensemble_select.getElementsByTagName('select');
                               
                                var tablength = tab.length;
                               
                                // Liste les éléments du tableau
                                for (i=0; i < tablength; i++)        
                                        {
                                                // Met les selects en disable = true et les cache avec style.display = 'none'
                                                tab[i].disabled = true;
                                                if(id_select) tab[i].style.display = 'none';// si select est vide on ne fait rien
                                        }
                                                               
                                // Met la sélection liée sélectionné en disable = false et l'affiche avec style.display = 'inline'
                                if(id_select)
                                        {
                                                id_select.disabled = false;
                                                id_select.style.display = 'block';
                                        }    
                        }

}

/*
* Author:      Marco Kuiper (http://www.marcofolio.net/)
*/
google.load("jquery", "1.3.1");
google.setOnLoadCallback(function()
{
	// Just for demonstration purposes, change the contents/active state using jQuery
	$("#menu ul li a").click(function(e) {
		e.preventDefault();
		
		$("#menu ul li a").each(function() {
			$(this).removeClass("active");	
		});
		
		$(this).addClass("active");
		
		$("h3").html($(this).attr("title"));
	});
});

function GereChkbox(conteneur, a_faire) {
var blnEtat=null;
var Chckbox = document.getElementById(conteneur).firstChild;
	while (Chckbox!=null) {
		if (Chckbox.nodeName=="INPUT")
			if (Chckbox.getAttribute("type")=="checkbox") {
				blnEtat = (a_faire=='0') ? false : (a_faire=='1') ? true : (document.getElementById(Chckbox.getAttribute("id")).checked) ? false : true;
				document.getElementById(Chckbox.getAttribute("id")).checked=blnEtat;
			}
		Chckbox = Chckbox.nextSibling;
	}
}


