function menu(selitem)
{	
	gMenu = selitem;
	var c = document.getElementById(selitem);
	var a = c.getElementsByTagName("a");
	a[0].style.color = "#0F4F37";//"#BFC6E0";//"#D71D6C";
	c.style.border = "2px #E6E8EC inset";
}

function menuover(selitem)
{
	if(selitem != gMenu)
	{
		var c = document.getElementById(selitem);
		c.style.color = "#586491"//"#BFC6E0";//"#D71D6C";
		c.style.border = "2px #E6E8EC inset";	
	}
}

function menuout(selitem)
{
	if(selitem != gMenu)
	{
		var c = document.getElementById(selitem);
		c.style.color = "#50576E"//"#BFC6E0";//"#D71D6C";
		c.style.border = "2px #E6E8EC outset";
	}
}

function show(id)
{
	var a = document.getElementById(id);
	if(a.style.display == '')
		a.style.display = "none";
	else
	{
		a.style.display = '';
	}
}

function addfav(lng)
{
	if (document.all)
	{
		var url = "http://www.math10.com" + (lng == 'bg'?'/bg/':'');
		var name = (lng == 'bg'?'Math10.com - бг сайт за математика':'Math10.com - Maths Education Site');
		window.external.AddFavorite(url, name);
	}
	else
	{
		var msg = (lng == 'bg'?'Опцията е валидна за IE':'This option is available in IE');
		alert(msg);
	}
}


//The new version
function show(path,ulId,imgId)
{
	var ul = document.getElementById(ulId);
	var im = document.getElementById(imgId);
	if(ul.style.display == "block")
	{
		ul.style.display = "none";
		im.src = path + "images/plus.gif";
	}
	else
	{
		ul.style.display = "block";
		im.src = path + "images/minus.gif";
	}
}