for (i=0;i<menu_arr.length;i++) {
	eval('var ' + menu_arr[i][2] + 'off = new Image();');
	eval('var ' + menu_arr[i][2] + 'on = new Image();');
	eval(menu_arr[i][2] + 'off.src = "' + img_path + menu_arr[i][0] + '";');
	eval(menu_arr[i][2] + 'on.src = "' + img_path + menu_arr[i][1] + '";');
}

var off_timer;

function ol(lyr, idx, parent) {
	clearTimeout(off_timer);
	lyr.style.backgroundColor='#6B6BB7';
	lyr.style.color='#FFFFFF';
	if (idx > -1) {
		cls(idx,menu_arr[idx][4]);
		if (menu_arr[idx][5] == '') {
			menu_arr[idx][5] = lyr;
		}
		var img = eval('document.top_' + idx);
		var img_src = eval(menu_arr[idx][2] + 'on.src');
		if (img.src != img_src) {
			img.src = img_src;
		}
		eval('document.all.sub_' + idx + '.style.visibility = "visible"');
	} else {
		cls(parent,menu_arr[parent][4]);
	}
}

function cl(lyr, idx) {
	if (idx == -1) {
		lyr.style.backgroundColor='#E1E1FF';
		lyr.style.color='#000000';
	}
	off_timer = setTimeout("cls(-1,-1)",500);
}

function cls(o1, o2) {
	for (i=0;i<menu_arr.length;i++) {
		if (i != o1 && i != o2) {
			if (menu_arr[i][5] != '') {
				if (menu_arr[i][4] == -1) {
					if (menu_arr[i][2] != section) {
						menu_arr[i][5].style.backgroundColor = '#000000';
					}
				} else {	
					menu_arr[i][5].style.backgroundColor = '#E1E1FF';
					menu_arr[i][5].style.color='#000000';
				}
			}
			if (menu_arr[i][2] != section) {
				var img = eval('document.top_' + i);
				var img_src = eval(menu_arr[i][2] + 'off.src');
				if (img.src != img_src) {
					img.src = img_src;
				}
			}
			eval('document.all.sub_' + i + '.style.visibility = "hidden"');
		}
	}
}

function menu() {		
	for(j=0;j<menu_arr.length;j++) {

		document.write('<div id="sub_' + j + '">');
		document.write('<table cellpadding="0" cellspacing="0" border="0" width="' + menu_arr[j][3][0] + '">');
		if(menu_arr[j][3][1] != '') {
			document.write('<tr><td height="' + menu_arr[j][3][1] + '" colspan="');
			if (document.all) {
				document.write('2');
			} else {
				document.write('1');
			}
			document.write('"><spacer type="block" height="' + menu_arr[j][3][1] + '"></td></tr>');
		}
		document.write('<tr><td bgcolor="#FFFFFF"><table cellpadding="4" cellspacing="1" border="0" width="100%">');
		for(i=2;i<menu_arr[j][3].length;i++) {
			document.write('<tr><td class="nav" bgcolor="#E1E1FF" onClick="ln(\'' +  menu_arr[j][3][i][0] + '\');" onMouseover="ol(this,' + menu_arr[j][3][i][2] + ',' + j + ');" onMouseout="cl(this,' + menu_arr[j][3][i][2] + ');">');
			if (menu_arr[j][3][i][2] != '-1') {
				document.write('<table cellpadding="0" cellspacing="0" border="0" height="10" align="right"><tr><td valign="bottom"><img name="top_' + menu_arr[j][3][i][2] + '" src="' + img_path + 'arrow_subNav-up.gif"/></td></tr></table>');
			}
			document.write(menu_arr[j][3][i][1] + '</td></tr>');
		}
		document.write('</table></td>');
		if (document.all) {
			document.write('<td width="2" bgcolor="#000000" class="shadow"><spacer type="block" width="2"/></td></tr><tr><td height="2" colspan="2" bgcolor="#000000" class="shadow"><spacer type="block" height="2"/></td>');
		}
		document.write('</tr></table></div>');
	}
}

function top_nav() {
	var sOut =	'<tr>' +
			'	<td colspan="13" height="1"><spacer type="block" height="1"></td>' +
			'</tr>' +
			'<tr>' +
			'	<td width="1" height="23"><spacer type="block" width="1" height="23"></td>' +
			'	<td width="139" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/lc/*' + srv + '/launchcast/\');" onMouseover="ol(this,0);" onMouseout="cl(this,0);" bgcolor="#';
	if (section == 'lcMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_0" src="' + img_path + 'but_LAUNCHcastRadio-';
	if (section == 'lcMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"></td>' +
			'	<td width="75" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/mv/*' + srv + '/musicvideos/\');" onMouseover="ol(this,1);" onMouseout="cl(this,1);" bgcolor="#';
	if (section == 'mvMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_1" src="' + img_path + 'but_videos-';
	if (section == 'mvMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"></td>' +
			'	<td width="82" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/artist/*' + part + 'a/\');" onMouseover="ol(this,2);" onMouseout="cl(this,2);" bgcolor="#';
	if (section == 'artistMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_2" src="' + img_path + 'but_artists-';
	if (section == 'artistMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"></td>' +
			'	<td width="67" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/news/*' + part + 'n/\');" onMouseover="ol(this,3);" onMouseout="cl(this,3);" bgcolor="#';
	if (section == 'newsMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_3" src="' + img_path + 'but_news-';
	if (section == 'newsMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"/></td>' +
			'	<td width="76" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/charts/*' + part + 'c/\');" onMouseover="ol(this,4);" onMouseout="cl(this,4);" bgcolor="#';
	if (section == 'chartsMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_4" src="' + img_path + 'but_charts-';
	if (section == 'chartsMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
/*	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"></td>' +
			'	<td width="68" class="nav" align="center" onClick="ln(\'http://uk.rd.yahoo.com/launch/nav/shop/*' + part + 'rt/index.html\');" onMouseover="ol(this,5);" onMouseout="cl(this,5);" bgcolor="#';
	if (section == 'shopMenu') {
		sOut += '6B6BB7';
	} else {
		sOut += '000000';
	}
	sOut +=		'"><img name="top_5" src="' + img_path + 'but_shop-';
	if (section == 'shopMenu') {
		sOut += 'over';
	} else {
		sOut += 'up';
	}
*/	
	sOut += 	'.gif"></td>' +
			'	<td width="1"><spacer type="block" width="1"/></td>' +
			
			'</tr>';
	document.write(sOut);
}