// JavaScript Document
<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//Fonction modifiée pour afficher le popup au centre de l'écran
function openCenteredWindow(theURL,winName,width,height,features) { //v2.0
	var top=(screen.height-height)/2;
    var left=(screen.width-width)/2;
	window.open(theURL,winName,"top="+top+",left="+left+",width="+width+",height="+height+","+features);
}

function printit(){
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}

//Vérifie la validité d'une date
	function isDate (year, month, day) {
		// month argument must be in the range 1 - 12
		month = month - 1; // javascript month range : 0- 11
		var tempDate = new Date(year,month,day);
		
		if (!((year == tempDate.getFullYear()) && (month == tempDate.getMonth()) &&	(day == tempDate.getDate()))){
			return false;
		}
		return true;
	}
//-->

//Vérifie la syntaxe d'une adresse email
function checkMail(email) {
	return email.match(/^[A-Za-z0-9_.-]+@([A-Za-z0-9_]+\.)+[A-Za-z]{2,4}$/)!=null;
}

//Vérifie que la chaine passée finie par .jpg pou .jpeg
function checkJpegExtension(fileName) {
	return fileName.match(/^(.)*(.jpg|.jpeg|.JPG|.JPEG)$/)!=null;
}

//Affiche ou non une zone DIV
function show_hideDiv(divId) { 

  // Booléen reconnaissant le navigateur (vu en partie 2)
  isIE = (document.all) 
  isNN6 = (!isIE) && (document.getElementById)

  // Compatibilité : l'objet DIV est détecté selon le navigateur
  if (isIE) DIV = document.all[divId];
  if (isNN6) DIV = document.getElementById(divId);

  // On affiche ou on cache
  if (DIV.style.display == "none"){
    // Cas ou le tableau est caché
    DIV.style.display = ""
  } else {
    // On le cache
    DIV.style.display = "none"
   }
}
function show_DIV(param1) { 

  // Booléen reconnaissant le navigateur
  isIE = (document.all) 
  isNN6 = (!isIE) && (document.getElementById)
	
	nb = show_DIV.arguments.length;
    
    for (var i = 0; i < nb; i++)
    {
         if (isIE) DIV = document.all[show_DIV.arguments[i]];
	  	 if (isNN6) DIV = document.getElementById(show_DIV.arguments[i]);
		 DIV.style.display = ""
    }
  
}
function hide_DIV(param1) { 

  // Booléen reconnaissant le navigateur
  isIE = (document.all) 
  isNN6 = (!isIE) && (document.getElementById)
	
	nb = hide_DIV.arguments.length;
    
    for (var i = 0; i < nb; i++)
    {
         if (isIE) DIV = document.all[hide_DIV.arguments[i]];
	  	 if (isNN6) DIV = document.getElementById(hide_DIV.arguments[i]);
		 DIV.style.display = "none"
    }
  
}
//Vérifie que la chaine passée finie par .gif
function checkGIFExtension(fileName) {
	return fileName.match(/^(.)*(.gif|.GIF)$/)!=null;
}

function overline(param1){
  isIE = (document.all) 
  isNN6 = (!isIE) && (document.getElementById)
  nb = overline.arguments.length;
    
    for (var i = 0; i < nb; i++){
    	if (isIE) DIV = document.all[overline.arguments[i]];
  		if (isNN6) DIV = document.getElementById(overline.arguments[i]);
  		DIV.style.textDecoration='line-through';
	}
}

function unoverline(param1){
  isIE = (document.all) 
  isNN6 = (!isIE) && (document.getElementById)
  nb = unoverline.arguments.length;
    
    for (var i = 0; i < nb; i++){
    	if (isIE) DIV = document.all[unoverline.arguments[i]];
  		if (isNN6) DIV = document.getElementById(unoverline.arguments[i]);
  		DIV.style.textDecoration='none';
	}
}
