var gTimer = null;

var menu_nav = new Array();
var menu_class = new Array();
menu_nav['home'] = new Array();
menu_nav['home']['references.php'] = 'Nos références';
menu_nav['home']['lire/a-propos-de-peel-13.html'] = 'A propos de PEEL';
menu_nav['home']['http://forum.peel.fr/'] = 'FORUM';
menu_nav['home']['lire/peel-le-blog-193.html'] = 'BLOG';
menu_nav['home']['revendeurs-partenaires.php'] = 'Revendeurs';
menu_nav['home']['lire/partenaires-commerciaux-amp-revendeurs-204.html'] = 'Devenir revendeur';
menu_nav['home']['compte.php'] = 'Mon compte';
menu_class['class'] = 'Accueil';

menu_nav['ecommerce'] = new Array();
menu_nav['ecommerce']['lire/peel-shopping-8.html'] = 'PEEL SHOPPING';
menu_nav['ecommerce']['solution-e-commerce-1/peel-premium-1.html'] = 'PEEL PREMIUM';
menu_nav['ecommerce']['solution-e-commerce-1/pack-serenite-2.html'] = 'PACK SERENITE';
menu_nav['ecommerce']['lire/comparer-9.html'] = 'Comparer nos differentes solutions';
menu_nav['ecommerce']['lire/utiliser-peel-10.html'] = 'Utiliser PEEL PREMIUM';
menu_nav['ecommerce']['achat/modules-a-la-carte-4.html'] = 'Modules à la carte';
menu_class['ecommerce'] = 'solutionEcommerce';

menu_nav['services'] = new Array();
menu_nav['services']['creation-graphique-6/creation-graphique-10.html'] = 'Création graphique';
menu_nav['services']['webmastering-8/webmastering-et-infogerance-de-votre-boutique-12.html'] = 'Webmastering';
menu_nav['services']['hebergement-9/hebergement-15.html'] = 'Hébergement';
menu_nav['services']['lire/referencement-209.html'] = 'Référencement';
menu_class['services'] = 'nosServices';

menu_nav['info'] = new Array();
menu_nav['info']['lire/licence-gpl-70.html'] = 'Licence GPL';
menu_nav['info']['lire/licence-commerciale-71.html'] = 'Licence commerciale';
menu_nav['info']['lire/referencement-112.html'] = 'Sur le référencement';
menu_nav['info']['lire/legislation-198.html'] = 'Infos Législation';
menu_nav['info']['lire/conseils-200.html'] = 'Conseils';
menu_nav['info']['lire/informations-58/conditions-generales-d-039-utilisation-1008.html'] = 'CGU';
menu_class['info'] = 'informations';

menu_nav['help'] = new Array();
menu_nav['help']['lire/questions-frequentes-60.html'] = 'FAQ';
menu_nav['help']['lire/documentation-61.html'] = 'Documentation';
menu_class['help'] = 'aide';

menu_nav['contact'] = new Array();
menu_nav['contact']['utilisateurs/sendmail.php'] = 'Formulaire de Contact';
menu_class['contact'] = 'contact';

function menu_execute(id) {
	var html = '<ul>';
	//if(typeof(document.getElementById)!='undefined'){
	for (var clef in menu_nav){
		if (id != clef) {
			document.getElementById('nav-' + clef).className = '';
		}
	}
	var j=0;
	for (var clef in menu_nav[id]){
		if(menu_nav[id][clef]!=''){
			html +=  '<li' + ((clef == menu_pag) ? ' class="active '+ menu_class[id] +' "' : '') + '>';
			html +=  '<a href="'+menu_path + clef + '" '+((clef.substring(0,7) == 'http://') ? ' onclick="return(window.open(this.href)?false:true);"' : menu_target)+'>&nbsp;&nbsp;' + menu_nav[id][clef] + '&nbsp;&nbsp;</a></li>';
			j++;
		}
	}
	html += '</ul>';

	document.getElementById('menuSub').innerHTML = html;
	document.getElementById('nav-' + id).className = 'selected';
	if (menu_but == id) {
		document.getElementById('menuSub').className = id+'MenuSub';
	} else {
		document.getElementById('menuSub').className = id+'MenuSub';
	}
}

function menu_init() {
	menu_execute(menu_but);
}

function menu_in(id) {
	gTimer = setTimeout('menu_execute(\'' + id + '\')', 100);
}

function menu_out(id) {
	clearTimeout(gTimer);
	//menu_init();
}