function pop()
{
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 pop = document.getElementById(myAs[a].href.substring(myAs[a].href.lastIndexOf('#') + 1));
	// si la popup existe on l'affiche (visibility hidden)
            if (pop) {       
                pop.style.display = 'none';
                myAs[a].onclick = function() {
					scrollTo(0,160);
                    thisPopup = document.getElementById(this.href.substring(this.href.lastIndexOf('#') + 1))
					thisPopup.style.left = document.getElementById('conteneur').offsetLeft+'px';
                    thisPopup.style.display = (thisPopup.style.display == 'none') ? 'block' : 'none';
                    return false;
                };                
				
            }
        }
		if (myAs[a].className == 'fermer') {
	// on extrait l'id de la popup à partir du href
            var ferm = document.getElementById(myAs[a].href.substring(myAs[a].href.lastIndexOf('#') + 1));
	// si la popup existe on l'affiche (visibility hidden)
            if (ferm) {       
                myAs[a].onclick = function() {
                    var Num = this.href.substring(this.href.lastIndexOf('#') + 7);
					var NumFerm = 'fermer'+Num;
					var NumPop = 'pop'+Num;
					var test = document.getElementById(NumFerm);
					document.getElementById(NumPop).style.display = 'none';
			  		return false;
                };               
			}
        }
    }
}
addToStart(pop);
