// WebCT95 
//
// Copyright (C) 2003 Conseil Général du Val d'Oise. All Rights
// Reserved.
//
// Developed by IDEALX S.A.S. and Bull S.A. 
//


/*
 *	@ 20050830 : ABA : 
 *	@ révision de la fonction pour ce projet
*/
function activeCurrentMenu(menuIdCurrent, menuIdParent, tabMenu) {
	if ( menuIdCurrent > 0 && menuIdParent > 0 )
	{
		menuIdCurrent = "menu"+menuIdCurrent;
		menuIdParent = "menu"+menuIdParent;

		if (document.getElementById && document.styleSheets) 
		{
			if (menuIdCurrent == menuIdParent)
			{
				if (document.getElementById(menuIdParent) != null) 
					document.getElementById(menuIdParent).style.color = "#F96E00";
			} 
			else 
			{
				if (document.getElementById(menuIdParent) != null) 
					document.getElementById(menuIdParent).style.color = "#F96E00";
				if (document.getElementById(menuIdCurrent) != null) 
					document.getElementById(menuIdCurrent).style.color = "#F96E00"; 
				if (document.getElementById("fond"+menuIdCurrent) != null) 
					document.getElementById("fond"+menuIdCurrent).style.backgroundImage = "url()";
			}
			showMenu("sub"+menuIdParent, tabMenu);
		}
	}
	else
	{
		// euuu
	}
}


function hideMenus(menuIds) {
    if (menuIds != null) 
	{
		if (document.getElementById && document.styleSheets) 
		{
		    for (var i = 0; i < menuIds.length; i++) 
			{
				if (document.getElementById(menuIds[i]) != null) 
				{
					with (document.getElementById(menuIds[i]).style) 
					{
						visibility = "hidden";
					}
				}
			}
		}
    }
}

function showMenu(subMenuId, menuIds) {  
	if (subMenuId != null) 
	{
		if (menuIds != null) 
		{
			if (document.getElementById && document.styleSheets) 
			{
				hideMenus(menuIds);
				if (document.getElementById(subMenuId) != null) 
				{
				    with (document.getElementById(subMenuId).style) 
					{
						visibility = "visible";
					}
				}
			}
		}
    }
}

/*
	cette fonction permet d'appeler des pages depuis flash
*/
function popup(theURL,winName,features) { 
  window.open(theURL,winName,features);
}


    

