var botmenu_timers = new Array();
var botmenu_toggled = new Array(0,0,0,0,0,0);


function showBotMenu(link){
	sorszam = link.id.charAt(7)-1;
	clearTimeout(botmenu_timers[sorszam]);
	timer = setTimeout("if ($('botmenu"+(sorszam+1)+"_box')){ $('botmenu"+(sorszam+1)+"_box').show(); } $('botmenu"+(sorszam+1)+"').addClassName('over');",50);
	botmenu_timers[sorszam] = timer;
	botmenu_toggled[sorszam] = 1;
	
}

function hideBotMenu(link){
	sorszam = link.id.charAt(7)-1;
	clearTimeout(botmenu_timers[sorszam]);
	timer = setTimeout("if ($('botmenu"+(sorszam+1)+"_box')){ $('botmenu"+(sorszam+1)+"_box').hide(); } $('botmenu"+(sorszam+1)+"').removeClassName('over');",50);
	botmenu_timers[sorszam] = timer;
	botmenu_toggled[sorszam] = 0;
}


function initBotMenu(){
	menuboxes = Element.select($('footer_menu'),'a');
	for (var i=0,node;node=menuboxes[i++];){
			Event.observe(node,'mouseover',function(event){ showBotMenu(this)});
			Event.observe(node,'mouseout',function(event){ hideBotMenu(this)});
		if ($('botmenu'+i+'_box')){
			Event.observe($('botmenu'+i+'_box'),'mouseover',function(event){ showBotMenu(this)});
			Event.observe($('botmenu'+i+'_box'),'mouseout',function(event){ hideBotMenu(this)});
		}
	}
}
Event.observe(window,'load', initBotMenu.bindAsEventListener(this) );
