function afficheId(baliseId)
{
 if (document.getElementById && document.getElementById(baliseId) != null)
 {
    document.getElementById(baliseId).style.visibility='visible';
    document.getElementById(baliseId).style.display='block';
 }
}

function cacheId(baliseId)
{
 if (document.getElementById && document.getElementById(baliseId) != null)
 {
    document.getElementById(baliseId).style.visibility='hidden';
    document.getElementById(baliseId).style.display='none';
 }
}
// si JavaScript est disponible, cache le contenu dès le
// chargement de la page. Sans JavaScript, le contenu sera
// affiché.
cacheId('contenu_info');

function apercu(lien)
{
 w = window.open(lien,'apercu','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=640,height=480');
 w.focus();
}

function apercu2(lien, larg, haut)
{
 w = window.open(lien,'apercu','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+larg+',height='+haut);
 w.focus();
}
function mep(lien)
{
 window.open(lien,'mise en page','toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=600');
}

function check(f, val)
{
 if (f.value.length > val)
 {
  alert('Vous avez dépassé les '+ val + ' caractères autorisés: vous avez mis: ' + f.value.length + ' caractères.');
  return(false);
 }
 return(true);
}

function pop(ladate)
{
 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 (display block)
   if (pop)
   {       
    pop.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
    pop.onclick = function()
    {
     this.style.display = 'none';
    };
   }
  }
 }
}
window.onload = pop;

function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
      {
   var img = document.images[i]
   var imgName = img.src.toUpperCase()
   if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
   var imgID = (img.id) ? "id='" + img.id + "' " : ""
   var imgClass = (img.className) ? "class='" + img.className + "' " : ""
   var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
   var imgStyle = "display:inline-block;" + img.style.cssText  
   if (img.align == "left") imgStyle = "float:left;" + imgStyle
   if (img.align == "right") imgStyle = "float:right;" + imgStyle
   if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle  
   var strNewHTML = "<span " + imgID + imgClass + imgTitle
   + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
      + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
   + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"  
   img.outerHTML = strNewHTML
   i = i-1
      }
      }
   }
window.attachEvent("onload", correctPNG);