var itemheight = 0;
var mnuid = 0;
var subid = 0;

function menuExpand(id, itemid)
{
	var count = 1;
	mnuid = id;
	if(itemid > 0)
		count = itemid;
	var item = document.getElementById('mnu_sub_'+id+'_'+count);
	if(item != null)
	{
		if(item.style.display != "list-item")
		{
			item.style.display = "list-item";
			itemheight = 0;
			subid = count;
			window.setTimeout("subSmoothExpand('mnu_sub_"+id+"_"+count+"')", 20);
		}
	}
}

function subSmoothExpand(item)
{
	var cur_item = document.getElementById(item);
	cur_item.style.height = itemheight + 'px';
	itemheight++;
	if(itemheight > 10)
	{
		cur_item.style.height = "auto";
		menuExpand(mnuid, subid + 1);
	}
	else
		window.setTimeout("subSmoothExpand('" + item + "')", 20);	
}