/**
 * Bibliothèque de fonctions JS
 */
 
/*
 * Récupère un élément
 * HTML grâce à son ID.
 *
 * @return HTMLElement
 */
function get(elementId) {
	return document.getElementById(elementId);
}


/*
 * Indique si le navigateur...
 * utilisé est IE version ???
 *
 * @return boolean
 */
function iev(ieVersion) {

	var iePattern = new RegExp("MSIE " + ieVersion, "gi");
	return ( navigator.appName == "Microsoft Internet Explorer" && iePattern.test(navigator.appVersion) );
	
}


/*
 * Indique si le navigateur...
 * utilisé est Internet Expl.
 *
 * @return boolean
 */
function sie() {

	var iePattern = new RegExp("MSIE ", "gi");
	return ( navigator.appName == "Microsoft Internet Explorer" && iePattern.test(navigator.appVersion) );
	
}


/*
 * Renvoie la hauteur de la fenêtre
 */
function wht() {

  if ( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    return window.innerHeight;
  } else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    return document.documentElement.clientHeight;
  } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    return document.body.clientHeight;
  }
  
  return 0;
  
}


/*
 * Renvoie la largeur de la fenêtre
 */
function wwh() {

  if ( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    return window.innerWidth;
  } else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    return document.documentElement.clientWidth;
  } else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    return document.body.clientWidth;
  }
  
  return 0;
  
}


