function drow_menu_item(submenu_id){
	code = '';
	code += '' + 
	'<table cellpadding="0" cellspacing="0" border="0" name="submenuTable' + submenu_id + '">';
	for (j=0;j<submenu[submenu_id].length;j++){
		onoff = (submenu[submenu_id][j][id]==currentId)?'_on':'_off';
		onout = (submenu[submenu_id][j][id]==currentId)?'':'imageOff(\'image'+submenu[submenu_id][j][id]+'\');';
		code += '' + '<tr><td><a href="' + submenu[submenu_id][j][href] + '" onmouseover="doMouseOver();imageOn(\'image'+submenu[submenu_id][j][id]+'\');" onmouseout="doMouseOut();'+onout+'"><img src="/content/' + submenu[submenu_id][j][lang] + 'navi/btn_left_'+submenu[submenu_id][j][id]+onoff+'.gif" width="189" height="17" border=0 alt="' + submenu[submenu_id][j][link] + '" name="image'+submenu[submenu_id][j][id]+'"></a></td></tr>';
	}
	code += '' + '<tr><td height="1" bgcolor="#7fb2d1"><img src="/i/d-t.gif" width="189" height="1" border=0 alt=""></td></tr>';
	code += '' + '</table>';
	return code;
}

function drow_txt_menu_item(submenu_id){
	code = '';
	code += '' + 
	'<table width="'+layer_width[submenu_id]+'" cellpadding="0" cellspacing="0" border="0" name="submenuTable' + submenu_id + '">';
	for (j=0;j<submenu[submenu_id].length;j++){
		isCurrent = false;
		menuSensivity = (nn4 || isCurrent) ? '' : ' onmouseover="this.style.backgroundColor=\'#d8e8f1\';doMouseOver();" onmouseout="this.style.backgroundColor=\'#ffffff\';doMouseOut();"';
		linkSensivity = (nn4) ? 'onmouseover="doMouseOver();" onmouseout="doMouseOut();"' : '';
		mylink = (isCurrent) ? '<span class="txtmenu">' + submenu[submenu_id][j][link] + '</span>' : '<a href="' + submenu[submenu_id][j][href] + '" '+linkSensivity+' class="txtmenu">' + submenu[submenu_id][j][link] + '</a>';
		mybgcolor = (isCurrent) ? '#d8e8f1' : '#ffffff';
		code += '' + 
			'<tr>' +
				'<td bgcolor="#7fb2d1" width="1"><img src="/i/d-t.gif" width="1" height="1" border=0 alt=""></td>' + 
				'<td bgcolor="'+mybgcolor+'"' + menuSensivity + ' nowrap height="18" width="'+(layer_width[submenu_id]-2)+'"><img src="/i/d-t.gif" width="6" height="1" border=0 alt="">' + mylink + '<img src="/i/d-t.gif" width="6" height="1" border=0 alt=""></td>' +
				'<td bgcolor="#7fb2d1" width="1"><img src="/i/d-t.gif" width="1" height="1" border=0 alt=""></td>' + 
			'</tr>';
	}
	code += '' + '<tr valign="top"><td height="1" colspan="3"><img src="/i/b-t.gif" width="'+layer_width[submenu_id]+'" height="1" border=0 alt=""></td></tr>';
	code += '' + '</table>';
	return code;
}

function createMenuDiv(layNmb){
	document.writeln('<div id="menu' + layNmb + '" class="hidden">');
	document.writeln(drow_txt_menu_item(layNmb));
	document.writeln('</div>');
}
menuDivId = new Array;
for (i = 0; i < submenu.length; i++){
	createMenuDiv(i);
	menuDivId[i] = 'menu' + i;
}



