function getElementsByClass(searchClass, node, tag) {
  var classElements = new Array();
  if ( node == null )
      node = document;
  if ( tag == null )
      tag = '*';
  var els = node.getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
      if ( pattern.test(els[i].className) ) {
          classElements[j] = els[i];
          j++;
      }
  }
  return classElements;
}

function tailleFonte(classe, taille) {
  cibles = getElementsByClass(classe);
  for (i=0; i < cibles.length; i++) {
    cibles[i].style.fontSize = taille;
  }
}

function PopupImageAuto(imgUrl,titre) { 
  Popup = window.open("",'image','width=800,height=800,toolbar=no,menubar=no,location=no,status=no,scrollbars=no,resizable=no,left=0,top=0'); 
  Popup.document.write("<html><head><title>"+titre+"</title></head>"); 
  Popup.document.write("<script language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"script>"); 
  Popup.document.write("<body onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
  Popup.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
  Popup.document.write("<td valign='middle' align='center'><img src='"+imgUrl+"' border=0 alt='Mon image'>"); 
  Popup.document.write("</td></tr></table>");
  Popup.document.write("</body></html>"); 
  Popup.document.close(); 
} 

function PopupImage(imgUrl,largeur,hauteur,titre) { 
  Popup = window.open("",'image','width=800,height=600,toolbar=no,menubar=no,location=no,status=yes,scrollbars=yes,resizable=yes,left=0,top=0'); 
  Popup.document.write("<html><head><title>"+titre+"</title></head>"); 
  Popup.document.write("<script language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo("+largeur+","+hauteur+"); window.focus();} else { setTimeout('checksize()',250) } }</"+"script>"); 
  Popup.document.write("<body onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
  Popup.document.write("<img src='"+imgUrl+"' width='"+largeur+"' height='"+hauteur+"' border=0"); 
  Popup.document.write("</body></html>"); 
  Popup.document.close(); 
} 





