
var myMenu;
	window.onload = function() {
			// affiche masque div
			var maDiv = document.getElementById('maDiv');
			    maDiv.style.display = 'none';
			    document.getElementById('monLien').onclick = function() {
			        if (maDiv.style.display == 'block') {
			            maDiv.style.display = 'none';
			        } else {
			            maDiv.style.display = 'block';
			        }
			        return false;
			    };		
			// fin affiche masque div
		pop;
		preloadImages();
		popup;
	};





function chgpage(formulaire)   
{
	if (formulaire.listepages.selectedIndex != 0)
	location.href = formulaire.listepages.options[formulaire.listepages.selectedIndex].value;
}

function popup()
{
    var myAs = document.getElementsByTagName('a');
    for (var a = 0; a < myAs.length; ++a) {
				// Si le lien a une classe de type pop
        if (myAs[a].className == 'pop') {
						// on extrait l'id de la popup à partir du href
            var popup = document.getElementById(myAs[a].href.substring(myAs[a].href.lastIndexOf('#') + 1));
						// si la popup existe on l'affiche (display block)
            if (popup) {       
                popup.style.display = 'none';
                myAs[a].onclick = function() {
                    thisPopup = document.getElementById(this.href.substring(this.href.lastIndexOf('#') + 1))
                    thisPopup.style.display = (thisPopup.style.display == 'none') ? 'block' : 'none';
                    return false;
                };
								// on efface la popup en cliquant dessus
                popup.onclick = function()
                {
                    this.style.display = 'none';
                };
            }
        }
    }
}


// recherche 
function xisibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (targetElement.style.display == "none")
{
targetElement.style.display = "" ;
} else {
targetElement.style.display = "none" ;
}
}