var lhvno = null;

function hvo(obj, hvno) {
	if (obj != null) {
		obj.className = 'hvo';
	}
	if (lhvno != hvno) {
		hvmenuyaz(hvno);
		lhvno = hvno;
	}	
}

function hvn(obj) { obj.className = 'hvn'; }

function hvl(hvx) { document.location.href=hvmenu[hvx][3]; }

function hvmenuyaz(hvx) {
	hvtext = '<table width=300 height=200 border=0 cellspacing=0 cellpadding=0 background="' + hvmenu[hvx][0]+ '">';
	hvtext += '<tr><td height=145 valign=bottom align=center>';
	hvtext += '<div style="position:relative; top:50; z-index:10;"><a href="' + hvmenu[hvx][3] + '" class=hva>';
	hvtext += '<font style="font-weight:bold; font-size:11pt;">' + hvmenu[hvx][1] + '</font><br>' + hvmenu[hvx][2];
	hvtext += '</font></a></div></td></tr>';
	hvtext += '<tr><td height=55 class=hvab>&nbsp;</td></tr>';
	hvtext += '</table>';
document.getElementById('hvitrin').innerHTML = hvtext;
}

function makehvmenu(hvmenudiv) {

	tt = '<table border=0 width=520 height=200 cellspacing=0 cellpadding=0>';
	tt += '<tr><td id=hvitrin width=300 height=200>&nbsp;</td>';
	tt += '<td width=220 height=200 valign=top class=hvn>';
	tt += '<table width=100% border=0 cellspacing=0 cellpadding=0>';
	var hvmenu_len = hvmenu.length;
	for (var x = 0; x < hvmenu_len; x++) {
		if (hvmenu[x][1].length > 35) {
			hvmenu[x][1] = hvmenu[x][1].substring(0, 35) + '...';
		}
		if (hvmenu[x][2].length > 100) {
			hvmenu[x][2] = hvmenu[x][2].substring(0, 100) + '...';
		}
		tt += '<tr><td height=20 class=hvn onmouseover="hvo(this, ' + x + ');" onmouseout="hvn(this);" onclick="hvl(' + x + ');"><li>' + hvmenu[x][1] + '</li></td></tr>'; 
	}
	tt += '</table>';
	tt += '</td></tr></table>';

	document.getElementById(hvmenudiv).innerHTML = tt;
	hvo(null,0);
}
