// JavaScript Document

function f_affiche_onglet(id,nbr_onglet,onglet){
	for(var i=1; i<=nbr_onglet; i++){
		document.getElementById(onglet+i).className = "title";
	}
	document.getElementById(onglet+id).className = "title_selected";
}

function f_affiche_bloc(id,nbr_bloc,bloc){
	for(var i=1; i<=nbr_bloc; i++){
		document.getElementById(bloc+i).style.display = "none";
	}
	document.getElementById(bloc+id).style.display = "block";
}

function f_tabSelected(id,nbElts,classe){
	for(var i=1; i<=nbElts; i++){
		if(document.getElementById(classe+i)){
			document.getElementById(classe+i).className = 'tab';
		}
	}
	if(document.getElementById(classe+id)){
		document.getElementById(classe+id).className = 'tab_selected';
	}
}

$(document).ready(function(){
$("#menu div").each(function(){
   $(this).mouseover(function(){
     $(this).children("ul").slideDown("fast");
         if($.browser.msie) { var hauteur = $(this).width(); $(this).children("ul").css({marginLeft:"-"+hauteur+"px"});   }
         $(this).prev().children("ul").fadeOut("fast");
     $(this).siblings().children("ul").fadeOut("fast");
   });
});
$("body").click(function(){
  $("#menu div ul").fadeOut("fast");
});

});