function showLabel(o)
{
	var nav = document.getElementById("nav");
	var childs = lib.childNodes(nav);
	var channels = new Array("web", "photo", "music", "video", "game", "know", "other");
	for (var i=0; i<childs.length; i++)
	{
		if (childs[i] == o)
		{
			childs[i].className = childs[i].className.toString() + " here";
			document.getElementById("search_" + channels[i]).style.display = "";
			document.getElementById("site_" + channels[i]).style.display = "";
		}
		else
		{
			childs[i].className = childs[i].className.toString().replace(/here/g, "");
			document.getElementById("search_" + channels[i]).style.display = "none";
			document.getElementById("site_" + channels[i]).style.display = "none";
		}
	}
}

var lib = {
	childNodes: function (element)
	{
		var nodes = element.childNodes;
		var _nodes = new Array();
		var j = 0;
		for (var i = 0; i < nodes.length; i ++)
		{
			if (nodes[i].nodeType == 1) 
			{
				_nodes[j] = nodes[i];
				j ++;
			}
		}

		return _nodes;
	},

	getParameter: function (varName)
	{
		var query = window.location.search;
		if (query != null || query != "")
		{
			query = query.replace(/^\?+/, "");
			var qArray = query.split("&");
			var len = qArray.length;
			if (len > 0)
			{
				for (var i=0; i<len; i++)
				{
					var sArray = qArray[i].split("=", 2);
					if (sArray[0] && sArray[1] && sArray[0] == varName)
					{
						return unescape(sArray[1]);
					}
				}
			}
		}
		return null;
	},

	getBody:function(s)
	{
		if (document.compatMode && document.compatMode != "BackCompat")
		{
			return document.documentElement;
		}
		else
		{
			return document.body;
		}
	}
}

function _load()
{
	var sou = lib.getParameter("sou");
	if (sou != null)
	{
		showLabel(document.getElementById("nav_" + sou));
	}
}