// init du nombre de rubriques dans le menu
var menunbr = 2;
var menunbr2 = 2;
// init autres var
var theDoc = document;
var theDoc2 = document;
var y;
var hr;

function showLib(pLib){
	for (i=1;i<=3;i++){
	eval("document.getElementById('id"+i+"').style.display='none';");
	}
document.getElementById('id'+pLib).style.display="";
}

function divmenu(divID,divHeight){
if (theDoc.getElementById(divID).style.display!=""){
	for (i=1;i<(menunbr+1);i++){
	eval ("document.getElementById('menu_div_"+i+"').style.display='none';");
	}
theDoc.getElementById(divID).style.display="";
	if (navigator.platform.indexOf("Mac") != 0){
	theDoc.getElementById(divID).style.height="0";
	speed = ((divHeight/12)+28);
	open_it(divHeight,divID,speed)
	}
}
}
function divmenu2(divID2,divHeight2){
if (theDoc2.getElementById(divID2).style.display!=""){
	for (i=1;i<(menunbr2+1);i++){
	eval ("document.getElementById('menu_div2_"+i+"').style.display='none';");
	}
theDoc.getElementById(divID2).style.display="";
	if (navigator.platform.indexOf("Mac") != 0){
	theDoc2.getElementById(divID2).style.height="0";
	speed = ((divHeight2/12)+28);
	open_it(divHeight2,divID2,speed)
	}
}
}
function open_it(max,name,hm){
	if (hm<0) return;
	maxi = max;
	divname = name;
	act = theDoc.getElementById(divname).style.height;
	act2 = parseInt(act);
	if (act2>=maxi) { clearTimeout(tempoO); theDoc.getElementById(divname).style.height=maxi+"px"; return; };
	y = ((act2-1)+hm);
	hr = hm-1;
	theDoc.getElementById(divname).style.height=y+"px";
	tempoO = setTimeout('open_it(maxi,divname,hr)', 10);
}

function swap_m(img_name,img_src,nochange){
	swap = eval('document.images.'+img_name);
	noext = ((img_src.length)-5);
	state = img_src.substr(noext,1)
	if ((state!=1))
	{
		noext2 = ((img_src.length)-4);
		src_trim = img_src.substring(0,noext2)
		swap.src=src_trim+"1.gif";
	}
	if ((state==1)&&(nochange==''))
	{
		noext2 = ((img_src.length)-5);
		src_trim = img_src.substring(0,noext2)
		swap.src=src_trim+".gif";
	}
}