function hideItem(id,item,itemId)
{

	var tmp = null;
	if (item) tmp = item;
	else tmp = document.getElementById(itemId);

	if (document.getElementById)
	{
		document.getElementById(id).style.display = 'none';
		tmp.style.fontWeight = 'normal';
	}
	else
	{
		if (document.layers)
		{
			document.id.display = 'none';
			tmp.style.fontWeight = 'normal';
		}
		else
		{
			document.all.id.style.display = 'none';
			tmp.style.fontWeight = 'normal';
		}
	}
}

function showItem(id,item)
{
	if (document.getElementById)
	{
		document.getElementById(id).style.display = 'block';
		item.style.fontWeight = 'bold';
	}
	else
	{
		if (document.layers)
		{
			document.id.display = 'block';
			item.style.fontWeight = 'bold';
		}
		else
		{
			document.all.id.style.display = 'block';
			item.style.fontWeight = 'bold';
		}
	}
}

function switchId(id,item)
{
	if (document.getElementById)
	{
		if (document.getElementById(id).style.display == 'none')
		{
			hideAllIds();
			showItem(id,item);
		}
		else
		{
			hideItem(id,item);
		}
	}
	else {
		if (document.layers)
		{
			if (document.id.display == 'block')
			{
				hideAllIds();
				showItem(id,item);
			}
			else
			{
				hideItem(id,item);
			}
		}
		else
		{
			if (document.all.id.style.display == 'block')
			{
				hideAllIds();
				showItem(id,item);
			}
			else
			{
				hideItem(id,item);
			}
		}
	}
}

function hideAllIds()
{
	for (var i=0;i<no_ids;i++)
	{
		hideItem('id-'+i+'-subitem',null,'id-'+i+'-item');
	}
}

function showAllFacilitati()
{
	if (document.getElementById('list_facilitati').style.overflow == 'hidden')
	{
		document.getElementById('list_facilitati').style.overflow = 'auto';
		document.getElementById('show_all_facilitati').innerHTML  = 'restrange lista';


	}
	else
	{
		document.getElementById('list_facilitati').style.overflow = 'hidden';
		document.getElementById('show_all_facilitati').innerHTML  = 'mai multe facilitati';
	}
}
