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

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.5)+8);
			open_it(divHeight,divID,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)', 30);
}

// Swap d'image
function swap_p(img_name,to_what,nochange) {
	if (nochange=='') {
		var swap, towhat;
		swap	= eval('document.images.'+img_name);
		towhat='_img/presentation/'+to_what+'.gif';
		swap.src	= towhat;
	}
}
