function ClickMB(Num)
{
	var vis = 'block';
	var pasvis = 'none';
	if( document.getElementById("ImgUp"+ Num).style.display != 'none')
	{
		pasvis = vis;
		vis = 'none';
	}
	//parent.h
	document.getElementById("MyDiv"+ Num).style.display=vis; 
	document.getElementById("ImgUp"+ Num).style.display = vis;
	document.getElementById("ImgDown"+ Num).style.display = pasvis;
}
function MouseOver(Num)
{
	if(document.getElementById("MyDiv"+ Num).style.display == 'none')
		document.body.style.cursor='default';
	else
	{
		if(ClickDown == true)
			document.body.style.cursor='s-resize';
		else
			document.body.style.cursor='hand';
	}

}
function MouseOut()
{
	document.body.style.cursor='';
}
function NavigateTo(url)
{
	var i = 1;
	var str = "";

	while(document.getElementById("MyDiv"+ i) != null)
	{
		if(document.getElementById("MyDiv"+ i).style.display == 'none')
			str = str +"-"+ i;
		i = i +1;
	}
	if(str != "")
	{
		var lien = "?";
		var pos = url.lastIndexOf("?");
		if(pos != -1)
			lien = "&";
		url = url + lien +"NomProp=MBouverts&ValProp="+ str +"&TypeProp=STRING";
	}
	window.location=url; 
}

//Commentaire sur MenuBar
IE4 = (document.all) ? 1 : 0;
NS4 = (document.layers) ? 1 : 0;
VERSION4 = (IE4 | NS4) ? 1 : 0;
if (!VERSION4) event = null;

function helpGetOffset(obj, coord) 
{
	var val = obj["offset"+coord] ;
	if (coord == "Top") val += obj.offsetHeight;
	while ((obj = obj.offsetParent )!=null) 
	{
			val += obj["offset"+coord];
			if (obj.border && obj.border != 0) val++;
	}
	return val;
}

function helpDown () 
{
	var ptrLayer;
	if (IE4) 
	{
		ptrLayer = document.all.helpBox;
		var tabLen = document.all.helpBox.length;
		if(tabLen > 0)
			ptrLayer = document.all.helpBox[0];
		ptrLayer.style.visibility = "hidden";
	}
	
	if (NS4) 
	{
		ptrLayer = document.helpBox;
		var tabLenNS = document.helpBox.length;
		if(tabLenNS > 0)
			ptrLayer = document.helpBox[0];
		document.helpBox.visibility = "hidden";
	}
}

function helpOver (event, texte) 
{
	helpOverPos (event, texte, 0, 0);
}
function helpOverPos (event, texte, posX, posY)
{
	if(texte == '') return;
	
	if (!VERSION4) return;
	var ptrObj, ptrLayer;
	if (IE4) {
			ptrObj = event.srcElement;
			ptrLayer = document.all.helpBox;
			var tabLen = document.all.helpBox.length;
			if(tabLen > 0)
				ptrLayer = document.all.helpBox[0];
	}
	if (NS4) {
			ptrObj = event.target;
			ptrLayer = document.helpBox;
			var tabLenNS = document.helpBox.length;
			if(tabLenNS > 0)
				ptrLayer = document.helpBox[0];
	}
		if (!ptrObj.onmouseout) ptrObj.onmouseout = helpDown;
		var str = '<DIV CLASS="helpBoxDIV">'+texte+'</DIV>';			
	if (IE4) {
		
			ptrLayer.innerHTML = str;
			ptrLayer.style.top = parseInt(helpGetOffset(ptrObj,"Top")) + 2 + posY;
			ptrLayer.style.left = helpGetOffset(ptrObj,"Left") + posX;
			
			ptrLayer.style.visibility = "visible";
					
			var position = ptrLayer.style.left;
			position = position.substring(0,position.length-2);
			position = parseInt(position) + 200;
			if(document.body.clientWidth < position)
				ptrLayer.style.left = document.body.clientWidth -200;
		}
	if (NS4) {
			ptrLayer.document.write (str);
			ptrLayer.document.close ();
			ptrLayer.document.bgColor = "#FFFFCF";
			ptrLayer.top  = ptrObj.y + 20;
			ptrLayer.left = ptrObj.x;
			ptrLayer.visibility = "show";
	}
}
