$( function(){
	$(".menu_niv0>ul>li").hover(
			function()
			{
				$(this).find("ul").show();
			},
			function()
			{
				$(this).find("ul").hide();
			}
	);
	
	$(".menu_niv1 li>a").hover( function(){
		var menu_niv2_hidden = $(this).next(".menu_niv2:hidden");
			if (menu_niv2_hidden.length)
			{
				$(".menu_niv2").hide();
				$(".menu_niv2.current").show();
				if($(this).next(".menu_niv2").length > 0)
				{
					$(this).next(".menu_niv2").show();
				}
			}
	});
});

$(document).ready( function(){
	$(".menu_niv2.current").show();
	$(".menu_niv1.current").show();
});

function fenetre_fiche_discipline(num, type) {
	  fen = window.open("rech_discipline.php?num=" + num + "&type=" + type, "", "width=445,height=180,scrollbars=yes");
	 if (!fen.opener) fen.opener = self;
}

function fenetre_fiche_diplome(num, suffix) {
	  fen = window.open("rech_origine.php?number=" + num + "&suffix=" + suffix, "", "width=445,height=180,scrollbars=yes");
	 if (!fen.opener) fen.opener = self;
}

function fenetre_fiche_universite(num, suffix, type) {
	  fen = window.open("rech_universite.php?number=" + num + "&suffix=" + suffix + "&type=" + type, "", "width=445,height=180,scrollbars=yes");
	 if (!fen.opener) fen.opener = self;
}
function fenetre_fiche_universite2(num, num2, suffix, type) {
	  fen = window.open("rech_universite.php?number=" + num + "&number2=" + num2 + "&suffix=" + suffix + "&type=" + type, "", "width=445,height=180,scrollbars=yes");
	 if (!fen.opener) fen.opener = self;
}
function fenetre_rech_contact(num, num2, suffix, type) {
	  fen = window.open("rech_contact_as_no.php?number=" + num + "&number2=" + num2, "", "width=445,height=180,scrollbars=yes");
	 if (!fen.opener) fen.opener = self;
}

function addParticipant2Contact(id_participant, as_no)
{
	fen = window.open('addParticipant2Contact.php?id_participant=' + id_participant + '&as_no=' + as_no, "", "width=445,height=180,scrollbars=yes");
	if (!fen.opener) fen.opener = self;
}

function paysChange(pays, numero, type)
{
	if (pays.value == 'Etats Unis')
	{
		$("#adresse_" + type + numero + " #tr_etat_us_" + type + numero).show();
	}
	else
	{
		$("#adresse_" + type + numero + " #tr_etat_us_" + type + numero).hide();
	}
}



