function showMask(str)
{
    hideMask();
    if (document.getElementById('mask').style.display == 'none')
    {
            showElement('mask');
            document.getElementById('mask').setAttribute("title", "Cliquez pour fermer");
            document.getElementById('body').style.overflow = "hidden";
            document.getElementById(str).style.display = 'inline';
            
    }
}

function hideMask()
{
    if (document.getElementById('mask').style.display == 'inline')
    {
            document.getElementById('body').style.overflow = "visible";
            hideElement('mask');
            hideElement('legale');
            hideElement('credit');
            hideElement('googlemap');
            hideElement('horaire');
    }
}
// affiche un composant html en manipulant la propriÃ©tÃ© <display> de l'attribut <style>.
// paramètre : string (valeur de l'attribut <Id> du composant Ã  afficher)
function showElement(id){
    if (id.length !=0)
        document.getElementById(id).style.display = 'inline';
}

// masque un composant html en manipulant la propriété <display> de l'attribut <style>.
// paramètre : string (valeur de l'attribut <Id> du composant Ã  masquer)
function hideElement(id){
    if (id.length !=0)
        document.getElementById(id).style.display = 'none';
}

