//Fonction pour grossisement du texte
 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('mod');
     for (i=0; i < cibles.length; i++) {
         cibles[i].style.fontSize = taille;
         }
     }
//Fin Fonction pour grossisement du texte


//AfficherCacher
function AfficherCacher() {

	var valueSelect = document.getElementById("select_afficher").options[document.getElementById("select_afficher").selectedIndex].value;

	switch (valueSelect) {
		case 'del':
			disparition();
			break;
		case 'aff':
			afficher();
			break;
	}

}
//Fin AfficherCacher


//afficher/cacher barre d'outils
function visibilite(thingId)
{
	var targetElement;
	targetElement = document.getElementById(thingId) ;
	if (targetElement.style.display == "none")
	{
		targetElement.style.display = "" ;
	} else {
		targetElement.style.display = "none" ;
	}
}

/** Cookies */
function setCookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( exp_y )
  {
    var expires = new Date ( exp_y, exp_m, exp_d );
    cookie_string += "; expires=" + expires.toGMTString();
  }
  
  if ( !path )
  	path = "/";
  	
  //if ( !domain )
  //	domain = DOMAIN;

  if ( path )
        cookie_string += "; path=" + escape ( path );

  if ( domain )
        cookie_string += "; domain=" + escape ( domain );
  
  if ( secure )
        cookie_string += "; secure";
  
  document.cookie = cookie_string;
}

function getCookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}
