window.onerror = function(){return true};
function show_cur_class(obj_str)//显示上级
{
	var obj=document.getElementById(obj_str);
	//alert(obj.id)
	while (obj.parentElement.tagName!='BODY')
	{
		if (obj.tagName=="Q")
		{
			obj.style.overflow='visible';
			obj.style.backgroundPosition='-1500px 0px';
		}
		obj=obj.parentElement;
	}
}

function menu_bg(obj,str){
	var arr=obj.all//数量
	for (var i=0;i<arr.length;i++)
    {
		if(arr[i].className!=null)//名称不为空
		{
			if (arr[i].className.indexOf("-")>-1 && arr[i].className.indexOf(str)<0)//包含-但不包含str
			{
				var arr2=arr[i].className.split("-")
				arr[i].className=str+"-"+arr2[1]
			}
		}
	}
}

function win_open(u,n,s){window.open(u,n,s)}

var old_a=document.getElementById('product_class_selected');
function go2(obj,classID)
{
	if (!old_a)document.getElementById('product_class_selected')

	if(old_a && old_a.className)old_a.className=''
	obj.className='selected';
	old_a=obj;
	parent.mainFrame.document.location.href='?exe=show_content_list&classID='+classID
	if (obj.parentElement.tagName=="Q")
	{
		obj.parentElement.style.backgroundPosition='-1500px 0px';
		obj.parentElement.style.overflow='visible';
	}
	obj.blur()
}
function show_all()
{
	if (old_a)old_a.className='';
	parent.mainFrame.document.location.href='class_main.asp';
}
function s_h()
{
	var obj=document.elementFromPoint(event.x,event.y)
	if (event.offsetY>20 || event.offsetX>30)return;

	if(obj.tagName=="Q")
	{
		if (obj.style.overflow=='hidden'||obj.style.overflow=='')
		{
			obj.style.backgroundPosition='-1500px 0px';
			obj.style.overflow='visible';
		}
		else
		{
			obj.style.backgroundPosition='0px 0px';
			obj.style.overflow='hidden';
		}
	}
}
