function PanelEvent(id, on, off)
{
	var onclass = on || "navon";
	var offclass = off || "navoff";
	
	var obj = document.getElementById(id);
	if(obj!=null)
	{
		var ulist = obj.getElementsByTagName("li");
		for(var i=0,len = ulist.length; i < len; i++)
		{
			var thelist = ulist[i];
			
			thelist.onmouseover = function() //Êó±êÒÆÉÏÈ¥
			{
				setOn(this);
			};
		}
		function setOn(theobj)
		{
			for(var j=0;j < ulist.length; j++)
			{
				var thelist = ulist[j];
				//var thelistA = thelist.getElementsByTagName("a")[0];
				if(theobj==thelist)
				{
					thelist.className = onclass;
					//thelistA.className = 'sel';
					if(document.getElementById(thelist.id + "_div")!=null)
					document.getElementById(thelist.id + "_div").className = document.getElementById(thelist.id + "_div").className.replace('hiddenblock','showblock');
				}
				else
				{
					thelist.className = offclass;
                    //thelistA.className = thelistA.className.replace('sel','');
					if(document.getElementById(thelist.id + "_div")!=null)
					document.getElementById(thelist.id + "_div").className = document.getElementById(thelist.id + "_div").className.replace('showblock','hiddenblock');
				}
			}
		};
	}
}

PanelEvent("navbox");
PanelEvent("headerbox","header_on","header_off");