var tplMenuRoot=new Array();
var tplMenuChild=new Array();

tplMenuRoot.Menu1=function (arg)
{
	var subId, evn, id, url, txt, isActive, subChr, alt;
	var str='<table border=0 cellspacing=0 cellpadding=0 width=100%><tr>';

	var crd='0,"20"';
	if(arg.length) var wd=Math.round(100/(arg.length/3));
	else var wd=100;

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];
		isActive=(CurrPart==url);
		subId=subIdPref+id;

		evn=' onmouseover=overMen(0,0,'+id+','+crd+') onmousedown="return clickMen(\''+url+'\','+id+')" onmouseout=outMen('+id+')';
		str+='<td align=center width="'+wd+'%"><span id='+subId+evn+'><a href='+url+'><span class=top_menu>'+txt+'</span></a></span></td>';
	}

	str+='</tr></table>';
	return str;
}

tplMenuChild.Menu1=function (topId, emb, arg)
{
	var subId, evn, id, url, txt, isPop;
	var wd=155;

	var str='<div id="'+topIdPref+topId+'" class=popMenu onselectstart="return false" ondragstart="return false" style="Z-index:'+(seqItems--)+'">';
//	str+='<table border=0 cellspacing=0 cellpadding=0 bgcolor=#405BC7><tr><td>';
	str+='<table border=0 cellspacing=0 cellpadding=0 width="'+wd+'">';

	var crd='"p.w",-1';
	//var lstRel=','+listTop.join(',')+',';

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' onmouseover=overMen('+topId+','+emb+','+id+','+crd+') onmousedown="return clickMen(\''+url+'\','+id+')" onmouseout=outMen('+id+')';

		str+='<tr bgColor=#3A51B8><td><img src="'+imgPath+'1.gif" width=1 height=1></td></tr>';
		str+='<tr><td id='+subId+' class=rowMen1 bgcolor=#1832AC>';
		str+='<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td>';
		str+='<a href="'+url+'"><div class=menu '+evn+'>&nbsp;';
		str+=txt;
		str+='</div></a></td>';
		str+='<td align=right valign=bottom><img src="'+imgPath+(isPop? 'spp':'1')+'.gif" width=5 height=5></td></tr></table></td></tr>';

		str+='<tr bgColor=#142B92><td><img src="'+imgPath+'1.gif" width=1 height=1></td></tr>';
	}

	str+='</table>';
	if(isIE)
		str+='<img src="'+imgPath+'1.gif" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+imgPath+'menubot.png\', sizingMethod=\'crop\');cursor:default" width="155" height="10">';
	else
		str+='<img src="'+imgPath+'menubot.png" width="155" height="10">';

	str+='</div>';
/*	
	var wnd=window.open('', 'my_wnd');
	wnd.document.clear();
	wnd.document.write(str);
*/
	return str;
}