var opened_menu;
opened_menu = '';

function open_submenu(id)
{
	var idd = id + '_sub';
	opened_menu = id;
	document.getElementById(idd).style.display = 'block';
	
	idd = id + '_img';
	document.getElementById(idd).src = '../i/menu/left/arrowtodown.gif';	
}

function close_submenu()
{
	if (opened_menu != '')
	{
	document.getElementById(opened_menu+'_sub').style.display = 'none';
	document.getElementById(opened_menu+'_img').src = '../i/menu/left/arrowtoright.gif';
	opened_menu = '';
	}
}
function atrim(str) {
	return str.replace(/^\s*/,'').replace(/\s*$/,'');
}

var identitylist = ['ts2', 'ts3'];

function highlightElement(activeEl)
{
    if (activeEl && activeEl.parentNode)
	activeEl = activeEl.parentNode;
    else
        return;
    for (var i = 0; i < identitylist.length; i++)
    {
        var el = document.getElementById(identitylist[i]);
        if (el)
        {
            if (el != activeEl)
                el.className = '';
        }
        activeEl.className = 'active';
    }
}
