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";
	}
}

function divmenu(divID, divHeight, parentdivID)
{
	var theDoc	= document;
	var theName	= divID.substr(0,3);
	elementCount= eval("theDoc.menu."+theName+".value;");

	elementCount2= theDoc.menu.gam.value;

	for (var i=0;i<elementCount2;i++) {
		var oDeal2 = "gam"+i;
		if (oDeal2==divID) continue;
		theDoc.getElementById(oDeal2).style.display='none';
	}

	tabHitTest = new Array();
	for (var j=0; j<elementCount ; j++) {
		var oDeal = theName+j;
		tabHitTest[j] = theDoc.getElementById(oDeal);
		theDoc.getElementById(oDeal).style.overflow='hidden'; // remise à hidden de tous les div du niveau
	}

	if (parentdivID<500) {
		theDoc.getElementById('cat'+parentdivID+'').style.overflow = 'visible'; // pas d'overflow pour la div parent utilisée
		theDoc.getElementById('cat'+parentdivID+'').style.height = '';
	}

	if (theDoc.getElementById(divID).style.display!="")
	{
		for (var i=0;i<elementCount;i++) {
			tabHitTest[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)
{
	var theDoc = document;
	maxi = max;
	divname = name;
	act = theDoc.getElementById(divname).style.height;
	act1 = ((act.length)-2);
	act2 = act.substr(act,act1);

	if (act2>=maxi) { clearTimeout(tempoO); theDoc.getElementById(divname).style.height=maxi; return; };

	y = ((act2-1)+hm);
	hr = hm-1;
	theDoc.getElementById(divname).style.height=(y);
	tempoO = setTimeout('open_it(maxi,divname,hr)', 30);
}