// JavaScript Document

// Rollovers sur la nav du haut

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);



// Deploiement des blocs de gauche dans les pages int?rieures

function toggleSubMenuVisibilityDiv(titi){
	if (document.getElementsByTagName){
		var subMenu = titi.getElementsByTagName("div")[0];
		if (subMenu){
			if (subMenu.style.display == 'none')
				subMenu.style.display='block';
			else
				subMenu.style.display='none';
		}
	}
}
function toggleSubMenuVisibility(toto){
	/*toggleSubMenuVisibilityDiv(toto.parentNode.parentNode);*/
	/* Quand y'aura plus le lien dans le h1*/
	toggleSubMenuVisibilityDiv(toto.parentNode);

}
function initMenu(){
	if (document.getElementById){
		toggleSubMenuVisibilityDiv(document.getElementById("news"));
		toggleSubMenuVisibilityDiv(document.getElementById("coming_events"));
		toggleSubMenuVisibilityDiv(document.getElementById("working_groups"));
		toggleSubMenuVisibilityDiv(document.getElementById("publishing"));
		toggleSubMenuVisibilityDiv(document.getElementById("special_reports"));
	}
}

//	Function to change location from the select menu
function go()
{
	box = document.getElementById("select_shortcuts_int");
	destination = box.options[box.selectedIndex].value;
	if (destination) location.href = destination;
}