menu_status = new Array();

function toggleMenuItem(theid) {
	if (document.getElementById) {
		var switch_id = document.getElementById(theid);
		
		if (menu_status[theid] != 'expanded') {
			switch_id.className = 'expanded';
			menu_status[theid] = 'expanded';
		}
		else {
			switch_id.className = 'collapsed';
			menu_status[theid] = 'collapsed';
		}
	}
}

function toggleActiveMenuItem(theid) {
	if (menu_status[theid] != 'expanded' && menu_status[theid] != 'collapsed') {
		menu_status[theid] = 'expanded';
	}
	toggleMenuItem(theid);
}
