
function cacheSousMenu(nb) {
	for (i=0; i < nb; i++)
	{
		document.getElementById('submenu'+i).style.display = "none";
	}	
}

function afficheSousMenu(affiche, nb) {
	/*for (i=0; i < nb; i++)
	{
		document.getElementById('submenu'+i).style.display = "none";
	}*/
	document.getElementById('submenu'+affiche).style.display = "block";
}

 function rebours(annee, mois, jour)
	{
	var heures = 00;
    var minutes = 00;
    var secondes = 00;
    if (document.getElementById)
		{
		Maintenant = new Date;
		TempMaintenant = Maintenant.getTime();
		Future = new Date(annee, mois, jour);
		TempFuture = Future.getTime();
		Ecart = TempFuture - TempMaintenant;
		Ecart = Math.floor(Ecart / 1000);
		heures = Math.floor(Ecart / 3600);
		Ecart2 = Ecart - (3600*heures);
		minutes = Math.floor(Ecart2/60);
		secondes = Ecart2 - (60*minutes);
		document.getElementById("comptearebours").innerHTML=""+heures +":"+minutes+":"+secondes;
		}
    temporebours = setTimeout("rebours(annee, mois, jour)", 1000)
	  //temporebours = setTimeout("rebours(<?=$annee?>,<?=$mois?>,<?=$jour?>)", 1000)
   }

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD"

var ns6=document.getElementById&&!document.all
var ie=document.all

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}

function liste(listeTri) {
	//document.formProduit.flag.value = 2 ;
	document.listeTri.submit() ;
}