function menuover(kod, kat) { setTimeout('menuload('+kod+')', 500); eval('mload'+kod+'=true;'); } menu = new Array(); menuo = ''; function menuload(kod, kat) { if (!eval('mload'+kod)) return; menuo+='|'+kod+'|'; if (menu[kod]!=undefined && document.getElementById('m'+kod) && document.getElementById('m'+kod).style.display=='block') return; var xmlHttpReq = false; if (window.XMLHttpRequest) xmlHttpReq = new XMLHttpRequest(); // IE else if (window.ActiveXObject) xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); xmlHttpReq.open("POST", "menu_ajax.php", true); xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttpReq.onreadystatechange = function() { if (xmlHttpReq.readyState == 4) { if (xmlHttpReq.status == 200 && xmlHttpReq.responseText.indexOf('href')!=-1) { menu[kod] = kat!=0 ? menu[kat]+'|'+kod+'|' : '|'+kod+'|'; e=document.getElementById('m'+kod); e.style.position='relative'; e.style.left='-16px'; e.innerHTML=xmlHttpReq.responseText; e.style.display='block'; e.onmousemove=function(){eval('menuo+="|'+kod+'|"')}; e.onmouseout=function(){menuout(kod);}; } } } xmlHttpReq.send("kod="+kod+"&nyelv=eng"); } function menuout(kod) { eval('mload'+kod+'=false;'); menuo = ''; setTimeout('menuclose('+kod+')', 500); } function menuclose(kod) { for (var obj in menu) { if (menuo.indexOf('|'+obj+'|')==-1 && document.getElementById('m'+obj)) { document.getElementById('m'+obj).style.display='none'; } } }