//ajoutertitre
function springing_Menu(currMenu) {
if (document.getElementById) {
     thisMenu=document.getElementById(currMenu).style;
     if (thisMenu.display=='block') {
          thisMenu.display='none';}
          else {
          thisMenu.display='block';}
      return false;}
else {
return true;}
}

// Selection
var color_selec='#9d9dcd';
var color_over='#cccccc';
function trover(tab) {
	if (tab.bgColor != color_selec) {
		tab.bgColor = color_over;
	}
tab.style.border = 'thin inset';
tab.style.cursor = 'hand';
}
function trout(tab) {
	if (tab.bgColor != color_selec) {
		tab.bgColor='#ffffff';
	}
}
function trclick(tab) {
		for (i=0;i<alltr.length;i++)
		 {
			if (alltr[i].sourceIndex==tab.sourceIndex) { ligne=i; }
		}		
		
	if (ligne<nb_obj) {
	obj.selectedIndex = ligne;
	}
	majtab();
}
function majtab() {
	for (i=0;i<alltr.length;i++)
		{
			if (obj.options[i].selected == true) {
				alltr[i].bgColor='#9d9dcd';
				alltr[i].style.color='#ffffff';
			}
			else {
				alltr[i].bgColor='#ffffff';
				alltr[i].style.color='#000000';
			}
		}
}
function listbox(name) {
obj=document.getElementById(name);
obj.style.display='none';
nb_ligne=obj.size;
nb_obj=obj.options.length;
document.write('<div id="divlistbox" style="height:100;overflow:auto" onselectstart="return false">');
document.write('<table id="listbox" border=0 cellspacing=0 cellpadding=0>');
for (i=0;i<nb_obj;i++) {
	document.write('<tr height=20>');
		for (n=0;n<obj.options[i].innerHTML.split('|').length;n++) {
		document.write('<td>');
		document.write(obj.options[i].innerHTML.split('|')[n]); 
		document.write('</td>');
		}
	document.write('</tr>');
}
document.write('</table></div>');
document.getElementById('listbox').style.width= parseInt(obj.style.width)-21
document.getElementById('divlistbox').style.width= parseInt(obj.style.width);
document.getElementById('divlistbox').style.height= nb_ligne*20;
alltr = document.getElementById('listbox').getElementsByTagName("tr");
for (i=0;i<alltr.length;i++)
 {
  alltr[i].onmouseover= new Function("trover(this)");
  alltr[i].onmouseout = new Function("trout(this)");
  alltr[i].onclick = new Function("trclick(this,"+i+")");
 }
}

//2eme liste(meme page)
var color_selec2='#9d9dcd';
var color_over2='#cccccc';
function trover2(tab2) {
	if (tab2.bgColor != color_selec2) {
		tab2.bgColor = color_over2;
	}
tab2.style.border = 'thin inset';
tab2.style.cursor = 'hand';
}
function trout2(tab2) {
	if (tab2.bgColor != color_selec2) {
		tab2.bgColor='#ffffff';
	}
}
function trclick2(tab2) {
		for (i=0;i<alltr2.length;i++)
		 {
			if (alltr2[i].sourceIndex==tab2.sourceIndex) { ligne=i; }
		}		
		
	if (ligne<nb_obj2) {
	obj2.selectedIndex = ligne;
	}
	majtab2();
}
function majtab2() {
	for (i=0;i<alltr2.length;i++)
		{
			if (obj2.options[i].selected == true) {
				alltr2[i].bgColor='#9d9dcd';
				alltr2[i].style.color='#ffffff';
			}
			else {
				alltr2[i].bgColor='#ffffff';
				alltr2[i].style.color='#000000';
			}
		}
}
function listbox2(name) {
obj2=document.getElementById(name);
obj2.style.display='none';
nb_ligne=obj2.size;
nb_obj2=obj2.options.length;
document.write('<div id="divlistbox2" style="height:100;overflow:auto" onselectstart="return false">');
document.write('<table id="listbox2" border=0 cellspacing=0 cellpadding=0>');
for (i=0;i<nb_obj2;i++) {
	document.write('<tr height=20>');
		for (n=0;n<obj2.options[i].innerHTML.split('|').length;n++) {
		document.write('<td>');
		document.write(obj2.options[i].innerHTML.split('|')[n]); 
		document.write('</td>');
		}
	document.write('</tr>');
}
document.write('</table></div>');
document.getElementById('listbox2').style.width= parseInt(obj2.style.width)-21
document.getElementById('divlistbox2').style.width= parseInt(obj2.style.width);
document.getElementById('divlistbox2').style.height= nb_ligne*20;
alltr2 = document.getElementById('listbox2').getElementsByTagName("tr");
for (i=0;i<alltr2.length;i++)
 {
  alltr2[i].onmouseover= new Function("trover2(this)");
  alltr2[i].onmouseout = new Function("trout2(this)");
  alltr2[i].onclick = new Function("trclick2(this,"+i+")");
 }
}

//3eme liste
var color_selec3='#9d9dcd';
var color_over3='#cccccc';
function trover3(tab3) {
	if (tab3.bgColor != color_selec3) {
		tab3.bgColor = color_over3;
	}
tab3.style.border = 'thin inset';
tab3.style.cursor = 'hand';
}
function trout3(tab3) {
	if (tab3.bgColor != color_selec3) {
		tab3.bgColor='#ffffff';
	}
}
function trclick3(tab3) {
		for (i=0;i<alltr3.length;i++)
		 {
			if (alltr3[i].sourceIndex==tab3.sourceIndex) { ligne=i; }
		}		
		
	if (ligne<nb_obj3) {
	obj3.selectedIndex = ligne;
	}
	majtab3();
}
function majtab3() {
	for (i=0;i<alltr3.length;i++)
		{
			if (obj3.options[i].selected == true) {
				alltr3[i].bgColor='#9d9dcd';
				alltr3[i].style.color='#ffffff';
			}
			else {
				alltr3[i].bgColor='#ffffff';
				alltr3[i].style.color='#000000';
			}
		}
}
function listbox3(name) {
obj3=document.getElementById(name);
obj3.style.display='none';
nb_ligne=obj3.size;
nb_obj3=obj3.options.length;
document.write('<div id="divlistbox3" style="height:100;overflow:auto" onselectstart="return false">');
document.write('<table id="listbox3" border=0 cellspacing=0 cellpadding=0>');
for (i=0;i<nb_obj3;i++) {
	document.write('<tr height=20>');
		for (n=0;n<obj3.options[i].innerHTML.split('|').length;n++) {
		document.write('<td>');
		document.write('<input class="input" type="checkbox" name="supprimer" value="sup">&nbsp;<input class="input" maxlength="3" size="2" value="1" name="quantite">&nbsp;');
		document.write(obj3.options[i].innerHTML.split('|')[n]); 
		document.write('</td>');
		}
	document.write('</tr>');
}
document.write('</table></div>');
document.getElementById('listbox3').style.width= parseInt(obj3.style.width)-31
document.getElementById('divlistbox3').style.width= parseInt(obj3.style.width);
document.getElementById('divlistbox3').style.height= nb_ligne*20;
alltr3 = document.getElementById('listbox3').getElementsByTagName("tr");
for (i=0;i<alltr3.length;i++)
 {
  alltr3[i].onmouseover= new Function("trover3(this)");
  alltr3[i].onmouseout = new Function("trout3(this)");
  alltr3[i].onclick = new Function("trclick3(this,"+i+")");
 }
}

//4eme liste(meme page)
var color_selec4='#9d9dcd';
var color_over4='#cccccc';
function trover4(tab4) {
	if (tab4.bgColor != color_selec4) {
		tab4.bgColor = color_over4;
	}
tab4.style.border = 'thin inset';
tab4.style.cursor = 'hand';
}
function trout4(tab4) {
	if (tab4.bgColor != color_selec4) {
		tab4.bgColor='#ffffff';
	}
}
function trclick4(tab4) {
		for (i=0;i<alltr4.length;i++)
		 {
			if (alltr4[i].sourceIndex==tab4.sourceIndex) { ligne=i; }
		}		
		
	if (ligne<nb_obj4) {
	obj4.selectedIndex = ligne;
	}
	majtab4();
}
function majtab4() {
	for (i=0;i<alltr4.length;i++)
		{
			if (obj4.options[i].selected == true) {
				alltr4[i].bgColor='#9d9dcd';
				alltr4[i].style.color='#ffffff';
			}
			else {
				alltr4[i].bgColor='#ffffff';
				alltr4[i].style.color='#000000';
			}
		}
}
function listbox4(name) {
obj4=document.getElementById(name);
obj4.style.display='none';
nb_ligne=obj4.size;
nb_obj4=obj4.options.length;
document.write('<div id="divlistbox4" style="height:100;overflow:auto" onselectstart="return false">');
document.write('<table id="listbox4" border=0 cellspacing=0 cellpadding=0>');
for (i=0;i<nb_obj4;i++) {
	document.write('<tr height=20>');
		for (n=0;n<obj4.options[i].innerHTML.split('|').length;n++) {
		document.write('<td>');
		document.write('<input class="input" type="checkbox" name="supprimer" value="sup">&nbsp;<input class="input" maxlength="3" size="2" value="1" name="quantite">&nbsp;');
		document.write(obj4.options[i].innerHTML.split('|')[n]); 
		document.write('</td>');
		}
	document.write('</tr>');
}
document.write('</table></div>');
document.getElementById('listbox4').style.width= parseInt(obj4.style.width)-41
document.getElementById('divlistbox4').style.width= parseInt(obj4.style.width);
document.getElementById('divlistbox4').style.height= nb_ligne*20;
alltr4 = document.getElementById('listbox4').getElementsByTagName("tr");
for (i=0;i<alltr4.length;i++)
 {
  alltr4[i].onmouseover= new Function("trover4(this)");
  alltr4[i].onmouseout = new Function("trout4(this)");
  alltr4[i].onclick = new Function("trclick4(this,"+i+")");
 }
}