function CreateMenu(n,x,y,w,str,url,t)
{

s='<div id=menu'+n+' style="VISIBILITY: hidden; Z-INDEX: '+(10000+n)+'; POSITION: absolute; LEFT: '+x+'px; TOP: '+y+'px; WIDTH: '+w+'px;">';
s+='<table bgcolor=#aaaaaa border=0 cellpading=0 cellspacing=1><tr><td><table border=0 bgcolor=#8a92a2 cellpadding=0 cellspacing=0 style="cursor:pointer;"><tr><td height=3></td></tr>';
var mitems = str.split('|');
var urls = url.split('|');
for (i=0;i<mitems.length;i++) {
turl=String(urls[i]);
mtype=String(urls[i]).substring(0,4);

s+='<tr><td height=9 width=200 onmouseover="this.style.backgroundColor=\'#aaaabb\';killtimer(); " onmouseout="this.style.backgroundColor=\'#8a92a2\';reset()"><a href='+turl+' ';
if(t || mitems[i]=="BloodyWorld" || mitems[i]=="Бладипедия") s+='target=_blank ';
if(mitems[i]=="&nbsp;&nbsp;&nbsp;&nbsp;Статьи") s+='onclick="return false;" ';
s+='class="popmenu"><div style="cursor:pointer;width:100%">&nbsp;';
if(!mitems[i].match(/<img/) && mitems[i]!="&nbsp;&nbsp;&nbsp;&nbsp;Статьи") s+='<img align=center src="../i/ball_menu.gif" width="11" height="11" border=0>&nbsp;';
s+='&nbsp;<b>'+mitems[i]+'</b>&nbsp;</div></a>';
if(i!=mitems.length-1){s+='</td></tr>';}
else {s+='</td></tr>';}
}
s+='<tr><td height=5></td></tr></table></td></tr></table>';
s+='</div>\n';
document.write(s);



}
var showflag=false;
var id=null;
var onname="";


function ShowMenu(name,x)
{
	killtimer();
	if(showflag) hide();
	document.getElementById(name).style.top=200;
	document.getElementById(name).style.left=x-3;
	document.getElementById(name).style.visibility='visible';
	showflag=true;
	onname=name;

}


function killtimer(){

if(id!=null){ // если таймер установлен

clearTimeout(id); // он обнуляется
id=null;
}
return true;
}

function hide(){

if(id!=null) killtimer();

if(showflag){

document.getElementById(onname).style.visibility='hidden';
}


showflag=false;
onname="";

}

function reset(){ // функция закрытия элемента через полсекунды

killtimer();
id = setTimeout('hide()', 200);
}

function send(txt) {
  location.href = txt;

}

