function renderRoot_top() {
	var str='<table border=0 cellspacing=0 cellpadding=0 width=770 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+='<td width=1><img src=img/1x1.gif width=1 height=22></td>';
			str+='<td id='+top+m[i].id+event+' class=topmenu2>';
			str+='<div class=sub2><a class=menut'+target+event+' href="'+m[i].url+'">'+m[i].text+'</a></div>';
			str+='</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 width=190 border=0 cellspacing=0 cellpadding=0>',
		event, isPar, target='', m=itemsList['l'], count=1,
		x=(isNN4)?'"190"':(isOpera)?'"p.x+p.w-1"':'"p.x+p.w+2"',
		y=(isOpera)?'"p.y-3"':'"p.y"';
	if(!m) return;
	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+') onmouseout=out("'+m[i].id+'") onclick="'+m[i].locat+'"';
			(m[i].inNewWindow=='true') ? target=' target=_blank' : target='';

			str+='<tr><td class=vBG><img src=img/1.gif width=9 height=26></td>';
			str+='<td id='+top+m[i].id+event+' width=181 class=lmenu'+((isPar>0)?'ws':'')+' valign=middle>';
			str+='<div class=indent><a'+target+event+' '+m[i].url+'>'+m[i].text+'</a></div>';
			str+='</td></tr>';
			str+='<tr><td colspan=2 class=hBG><img src=img/1.gif width=1 height=2></td></tr>';
			str+='<tr><td colspan=2><img src=img/1.gif width=1 height=1></td></tr>';
			count++;
		}
	}
	str+='</table>';
//	alert(str);
	document.write(str);
}

function renderSub_left() {
	var str, event, target, row, list, isPar, m=itemsList['l'], count=0,
		x=(isNN4)?'"p.x+50"':(isOpera)?'"p.x+p.w-3"':'"p.x+p.w"',
		y=(isOpera)?'"p.y-3"':'"p.y-1"';
	if(!m) return;
	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=190>';
			str+='<tr><td colspan=3 class=subBorder><img src=img/1.gif width=1 height=2></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+'") onclick="'+m[list[j]].locat+'"';

				str+='<tr><td class=subBorder><img src=img/1.gif width=2 height=26>';
				str+='<td id='+top+m[list[j]].id+event+' width=186 height=26 class=submenu'+((isPar>0)?'ws':'')+' valign=middle>';
				str+='<div class=indentSub><a'+target+event+' '+m[list[j]].url+'>'+m[list[j]].text+'</a></div>';
				str+='</td><td class=subBorder><img src=img/1.gif width=2 height=26></td></tr>';
				str+='<tr><td colspan=3 class=subBorder><img src=img/1.gif width=1 height=2></td></tr>';
				count++;
			}
			str+='</table>';
			str+='</div>';
//			alert(str);
			document.write(str);
		}
	}
}
