function makeOver(id_O) {
	oTable = document.getElementById('mn_'+id_O);
	if(oTable.className!='table_select')
	{
		oTable.className = 'table_hover';
		//oLeftImg = document.getElementById('l_mn_'+id_O);
		oRightImg = document.getElementById('r_mn_'+id_O);
		oRightImg.style.display = 'block';
	}
	nbMenu = menu.length;
	for(a=0;a<nbMenu;a++)
		if(a!=id_O) makeOut(a);
	//oLeftImg.src = 'img/pixel.png';
	//oRightImg.src = 'img/bt_menu_right.png';
}
function makeOut(id_O) {
	oTable = document.getElementById('mn_'+id_O);
	if(oTable.className != 'table_select')
	{
		oTable.className = '';
		//oLeftImg = document.getElementById('l_mn_'+id_O);
		oRightImg = document.getElementById('r_mn_'+id_O);
		oRightImg.style.display = 'none';
		//oLeftImg.src = 'img/bt_menu_left.png';
	}
}
var to;
function showMenu(id_O) {
	if(activeTab==id_O)
		clearTimeout(to);
		/*
	if(activeTab!=id_O)
	{
		oActTab = document.getElementById('dhtml_mn_'+activeTab);
		if(oActTab!=null)
			oActTab.style.visibility = 'hidden';
	}*/
	if(document.getElementById('dhtml_mn_'+id_O)==null || activeTab==id_O)
	{
		oImg_g = document.getElementById('bk_mn_g_'+id_O);
		l_s = oImg_g.style.backgroundImage.length;
		if (oImg_g.style.backgroundImage.substring(l_s-6, l_s-5) != "1")
			oImg_g.style.backgroundImage = oImg_g.style.backgroundImage.substring(0, l_s-5)+'_1.gif)';
			
		oImg = document.getElementById('bk_mn_'+id_O);
		m_s = oImg.style.backgroundImage.length;
		if (oImg.style.backgroundImage.substring(m_s-6, m_s-5) != "1")
			oImg.style.backgroundImage = oImg.style.backgroundImage.substring(0, m_s-5)+'_1.gif)';
		//oImg.style.backgroundImage = 'url('+imageFolder+'img_mn_1.gif)';
		
		oImg_d = document.getElementById('bk_mn_d_'+id_O);
		r_s = oImg_d.style.backgroundImage.length;
		if (oImg_d.style.backgroundImage.substring(r_s-6, r_s-5) != "1")
			oImg_d.style.backgroundImage = oImg_d.style.backgroundImage.substring(0, r_s-5)+'_1.gif)';

		this.aMenu = menu[id_O];
		nbMenu = menu.length;
		for(a=0;a<nbMenu;a++)
		{
			oDHide = document.getElementById('dhtml_mn_'+a);
			if (oDHide!=null)// && activeTab!=a)
			{
				if (to!=undefined)
				{
					clearTimeout(to);
				}
				setTimeout('killObject('+a+');',0);
			}
			//else if(activeTab==a && id_O!=activeTab)
			//	oDHide.style.visibility = 'hidden';
		}
		oTable = document.getElementById('mn_'+id_O);
		
		leftTable = document.getElementById('mn_0');
		oY = oTable.offsetTop;
		oX = oTable.offsetLeft;
		//oX = leftTable.offsetLeft;
		//alert(oX+" - "+oY);

		oMenu = document.createElement('div');
		oMenu.id = 'dhtml_mn_'+id_O;
		oMenu.className = 'dhtml_mn';
		oMenu.style.position = 'absolute';
		oMenu.style.top = 29+'px';
		oMenu.style.left = oX-5+'px';
		if(activeTab!=id_O)
			oMenu.style.zIndex = 10;
		else
			oMenu.style.zIndex = 9;
		oTbMn = document.createElement('table');
		oTbMn.border = 0;
		oTbMn.cellPadding = 0;
		oTbMn.cellSpacing = 0;
		//oTbMn.width = '200';
		oTbMn.id = 'dynmenu';
		nbRow = this.aMenu.length;

if (this.aMenu.length != "0")
{
		dest = new Array();
		oTr1 = oTbMn.insertRow(-1);
		oTr2 = oTbMn.insertRow(-1);
		oTr3 = oTbMn.insertRow(-1);
		oTd1_1 = oTr1.insertCell(-1);
		oImgHG = document.createElement('img');
		oImgHG.src = imageFolder+'ssmenu_hautg.gif';
		oTd1_1.appendChild(oImgHG);
		oTd1_1.width = '4';
		oTd1_2 = oTr1.insertCell(-1);
		oTd1_2.style.backgroundImage = 'url('+imageFolder+'ssmenu_haut.gif)';
		oTd1_2.width = '150';
		oTd1_2.height = '4';
		//oCacheImg = document.createElement('img');
		//oTd1_2.appendChild(oCacheImg);
		//oCacheImg.src = imageFolder+'ssmenu_pixel.gif';
		//oCacheImg.height = 4;
		//oCacheImg.width = oTable.width-2;
		//oCacheImg.style.marginLeft = oTable.offsetLeft+1+'px';
		oTd1_3 = oTr1.insertCell(-1);
		oImgHD = document.createElement('img');
		oImgHD.src = imageFolder+'ssmenu_hautd.gif';
		oTd1_3.appendChild(oImgHD);
		oTd1_3.width = '4';
		oTd2_1 = oTr2.insertCell(-1);
		oTd2_1.style.backgroundImage = 'url('+imageFolder+'ssmenu_g.gif)';
		oTd2_1.width = '4';
		oTd2_2 = oTr2.insertCell(-1);
		oTd2_2.style.backgroundImage = 'url('+imageFolder+'ssmenu_pixel.gif)';
		oTd2_3 = oTr2.insertCell(-1);
		oTd2_3.style.backgroundImage = 'url('+imageFolder+'ssmenu_d.gif)';
		oTd3_1 = oTr3.insertCell(-1);
		oImgBG = document.createElement('img');
		oImgBG.src = imageFolder+'ssmenu_basg.gif';
		oTd3_1.appendChild(oImgBG);
		oTd3_2 = oTr3.insertCell(-1);
		oTd3_2.style.backgroundImage = 'url('+imageFolder+'ssmenu_bas.gif)';
		oTd3_3 = oTr3.insertCell(-1);
		oTd3_3.height = '4';
		oTd3_3.width = '4';
		oImgBD = document.createElement('img');
		oImgBD.src = imageFolder+'ssmenu_basd.gif';
		oTd3_3.appendChild(oImgBD);

		for(i=0;i<nbRow;i++)
		{
			if(this.aMenu[i]!=undefined)
			{
				oLink = document.createElement('a');
				oTd2_2.appendChild(oLink);
				oLink.className = 'bleu10';
				oLink.innerHTML = this.aMenu[i][0];
				oLink.style.marginLeft = '5px';
				oLink.style.cursor = 'pointer';
				eval('oLink.onmouseover = function () { clearTimeout(to); }');
				
				if ((i % 1) == 0) oTd2_2.appendChild(document.createElement('br'));
				
				if(this.aMenu[i][1]!=undefined)
				{
					eval('oLink.onclick = function () { document.location.href=\''+this.aMenu[i][1]+'\'; }');
					eval('oLink.onmouseover = function () { clearTimeout(to); }');
				}
			}
		}
}
		oMenu.appendChild(oTbMn);
		oTable.appendChild(oMenu);
		//alert(oMenu.innerHTML);

		if(activeTab!=id_O)
		{
			oTbMn.onmouseover = function()
			{
				clearTimeout(to);
			}
			oTable.onmouseout = function() {
						to = setTimeout('killObject('+id_O+');',800);
			}
			oMenu.onmouseover = function () {
					clearTimeout(to);
			}
		}
	}
	else
	{
		if(to!=undefined)
			clearTimeout(to);
	}
}
function redo(idd)
{
setTimeout('redodo();',2000);
}
function redodo()
{
	try
	{
	if(oMenu!=undefined && oTable != undefined)
		oTable.removeChild(oMenu);
	}
	catch (error)
	{
	}
}
function makeTdOver(id_O,sid_O) {
	oTd = document.getElementById('td_menu_'+sid_O);
	oTd.className = 'td_hover';
	
	nbSMenu = menu[id_O].length;
	for(a=0;a<nbSMenu;a++)
		if(a!=sid_O) makeTdOut(a);
}
function makeTdOut(id_O) {
	oTable = document.getElementById('td_menu_'+id_O);
	oTable.className = 'td_normal';
}
function killObject(id_O) {
	oMenu = document.getElementById('dhtml_mn_'+id_O);
	oTable = document.getElementById('mn_'+id_O);
//alert(id_O);
//alert(nochangeTab);
	if(id_O!=nochangeTab)
	{
		oImg_g = document.getElementById('bk_mn_g_'+id_O);
		l_s = oImg_g.style.backgroundImage.length;
		if (oImg_g.style.backgroundImage.substring(l_s-6, l_s-5) == "1")
			oImg_g.style.backgroundImage = oImg_g.style.backgroundImage.substring(0, l_s-7)+'.gif)';
//alert(oImg_g.style.backgroundImage);
		oImg = document.getElementById('bk_mn_'+id_O);
		c_s = oImg.style.backgroundImage.length;
		if (oImg.style.backgroundImage.substring(c_s-6, c_s-5) == "1")
			oImg.style.backgroundImage = oImg.style.backgroundImage.substring(0, c_s-7)+'.gif)';
//alert(oImg.style.backgroundImage);
		oImg_d = document.getElementById('bk_mn_d_'+id_O);
		r_s = oImg_d.style.backgroundImage.length;
		if (oImg_d.style.backgroundImage.substring(r_s-6, r_s-5) == "1")
			oImg_d.style.backgroundImage = oImg_d.style.backgroundImage.substring(0, r_s-7)+'.gif)';
//alert(oImg_d.style.backgroundImage);
	}
	//oActive = document.getElementById('mn_'+activeTab);
	if(oMenu!=undefined && oTable != undefined)
		oTable.removeChild(oMenu);
}
function hideMenu(id_O) {
	to = setTimeout('killObject('+id_O+');makeOut('+id_O+');',10);
}
function showHide(id_C,id_O)
{
	plus = document.getElementById('plus_'+id_C+'_'+id_O);
	ref = document.getElementById('ref_'+id_C+'_'+id_O);
	list = document.getElementById('list_'+id_C);
	nbel = list.childNodes.length;
	list_Children = list.childNodes;
	b = 0;
	for(a=0;a<nbel;a++)
	{
		if(list_Children[a].id != undefined)
		{
			if(list_Children[a].id.search(/ref_/)!=-1)
			{
				b++;
			}
		}
	}
	for(c=0;c<b;c++)
	{
		oref = document.getElementById('ref_'+id_C+'_'+c);
		oplus = document.getElementById('plus_'+id_C+'_'+c);
		if(oref.id == 'ref_'+id_C+'_'+id_O)
		{
			if(oref.className=='doc_view_show')
			{
				oref.className = 'doc_view_hide';
				oplus.innerHTML = '[ + ]';
			}
			else
			{
				oplus.innerHTML = '[ &ndash; ]';
				oref.className = 'doc_view_show';
			}
		}
		else
		{
			oref.className = 'doc_view_hide';
			oplus.innerHTML = '[ + ]';
		}
	}
}