
function rootMenu_Menu1(arg)
{
	var subId, evn, id, url, txt, toUrl;
	var str='<table width=100% border=0 cellspacing=0 cellpadding=0>';
	var crd=(isNN4)?'(event.pageX+86-event.layerX),(event.pageY)' : '"p.w+1",-1';

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' onmouseover=overMen(0,0,'+id+','+crd+') onclick="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';
		str+='<tr>';
		str+='<td id='+subId+evn+' class=rowMen1 ';
		if(url) str+=' style="cursor:hand" ';
		str+='>';
		str+='<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td width=100%><a class=menu '+url+evn+'>'+txt+'</a></td>';
		if (isPop>0) str+='<td valign=top><img src="img/angle.gif" width=11 height=18 align=right hspace=0></td>'
		else str+='<td valign=middle><img src="img/1x1.gif" width=11 height=18 align=right hspace=0></td>';
		str+='</tr></table></td></tr>';
        str+='<tr><td bgcolor="#3C74B4" background="img/menulayer.gif"><img src="img/1x1.gif" width="1" height="1"></td></tr>';
	}
	str+='</table>';

	return str;
}
function popMenu_Menu1(topId, emb, arg)
{
	var subId, evn, id, url, txt, isPop, toUrl;
	var relId=topIdPref+topId;

	var str='<div id='+relId+' class=popMenu onselectstart="return false" ondragstart="return false"><table bgcolor="#3169A4" border="0" cellspacing=0 cellpadding=1 width=170>';
	var crd=(isNN4)?'(event.pageX+60-event.layerX),(event.pageY-4)' : '"p.w",-1';
        str+='<tr><td><table border="0" cellspacing=0 cellpadding=0 width=170>';
	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' onmouseover=overMen('+topId+','+emb+','+id+','+crd+') onclick="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';
		str+='<tr><td id='+subId+evn+' class=submen ';
		if(url) str+=' style="cursor:hand" ';
		str+='>';
		str+='<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td width=100% class="menu2"><a '+url+evn+'>'+txt+'</a></td>';
		if (isPop>0) str+='<td valign=middle><img src="img/angle.gif" width=11 height=18 align=right hspace=0></td>'
		else str+='<td valign=middle><img src="img/1x1.gif" width=11 height=18 align=right hspace=0></td>';
		str+='</tr></table></td></tr>';
		if (i<(arg.length-1)) str+='<tr><td bgcolor="#3169A4"><img src="img/1x1.gif" width="1" height="1"></td></tr>';
	}
	str+='</table></td></tr>';
	str+='</table></div>';
	return str;
}
function rootMenu_Menu2(arg)
{
	var subId, evn, id, url, txt, toUrl, img;
	var str='<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#3C74B4"><tr>';
	var crd=(isNN4)?'(event.pageX+86-event.layerX),(event.pageY-7)' : '0,"p.h"';
	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		img=arg[i++];
		id=arg[i][0];
		isActive=(CurrPart==url);
		isPop=arg[i][1];
		subId=subIdPref+id;
		
		evn=' onmouseover=overMen(0,0,'+id+','+crd+') onmousedown="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';
		str+='<td class=submentop2 align=center id='+subId+evn;
		if(isActive) str+=' bgcolor="#FFFFFF" '; 
		str+=' width= '+arg.length/100+' % ';
		str+='><a class=menu '+url+evn+'>'+txt+'</a></td>';
		if((i+1)!=arg.length) str+='<td bgcolor="#FFFFFF"><img border="0" src="img/1x1.gif" width="1" height="22"></td>';
	}
	str+='</tr></table>';
	return str;
}


function popMenu_Menu2(topId, emb, arg)
{
	var subId, evn, id, url, txt, isPop, toUrl;
	var relId=topIdPref+topId;

	var str='<div id='+relId+' class=popMenu onselectstart="return false" ondragstart="return false"><table border=0 cellspacing=1 cellpadding=4 width=170>';
	var crd=(isNN4)?'(event.pageX+60-event.layerX),(event.pageY-4)' : '"p.w",-1';

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' onmouseover=overMen('+topId+','+emb+','+id+','+crd+') onclick="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';
		str+='<tr><td id='+subId+evn+' class=submentop><a class="menu2" style="font-family:  Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size:11px" '+url+evn+'>'+txt+'</a></td></tr>';
	}
	str+='</table></div>';
	return str;
}