var gTimer = null;

var menu_nav = new Array();
if(lang=='fr'){
menu_nav['home'] = new Array();
menu_nav['home']['pagealgo.html'] = 'Accueil';
menu_nav['home']['inscription.html'] = 'S\'inscrire (gratuit)';
menu_nav['home']['a-propos.html'] = 'A propos d\'Algomtl';
menu_nav['home']['certification-verified.html'] = 'Statut VERIFIED';
menu_nav['home']['forum-export.html'] = 'Forum export';
menu_nav['home']['contact.html'] = 'Contactez-nous';
menu_nav['home']['visite-guidee.html'] = 'Visite Guidée';
menu_nav['home']['faq.html'] = 'FAQ / Aide';
menu_nav['home']['recrutement.html'] = 'Recrutement';
menu_nav['home']['http://en.algomtl.com/'] = 'In English';
menu_nav['home']['http://es.algomtl.com/'] = 'En Español';

menu_nav['ads'] = new Array();
menu_nav['ads']['partenaires-import-export.html'] = 'Recherche avancée';
menu_nav['ads']['import-export.html'] = 'Toutes les annonces';
menu_nav['ads']['offres.html'] = 'Annonces offres d\'exportateurs';
menu_nav['ads']['produit.html'] = 'Annonces demandes d\'importateurs';

menu_nav['other'] = new Array();
menu_nav['other']['inclusion.html'] = 'Publier une annonce';
menu_nav['other']['passer-annonce-gratuite.html'] = 'Annonce standard';
menu_nav['other']['catalog/index.php?cPath=23&language=fr'] = 'Annonce GOLD';

menu_nav['account'] = new Array();
menu_nav['account']['inscription.html'] = 'S\'inscrire (gratuit)';
menu_nav['account']['compte.html'] = 'Mon compte';
menu_nav['account']['mes-annonces.html'] = 'Mes annonces';

menu_nav['services'] = new Array();
menu_nav['services']['offres-professionnels.html'] = 'Nos forfaits';
menu_nav['services']['inclusion.html'] = 'Nos annonces';
menu_nav['services']['catalog/index.php?cPath=21&language=fr'] = 'Autres services';

}else if(lang=='es'){
menu_nav['home'] = new Array();
menu_nav['home']['http://es.algomtl.com/'] = 'Inicio';
menu_nav['home']['http://es.algomtl.com/inscripcion.html'] = 'Inscribirse (gratuito)';
menu_nav['home']['http://es.algomtl.com/informacion.html'] = 'Acerca de Algomtl';
menu_nav['home']['http://es.algomtl.com/certificacion-verified.html'] = 'Estatuto VERIFIED';
menu_nav['home']['http://es.algomtl.com/contacto.html'] = 'Contactarnos';
menu_nav['home']['http://es.algomtl.com/visita-guiada.html'] = 'Visita Guiada';
menu_nav['home']['http://en.algomtl.com/'] = 'In English';
menu_nav['home']['http://www.algomtl.com/pagealgo.html'] = 'En Français';

menu_nav['ads'] = new Array();
menu_nav['ads']['http://es.algomtl.com/socios-importacion-exportacion.html'] = 'Búsqueda avanzada';
menu_nav['ads']['http://es.algomtl.com/importacion-exportacion.html'] = 'Todos los anuncios';
menu_nav['ads']['http://es.algomtl.com/ofertas.html'] = 'Ofertas de exportadores';
menu_nav['ads']['http://es.algomtl.com/productos.html'] = 'Solicitudes de importadores';

menu_nav['other'] = new Array();
menu_nav['other']['http://es.algomtl.com/anuncios-informacion.html'] = 'Poner un anuncio';
menu_nav['other']['http://es.algomtl.com/poner-anuncio-gratuito.html'] = 'Anuncio estándar';
menu_nav['other']['http://www.algomtl.com/catalog/index.php?cPath=23&language=es'] = 'Anuncio GOLD';

menu_nav['account'] = new Array();
menu_nav['account']['http://es.algomtl.com/inscripcion.html'] = 'Inscribirse (gratuito)';
menu_nav['account']['http://es.algomtl.com/cuenta.html'] = 'Mi cuenta';
menu_nav['account']['http://es.algomtl.com/mis-anuncios.html'] = 'Mis anuncios';

menu_nav['services'] = new Array();
menu_nav['services']['http://es.algomtl.com/ofertas-profesionales.html'] = 'Nuestros abonos';
menu_nav['services']['http://es.algomtl.com/anuncios-informacion.html'] = 'Nuestros anuncios';
menu_nav['services']['http://www.algomtl.com/catalog/index.php?cPath=21&language=es'] = 'Otros servicios';

}else{
menu_nav['home'] = new Array();
menu_nav['home']['http://en.algomtl.com/algopages.html'] = 'Home';
menu_nav['home']['http://en.algomtl.com/open-account.html'] = 'Join (free)';
menu_nav['home']['http://en.algomtl.com/about-us.html'] = 'About us';
menu_nav['home']['http://en.algomtl.com/verified-certification.html'] = 'VERIFIED Status';
menu_nav['home']['http://en.algomtl.com/contact-us.html'] = 'Contact us';
menu_nav['home']['http://en.algomtl.com/visitors-guide.html'] = 'Visitors Guide';
menu_nav['home']['http://www.algomtl.com/pagealgo.html'] = 'In French';
menu_nav['home']['http://es.algomtl.com/'] = 'In Spanish';

menu_nav['ads'] = new Array();
menu_nav['ads']['http://en.algomtl.com/import-export-leads.html'] = 'Advanced Search';
menu_nav['ads']['http://en.algomtl.com/trade-leads.html'] = 'All trade leads ads';
menu_nav['ads']['http://en.algomtl.com/business.html'] = 'Offers from exporters';
menu_nav['ads']['http://en.algomtl.com/lookingfor.html'] = 'Requests from importers';

menu_nav['other'] = new Array();
menu_nav['other']['http://en.algomtl.com/include.html'] = 'Post an ad';
menu_nav['other']['http://en.algomtl.com/post-free-ad.html'] = 'Basic ad';
menu_nav['other']['http://www.algomtl.com/catalog/index.php?cPath=23&language=en'] = 'GOLD ad';

menu_nav['account'] = new Array();
menu_nav['account']['http://en.algomtl.com/open-account.html'] = 'Join (free)';
menu_nav['account']['http://en.algomtl.com/account.html'] = 'My account';
menu_nav['account']['http://en.algomtl.com/my-ads.html'] = 'My ads';

menu_nav['services'] = new Array();
menu_nav['services']['http://en.algomtl.com/professionnal-offers.html'] = 'Our subscriptions';
menu_nav['services']['http://en.algomtl.com/include.html'] = 'Our ads';
menu_nav['services']['http://www.algomtl.com/catalog/index.php?cPath=21&language=en'] = 'Others services';

}
function menu_execute(id) {
	var html = '<ul>';
	//if(typeof(document.getElementById)!='undefined'){
	for (var clef in menu_nav)
		if (id != clef&& menu_but != clef) document.getElementById('button_' + clef).className = '';
	var j=0;
	for (var clef in menu_nav[id]){
		if(menu_nav[id][clef]!=''){
			html +=  '<li' + ((clef == menu_pag || clef=='http://es.algomtl.com/'+menu_pag || clef=='http://www.algomtl.com/'+menu_pag) ? ' class="active"' : '') + '>';
			if(j>0) {html+='&nbsp;&#124;&nbsp;';}
			html +=  '<a href="'+menu_path + clef + '" '+menu_target+'>' + menu_nav[id][clef] + '</a></li>';
			j++;
		}
	}
	html += '</ul>';
	document.getElementById('button_' + id).className = 'active';
	document.getElementById('menuSub').innerHTML = html;
	if (menu_but == id) {document.getElementById('button_' + id).className = 'selected_active';
		document.getElementById('menuSub').className = 'menu_sub_selected';
	} else {document.getElementById('button_' + menu_but).className = 'selected';
		document.getElementById('button_' + id).className = 'active';
		document.getElementById('menuSub').className = '';

	}
}

function menu_init() {

	menu_execute(menu_but);

}

function menu_in(id) {

	gTimer = setTimeout('menu_execute(\'' + id + '\')', 100);

}


function menu_out(id) {

	clearTimeout(gTimer);

}
