function renderRoot_top() {
	var str='<table border=0 cellspacing=0 cellpadding=0 width=100% bgcolor="#0358A9" height=22><tr>',
		event, target, m=itemsList['t'], count=1,
		x=(isOpera)?'"p.x-3"':'"p.x"',
		y=(isNN4)?'"131"':(isOpera)?'"p.y+p.h-3"':'"p.y+p.h"';
	for (var i in m) {
		if (m[i].level==0) {

			event=' onmouseover=over("'+m[i].id+'",event,'+m[i].level+','+x+','+y+') onmouseout=out("'+m[i].id+'")';
			(m[i].inNewWindow=='true') ? target=' target=_blank' : target='';

			if (count!=1) str+='';
			str+='<td id='+top+m[i].id+event+' class="topmen_s">';
			str+='<a '+target+event+' href="'+m[i].url+'">'+m[i].text+'</a>';
			str+='</td><td bgcolor="white" width="1px"><img src="img/1x1.gif" ></td>';
			count++;
		}
	}
	str+='</tr></table>';
	document.write(str);
}

function renderSub_top() {
	var str, event, target, row, list, isPar, p1='<img src=img/1x1.gif width=1 height=1>', m=itemsList['t'], count,
		x=(isNN4)?'"p.x+50"':(isOpera)?'"p.x+p.w-2"':'"p.x+p.w"',
		y=(isOpera)?'"p.y-3"':'"p.y-1"';
	for (var i in m) {
		if (m[i].children.length>0) {
			list=m[i].children;
			row=list.length*2+1;
			count=1;
			str='<div id='+sub+m[i].id+' class=popup>';
			str+='<table border=0 cellspacing=0 cellpadding=0 width=161><tr>';
			str+='<td rowspan='+row+' width=1 class=border>'+p1+'</td>';
			str+='<td height=1 class=border>'+p1+'</td>';
			str+='<td rowspan='+row+' width=1 class=border>'+p1+'</td></tr>';
			for (var j=0; j<list.length; j++) {

				isPar=m[list[j]].children.length;
				(m[list[j]].inNewWindow=='true') ? target=' target=_blank' : target='';
				event=' onmouseover=over("'+m[list[j]].id+'",event,'+m[list[j]].level+','+x+','+y+') onmouseout=out("'+m[list[j]].id+'")';

				if (count!=1) str+='<tr><td height=1><img src=img/dot_line2.gif width=161 height=1></td></tr>';
				str+='<tr><td id='+top+m[list[j]].id+event+' class=submenu>';
				if (isPar>0) str+='<table border=0 cellspacing=0 cellpadding=0 background=img/1x1.gif><tr><td width=155>';
				str+='<div class=sub><a class=menu3'+target+event+' href="'+m[list[j]].url+'">'+m[list[j]].text+'</a></div>';
				if (isPar>0) str+='</td><td width=6 valign=top><img src=img/sub.gif width=6 height=6></td></tr></table>';
				str+='</td></tr>';
				count++;
			}
			str+='<tr><td height=1 class=border><img src=img/1x1.gif width=161 height=1></td></tr></table>';
			str+='</div>';
			document.write(str);
		}
	}
}

function renderRoot_left() {
	var str='<table border=0 cellspacing=0 cellpadding=0 width=100% class="menu_bg">',
		event, isPar, target, m=itemsList['l'], count=1,
		x=(isNN4)?'"167"':(isOpera)?'"p.x+p.w-3"':'"p.x+p.w"',
		y=(isOpera)?'"p.y-3"':'"p.y-1"';
	for (var i in m) {
		if (m[i].level==0) {

			isPar=m[i].children.length;
			event=' onmouseover=over("'+m[i].id+'",event,'+m[i].level+','+x+','+y+',"false") onmouseout=out("'+m[i].id+'")';
			(m[i].inNewWindow=='true') ? target=' target=_blank' : target='';

			if (count!=1) str+='<tr><td height=1><img src=img/dot_line1.gif width=161 height=1></td></tr>';
			str+='<tr><td  width=161  valign=top>';
			 str+='<table class="menutext" id='+top+m[i].id+event+'    border=0 style="margin: 2 0 2 2;" cellspacing=0 cellpadding=0 ><tr><td width=155>';
			str+='<a class="menutextin" '+target+event+' href="'+m[i].url+'">'+m[i].text+'</a>';
			str+='</td>';
			if (isPar>0) str+='<td width=6 valign=top><img src=img/sub.gif ></td>';
			str+='</tr></table></td></tr>';
			count++;      
		}
	}

	str+='</table>';
	document.write(str);
}



function renderSub_left() {
	var str, event, target, row, list, isPar, p1='<img src=img/1x1.gif width=1 height=1>', m=itemsList['l'], count,
		x=(isNN4)?'"p.x+50"':(isOpera)?'"p.x+p.w-2"':'"p.x+p.w"',
		y=(isOpera)?'"p.y-3"':'"p.y-1"';
	for (var i in m) {
		if (m[i].children.length>0) {
			list=m[i].children;
			row=list.length*2+1;
			count=1;
			str='<div id='+sub+m[i].id+' class=popup>';
			str+='<table border=0 cellspacing=0 cellpadding=0 width=161><tr>';
			str+='<td rowspan='+row+' width=1 class=border>'+p1+'</td>';
			str+='<td height=1 class=border>'+p1+'</td>';
			str+='<td rowspan='+row+' width=1 class=border>'+p1+'</td></tr>';
			for (var j=0; j<list.length; j++) {

				isPar=m[list[j]].children.length;
				(m[list[j]].inNewWindow=='true') ? target=' target=_blank' : target='';
				event=' onmouseover=over("'+m[list[j]].id+'",event,'+m[list[j]].level+','+x+','+y+',"false") onmouseout=out("'+m[list[j]].id+'")';

				if (count!=1) str+='<tr><td height=1><img src=img/dot_line2.gif width=161 height=1></td></tr>';
				str+='<tr><td id='+top+m[list[j]].id+event+' class=submenu>';
				if (isPar>0) str+='<table border=0 cellspacing=0 cellpadding=0 background=img/1x1.gif><tr><td width=155>';
				str+='<div class=sub><a class=menu3'+target+event+' href="'+m[list[j]].url+'">'+m[list[j]].text+'</a></div>';
				if (isPar>0) str+='</td><td width=6 valign=top><img src=img/sub.gif ></td></tr></table>';
				str+='</td></tr>';
				count++;
			}
			str+='<tr><td height=1 class=border><img src=img/1x1.gif width=161 height=1></td></tr></table>';
			str+='</div>';
			document.write(str);
		}
	}
}
