/* DHTML menus  *//* ------------ *//* -----------------------------------------------------------------------	detect ie 5 Mac or lower	Sorry for the browser sniffing, I need it for the IE 5 Mac hacks below    ----------------------------------------------------------------------- */	/* 		Browser detection adapted from JavaScript Browser Sniffer 	by Eric Krok, Andy King, Michel Plungjan Jan. 31, 2002 	(see http://www.webreference.com/ for more information), 	whose authors cannot be held responsible for the code and comments below.		*/			var is_ie  = false;		// I wish.		var user_agent         = navigator.userAgent.toLowerCase();	var user_agent_version = navigator.appVersion.toLowerCase();		// Note: On IE, start of appVersion return 3 or 4	// which supposedly is the version of Netscape it is compatible with.	// So we look for the real version further on in the string		var msie_pos = user_agent_version.indexOf('msie');		if (msie_pos != -1) {		minor_version = parseFloat(user_agent_version.substring(msie_pos + 5, user_agent_version.indexOf(';', msie_pos)));		major_version = parseInt(minor_version);			is_ie = true;	}		var is_mac = (user_agent.indexOf("mac") != -1);		var is_mac_ie_5    = (is_ie && is_mac && major_version == 5);/* ----------------------------------------------------------------	end IE 5 Mac sniffing		on to the menus...   ---------------------------------------------------------------- */		// menus should be named "menu-1", "menu-2", "menu-3" etc.		// Ugly hack #1	// IE 5 Mac shows the menu items disappearing after the onload event,	// so we hide them right away...	if (is_mac_ie_5) {				document.write ('<style type="text/css"> div#'+menu_div_id+' ul ul { display: none; }<\/style>');		window.onresize = function() {			window.location.reload();			//news_div = document.getElementById("news");			//news_div.style.right = '15px';			//news_div.style.margin = '0 -15px 0 0';		}	}//	var menu_div_id = '';	var menus_OK = false;	var num_menus = 0;	// MUST be called onload, num argument is the number of menus	function init_menus(menu_id, num) {		if (num > 0) {			if (document.getElementById && document.getElementById('menu-1') && document.getElementById('menu-1').style) {					menus_OK = true;					num_menus = num;					menu_div_id = menu_id;					hide_menus();			}		}	}		function show_menu(menu_ID) {		if (menus_OK) {					current_menu = document.getElementById("menu-"+menu_ID);						hide_menus();  			current_menu.style.display = "block";			// Ugly hack #2			// IE 5 Mac doesn't redraw the div correctly by itself, so we force it to.			if (is_mac_ie_5) {				navigation_div = document.getElementById(menu_div_id);				navigation_div.style.height = (navigation_div.offsetHeight + current_menu.offsetHeight) + "px";	// make the div greater				navigation_div.style.height = "auto";	// so it gets smaller again when a menu is closed			}		}	}		function toggle_menu(menu_ID) {		if (menus_OK) {						current_menu = document.getElementById("menu-"+menu_ID);			current_display = current_menu.style.display;						hide_menus();			if (current_display != "block") {				//document.getElementById("titre-menu-"+menu_ID).style.fontWeight = 'bold';				current_menu.style.display = "block";								// Ugly hack #2				// IE 5 mac doesn't redraw the div correctly by itself, so we force it to.				if (is_mac_ie_5) {					navigation_div = document.getElementById(menu_div_id);					navigation_div.style.height = (navigation_div.offsetHeight + current_menu.offsetHeight) + "px";	// make the div greater					navigation_div.style.height = "auto";	// so it gets smaller again when a menu is closed				}			}		}		return false;	}		function hide_menus() {		if (menus_OK) {			for (i = 1; i <= num_menus; i++) {				with (document.getElementById("menu-"+i).style) {					display = "none";				}			}		}	}	