function dm_chimg(img_name,img_src,idM,idS)
{
	var i = eval("document.images['"+img_name+"']");
	i.src = img_src;
    i.alt = alts[idM][idS];
}

function menu_string(x, n, id, colorId) {

	var xm = x-1;
	var xp = x+1;

	for (var i=1; i <= n; i++) {

		var im = 2*i-1;
		var ip = 2*i+1;

		if (i == 1) {
			if (i == x) {
				document.getElementById('menu_' + im + '_' + id).className = 'ttleft_b' + '_' +colorId;

				document.getElementById('menu_' + 2*i  + '_' + id).className = 'tttext_b' + '_' +colorId;
				if (i != n-1) {
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_bg' + '_' +colorId;
				}
				else
				{
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_b' + '_' +colorId;
				}
			}
			else if (i != x) {
				document.getElementById('menu_' + im + '_' + id).className = 'ttleft_g';
				document.getElementById('menu_' + 2*i  + '_' + id).className = 'tttext_g';
				if (i != n-1) {
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_gg';
				}
				else
				{
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_g';
				}
			}
		}
		else if (i == n) {

			var nm = im + 1;
			var n  = 2*i +1;
			var np = ip + 1;

			if (i == x) {
                document.getElementById('menu_' + nm + '_' + id).className = 'ttleft2_b' + '_' +colorId;
				document.getElementById('menu_' + n  + '_' + id).className = 'tttext_b' + '_' +colorId;
				document.getElementById('menu_' + np + '_' + id).className = 'ttright_b' + '_' +colorId;
			}
			else
			{
				document.getElementById('menu_' + nm + '_' + id).className = 'ttleft2_g';
				document.getElementById('menu_' + n  + '_' + id).className = 'tttext_g';
				document.getElementById('menu_' + np + '_' + id).className = 'ttright_g';
			}
			break;
		}
		else
		{
			if (i == x) {
				document.getElementById('menu_' + im  + '_' + id).className = 'ttright_gb' + '_' +colorId;
				document.getElementById('menu_' + 2*i  + '_' + id).className = 'tttext_b' + '_' +colorId;
				if (i != n-1) {
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_bg' + '_' +colorId;
				}
				else
				{
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_b' + '_' +colorId;
				}
			}
			else
			{
				document.getElementById('menu_' + 2*i  + '_' + id).className = 'tttext_g';
				if (i != n-1) {
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_gg';
				}
				else
				{
					document.getElementById('menu_' + ip + '_' + id).className = 'ttright_g';
				}
			}
		}
	}
}

