






function rootMenu_Menu1(arg)
{
	var subId, evn, id, url, txt;
	var str='<img src="img/new/menu/1_.gif" width=126 height=11><br><table border=0 cellspacing=0 cellpadding=0 width=126>';

	var crd=(isNN4)?'129,(event.pageY-7)' : '"p.w-2",-1';

	var bgc=parseInt(firstColorIdx);
	while(bgc>6) bgc-=7;
	if(!listColor[bgc]) bgc=0;

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		txt=arg[i++];
		toUrl=url.substr(5);
		if(isNN4 && !toUrl) url='href="javascript:void();"';
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' class="color" onmouseover=overMen(0,0,'+id+','+crd+') onclick="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';

		str+='<tr background="" id='+subId+' bgcolor=#'+listColor[bgc]+'><td'+(toUrl?' style="cursor: hand"' : '')+evn+'>';
		str+='<div style="padding-left:20px; font-size:10,5px"><a '+url+evn+' style="font-size:10,5px" class=mm>'+txt+'</a></div></td>';
		str+='<td bgcolor=#A5A4A1><img src=img/new/1x1.gif width=1 height=1></td></tr>';
		str+='<tr background=""><td width=100% '+(arg[i+2]!=null? 'bgcolor=#'+listColor[bgc]:'')+'><img src=img/new/menu/'+(arg[i+2]==null? '_':'')+bgc+'.gif width=126 height=11'+evn+'></td><td bgcolor=#A5A4A1><img src=img/new/1x1.gif width=1 height=1></td></tr>';

		if(!listColor[++bgc]) bgc=0;
	}
	firstColorIdx=bgc;
	str+='</table>';

	return str;
}


function popMenu_Menu1(topId, emb, arg, st_color_index)
{
	var subId, evn, id, url, txt, isPop;
	var relId=topIdPref+topId;

	var bgc = 0;

	if(listColor[st_color_index+2])
	{
		bgc= parseInt(st_color_index) + 2;
	}

	var str='<div id='+relId+' class=popMenu ondragstart="return false"><table border=0 cellspacing=0 width=126 cellpadding=0>';
	str+='<tr background="img/new/menu/1_pop.gif"><td><img src=img/new/menu/'+bgc+'_pop.gif width=126 height=11></td><td background=img/new/menu/bg_right.gif>';
	str+='<img src=img/new/1x1_white.gif width=1 height=10></td></tr>';

	var crd=(isNN4)?'255,(event.pageY-4)' : '"p.w-2",-1';


	for(var i=0; i<arg.length;)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		if(isNN4 && !toUrl) url='href="javascript:void();"';

		subId=subIdPref+id;
		evn=' class="color" onmouseover=overMen('+topId+','+emb+','+id+','+crd+') onmouseout=outMen('+id+') onclick="return clickMen('+toUrl+')"';

		str+='<tr id='+subId+' bgcolor=#'+listColor[bgc]+' background=""><td'+(toUrl?' style="cursor: hand"' : '')+evn+'>';
		str+='<div style="padding-left:20px; font-size:10,5px"><a '+url+evn+' style="font-size:10,5px"><font color=#336600>'+txt+'</font></a></div></td>';
		str+='<td rowspan=2 background=img/new/menu/bg_right.gif><img src=img/new/1x1.gif width=1 height=1></td></tr>';
		str+='<tr background=""><td><img src=img/new/menu/'+(arg[++i]==null? '_':'')+bgc+'.gif width=126 height=11'+evn+'></td></tr>';

		if(!listColor[++bgc]) bgc=0;
	}
	str+='</table></div>';

	return str;
}


function rootMenu_Menu2(arg)
{
	var subId, evn, id, url, txt;
	var str='<img src="img/new/menu/1__.gif" width=126 height=11><br><table border=0 cellspacing=0 cellpadding=0 width=126>';

	var crd=(isNN4)?'129,(event.pageY-7)' : '"-p.w",-1';

	var bgc=parseInt(firstColorIdx);
	while(bgc>6) bgc-=7;
	if(!listColor[bgc]) bgc=0;

	for(var i=0; i<arg.length; i++)
	{
		url=arg[i++];
		txt=arg[i++];
		toUrl=url.substr(5);
		if(isNN4 && !toUrl) url='href="javascript:void();"';
		id=arg[i][0];
		isPop=arg[i][1];

		subId=subIdPref+id;
		evn=' class="color" onmouseover=overMen(0,0,'+id+','+crd+') onclick="return clickMen('+toUrl+')" onmouseout=outMen('+id+')';

		str+='<tr background="" id='+subId+' bgcolor=#'+listColor[bgc]+'><td'+(toUrl?' style="cursor: hand"' : '')+evn+'>';
		str+='<div style="padding-left:3px; font-size:10,5px"><a '+url+evn+' style="font-size:10,5px" class=mm>'+txt+'</a></div></td>';
		str+='<td bgcolor=#A5A4A1><img src=img/new/1x1.gif width=1 height=1></td></tr>';
		str+='<tr background=""><td width=100% '+(arg[i+2]!=null? 'bgcolor=#'+listColor[bgc]:'')+'><img src=img/new/menu/'+(arg[i+2]==null? '_':'')+bgc+'_right.gif width=126 height=11'+evn+'></td><td bgcolor=#A5A4A1><img src=img/new/1x1.gif width=1 height=1></td></tr>';

		if(!listColor[++bgc]) bgc=0;
	}
	firstColorIdx=bgc;
	str+='</table>';

	return str;
}


function popMenu_Menu2(topId, emb, arg, st_color_index)
{
	var subId, evn, id, url, txt, isPop;
	var relId=topIdPref+topId;

	var bgc = 0;

	if(listColor[st_color_index+2])
	{
		bgc= parseInt(st_color_index) + 2;
	}

	var str='<div id='+relId+' class=popMenu ondragstart="return false"><table border=0 cellspacing=0 width=126 cellpadding=0>';
	str+='<tr background="img/new/menu/1_pop.gif"><td><img src=img/new/menu/'+bgc+'_pop_right.gif width=126 height=11></td><td background=img/new/menu/bg_right.gif>';
	str+='<img src=img/new/1x1_white.gif width=1 height=10></td></tr>';

	var crd=(isNN4)?'255,(event.pageY-4)' : '"-p.w",-1';


	for(var i=0; i<arg.length;)
	{
		url=arg[i++];
		toUrl=url.substr(5);
		txt=arg[i++];
		id=arg[i][0];
		isPop=arg[i][1];

		if(isNN4 && !toUrl) url='href="javascript:void();"';

		subId=subIdPref+id;
		evn=' class="color" onmouseover=overMen('+topId+','+emb+','+id+','+crd+') onmouseout=outMen('+id+') onclick="return clickMen('+toUrl+')"';
		str+='<tr id='+subId+' bgcolor=#'+listColor[bgc]+' background=""><td'+(toUrl?' style="cursor: hand"' : '')+evn+'>';
		str+='<div style="padding-left:3px; font-size:10,5pxpx"><a '+url+evn+' style="font-size:10,5px"><font color=#336600>'+txt+'</font></a></div></td>';
		str+='<td rowspan=2 background=img/new/menu/bg_right.gif><img src=img/new/1x1.gif width=1 height=1></td></tr>';
		str+='<tr background=""><td><img src=img/new/menu/'+(arg[++i]==null? '_':'')+bgc+'_right.gif width=126 height=11'+evn+'></td></tr>';

		if(!listColor[++bgc]) bgc=0;
	}
	str+='</table></div>';

	return str;
}