var itemsList=new Array(), subList=new Array();

function menuItem(id, parentId, text, url, inNewWindow, menu) {
	var m=itemsList;
	if (!m[menu]) m[menu]=new Array();
	m[menu][id] = new Array();
	m[menu][id].id=id;
	m[menu][id].parentId=parentId;
	m[menu][id].children=new Array();
	if (parentId!='x') {
		m[menu][parentId].children[m[menu][parentId].children.length]=id;
		m[menu][id].level=m[menu][parentId].level+1;
		if (!subList[parentId]) subList[parentId]=m[menu][parentId].level+1;
	} else
		m[menu][id].level=0;
	m[menu][id].text=text;
	m[menu][id].url=url;
	m[menu][id].inNewWindow=inNewWindow;
	m[menu][id].menu=menu;
}

function fillarray1(parentArrayStr, menuArrayStr)
{
var menuArray = new Array(); parentArraystr1 = new String();
menuArray = eval(menuArrayStr);	
parentArraystr1 = parentArrayStr; 
if( parentArraystr1 == null ) parentArraystr1 = "";
for ( i = 0; i < menuArray.length; i+=5)
 {
 href1 = '';
 if (menuArray[i].substring(0,9) == "show_menu") href1 = menuArray[i+1];
 else href1 = menuArray[i]; 
 eval( 'menuItem("x' + i + '", "x' + parentArraystr1 + '", "' + menuArray[i+2] + '", "' + href1 + '", "false", "t");' )
 if (menuArray[i].substring(0,9) == "show_menu") 
 fillarray2(('' + i), menuArray[i].substring(10,menuArray[i].length));
 }
}

function fillarray2(parentArrayStr2a, menuArrayStr2){ menuArray2 = eval(menuArrayStr2); parentArraystr2 = parentArrayStr2a; if( parentArraystr2 == null ) parentArraystr2 = ""; for ( i2 = 5; i2 < menuArray2.length; i2+=5) { href1 = ''; if (menuArray2[i2].substring(0,9) == "show_menu") href1 = menuArray2[i2+1]; else href1 = menuArray2[i2]; eval( 'menuItem("x' + menuArrayStr2 + '_' + i2 + '", "x' + parentArraystr2 + '", "' + menuArray2[i2+2] + '", "' + href1 + '", "false", "t");' ); if (menuArray2[i2].substring(0,9) == "show_menu") fillarray3((menuArrayStr2 + '_' + i2), menuArray2[i2].substring(10,menuArray2[i2].length)); } }
function fillarray3(parentArrayStr3a, menuArrayStr3){ menuArray3 = eval(menuArrayStr3); parentArraystr3 = parentArrayStr3a; if( parentArraystr3 == null ) parentArraystr3 = ""; for ( i3 = 5; i3 < menuArray3.length; i3+=5) { href1 = ''; if (menuArray3[i3].substring(0,9) == "show_menu") href1 = menuArray3[i3+1]; else href1 = menuArray3[i3]; eval( 'menuItem("x' + menuArrayStr3 + '_' + i3 + '", "x' + parentArraystr3 + '", "' + menuArray3[i3+2] + '", "' + href1 + '", "false", "t");' ); if (menuArray3[i3].substring(0,9) == "show_menu") fillarray4((menuArrayStr3 + '_' + i3), menuArray3[i3].substring(10,menuArray3[i3].length)); } }
function fillarray4(parentArrayStr4a, menuArrayStr4) { menuArray4 = eval(menuArrayStr4); parentArraystr4 = parentArrayStr4a; if( parentArraystr4 == null ) parentArraystr4 = ""; for ( i4 = 5; i4 < menuArray4.length; i4+=5){href1 = '';if (menuArray4[i4].substring(0,9) == "show_menu") href1 = menuArray4[i4+1];else href1 = menuArray4[i4]; eval( 'menuItem("x' + menuArrayStr4 + '_' + i4 + '", "x' + parentArraystr4 + '", "' + menuArray4[i4+2] + '", "' + href1 + '", "false", "t");' )} }

document.write('<style>');
document.write('.submenuoff2{ font-size:8pt; cursor:pointer; color:black; }');
document.write('.submenuon2{ font-size:8pt; /*border-left:4px solid #2395FF;*/ cursor:pointer; background-color:#BFE0FB; color:black; }');

document.write('.popup { Z-INDEX: 999; VISIBILITY: hidden; POSITION: absolute; filter: Alpha(style=0,opacity=95); cursor:pointer; top:-400; left:-400; }');
document.write('.submenu { FONT-SIZE: 8pt; COLOR: #091680; BACKGROUND-COLOR: #F8FCFF; }');
document.write('.activesubmenu { FONT-SIZE: 8pt; COLOR: black; BACKGROUND-COLOR: #E1F1FD; }');
document.write('.sub {PADDING-LEFT: 10px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px }');

document.write('</style>');


function renderRoot_top() {
	var str='<table border=0 cellspacing=0 cellpadding=0 width=780 align=""><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+3"';
	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" style="color:#8FAECB;">|</td>';
			str+='<td id='+top+m[i].id+event+' class="menuoff">';
			str+='<div class=_sub2 align="center"><a class=menulink3'+target+event+' href="'+m[i].url+'"><nobr>'+m[i].text+'</nobr></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 cellspacing="0" cellpadding="0" width="150" bgcolor="#335CAD" border=0><tr><td>';
			str+='<table cellpadding="5" cellspacing="1" width="100%" border=0>';			
			
			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></td></tr>';
				
				/* onClick="window.location=' + "'" + m[list[j]].url + "'" + '" */
				
				str+='<tr><td onClick="window.location=' + "'" + m[list[j]].url + "'" + '" 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><a class="submenulink" onFocus="this.blur();"'+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+='</table>';			
			str+='</td></tr></table>';			
			str+='</div>';
			document.write(str);
		}
	}
}