////////////////////////////////////////////////////////////////
// IMPRIME LA PAGE DEMANDÉE
function imprimer(){  
 if (navigator.appName == "Netscape") {
  window.print() ;  
 }
 else {
  var navi = '<OBJECT ID="navi1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
  document.body.insertAdjacentHTML('beforeEnd', navi);
  navi1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    navi1.outerHTML = "";  
 }
}
////////////////////////////////////////////////////////////////
 // DEPLIE OU REPLIE UN DIV
function depliRepli(nameDiv)
	{
	if (document.getElementById(nameDiv).style.display == 'none')
	{
		document.getElementById(nameDiv).style.display='block';
	}
	else
	{
		document.getElementById(nameDiv).style.display='none';
	}
}
////////////////////////////////////////////////////////////////
// RECUPÉRATION DES INFO DU NAVIGATEUR
function getNavigateur()
{
	// Récupération des infos du navigateur
	var N=navigator.appName; var V=navigator.appVersion;
	var version="?"; var nom=N; var os="?"; var langue="?";
	if (N=="Microsoft Internet Explorer") 
	{
		langue=navigator.systemLanguage
		version=V.substring(V.indexOf("MSIE",0)+5,V.indexOf(";",V.indexOf("MSIE",0)));
		if (V.indexOf("Win",0)>0) 
		{
			if ( V.indexOf(";",V.indexOf("Win",0)) > 0 ) 
			{
				os=V.substring(V.indexOf("Win",0),V.indexOf(";",V.indexOf("Win",0)));
			} else 
			{
				os=V.substring(V.indexOf("Win",0),V.indexOf(")",V.indexOf("Win",0)));
			}
		}
		if (V.indexOf("Mac",0)>0) 
		{
			os="Macintosh";
			version=V.substring(V.indexOf("MSIE",0)+6,V.indexOf(" ",V.indexOf("MSIE",0)));
		}
	}
	if (N=="Netscape") 
	{
		langue=navigator.systemLanguage
		version=(V.substring(0,V.indexOf("(",0)));
		if (V.indexOf("Mac",0)>0) 
		{
			os="Macintosh";
		}
		if (V.indexOf("Linux",0)>0) 
		{
			os="Linux";
		}
		if (V.indexOf("Win",0)>0) 
		{
			os=V.substring(V.indexOf("Win",0),V.indexOf(";",V.indexOf("Win",0)));
		}
		if (version==5) 
		{
			version="6.0"
		}
	}
	return (nom+"#"+version.substr(0,3)+"#"+os+"#"+langue)
}
////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////
// Change la couleur des lignes d'un tableau
function setPointer(theRow, thePointerColor)
{
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
		return false;
	}
	if (typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	}
	else if (typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	}
	else {
		return false;
	}
	var rowCellsCnt  = theCells.length;
	for (var c = 0; c < rowCellsCnt; c++) {
	theCells[c].style.backgroundColor = thePointerColor;
	}
	return true;
}

function changeColor(theRow, thePointerColor, theTextColor)
{
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
		return false;
	}
	if (typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	}
	else if (typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	}
	else {
		return false;
	}
	var rowCellsCnt  = theCells.length;
	for (var c = 0; c < rowCellsCnt; c++) {
	theCells[c].style.backgroundColor = thePointerColor;
	theCells[c].style.color = theTextColor;
	}
	return true;
}

// Ouverture d'une popup
 function OuvrirPopup(page,nom,option,largeur,hauteur)
 {
	   var top=(screen.height-hauteur)/2;
	   var left=(screen.width-largeur)/2;
       window.open(page,nom,"top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+option);
 }



