var gTimer = null;

var menu_nav = new Array();

menu_nav['home'] = new Array();
menu_nav['home']['/'] = 'Accueil';
menu_nav['home']['inscription.htm'] = 'Devenir membre';
menu_nav['home']['compte-parrainer.htm'] = 'Envoyer un email à un ami';
menu_nav['home']['livredor.htm'] = 'Livre d\'or du site';
menu_nav['home']['contact.htm'] = 'Contacter un administrateur';
menu_nav['home']['visite-guidee.htm'] = 'Visite guid&eacute;e';

menu_nav['exchanges'] = new Array();
menu_nav['exchanges']['forums.htm'] = 'Forums de discussion';
menu_nav['exchanges']['sondages.htm'] = 'Sondages en ligne';
menu_nav['exchanges']['blog.htm'] = 'Blogs personnels';
menu_nav['exchanges']['chat.htm'] = 'T\'chat';
menu_nav['exchanges']['dedibox.htm'] = 'D&eacute;dibox';

menu_nav['community'] = new Array();
menu_nav['community']['membres.htm'] = 'Annuaire des membres';
menu_nav['community']['membres-proches.htm'] = 'Membres par région';
menu_nav['community']['nouveaux-membres.htm'] = 'Nouveaux';
menu_nav['community']['anniversaire.htm'] = 'Anniversaires';
menu_nav['community']['rencontres.htm'] = 'Rencontres r&eacute;elles';
menu_nav['community']['membres-gold.htm'] = 'Gold';

menu_nav['competition'] = new Array();
menu_nav['competition']['noter.htm'] = 'Noter les photos';
menu_nav['competition']['top-canons-femmes.htm'] = 'Classement';
menu_nav['competition']['dernieres-photos.htm'] = 'Galerie photos';

menu_nav['account'] = new Array();
menu_nav['account']['compte.htm'] = 'Mon compte';
menu_nav['account']['messagerie.htm'] = 'Ma messagerie';
menu_nav['account']['infos.htm'] = 'Mon profil';
menu_nav['account']['amis.htm'] = 'Mes amis';
menu_nav['account']['photos.htm'] = 'Mes photos';
menu_nav['account']['infos-video.htm'] = 'Ma vidéo';
menu_nav['account']['blog.htm?page=articles'] = 'Mon blog';
menu_nav['account']['stats.htm'] = 'Mes stats';
menu_nav['account']['offres.htm'] = 'Offres Ame-Soeur';
menu_nav['account']['points.htm'] = 'Mes points';
menu_nav['account']['recherches.htm'] = 'Mes recherches';

menu_nav['stuff'] = new Array();
menu_nav['stuff']['jeux.htm'] = 'Jeux';
menu_nav['stuff']['zaphotos.htm'] = 'Zaphotos';
menu_nav['stuff']['horoscope.htm'] = 'Horoscope';

menu_nav['online'] = new Array();
menu_nav['online']['connectes.htm'] = 'Membres actuellement connect&eacute;s sur le site';

function menu_execute(id_active, id_selected) {

	var html = '<ul>';
	for (var clef in menu_nav){
		if (id_selected != clef && id_active != clef) {document.getElementById('button_' + clef).className = '';}
	}
	var j=0;
	for (var clef in menu_nav[id_active]){
		html +=  '<li' + ((clef == menu_pag) ? ' class="active"' : '') + '>';
		if(j>0) {html+='&nbsp;&#124;&nbsp;';}
		html +=  '<a href="' + clef + '">' + menu_nav[id_active][clef] + '</a></li>';
		j++;
	}

	html += '<li>&nbsp;&#124;&nbsp;<a href="aide.htm' + ((menu_aid != 0) ? '?tid=' + menu_aid : '') + '"  onclick="popupAide(this.href);return false;">Aide</a></li></ul>';

	document.getElementById('menuSub').innerHTML = html;
	if (id_selected == id_active) {document.getElementById('button_' + id_active).className = 'selected_active';
		document.getElementById('menuSub').className = 'menu_sub_selected';
	} else {document.getElementById('button_' + id_selected).className = 'selected';
		document.getElementById('button_' + id_active).className = 'active';
		document.getElementById('menuSub').className = '';
	}

}

function menu_init() {

	menu_execute(menu_but, menu_but);

}

function menu_in(id) {

	gTimer = setTimeout('menu_execute(\'' + id + '\',\'' + menu_but + '\')', 100);

}


function menu_out(id) {

	clearTimeout(gTimer);

}