// 新闻区域层叠自动播放部分
function tabOver(obj,tabId,auto){
	var tabObj = obj.parentNode.parentNode;
	var tabArr=obj.parentNode.getElementsByTagName("li");
	if(auto){
		if(tabObj.getAttribute("autoRoll")=="no")return;
	}else{
		tabObj.setAttribute("autoRoll","no")
	}
	if(parseInt(tabObj.getAttribute("activeTab"))!=tabId){
			tabArr[parseInt(tabObj.getAttribute("activeTab")-1)].className="orangenav";
			obj.className="graynav";
			tabObj.getElementsByTagName("div")[0].getElementsByTagName("div")[tabId-1].style.display="block";
			tabObj.getElementsByTagName("div")[0].getElementsByTagName("div")[parseInt(tabObj.getAttribute("activeTab")-1)].style.display="none";
			tabObj.setAttribute("activeTab",tabId);
		}
}
function tabOut(obj,tabId){
	var tabObj = obj.parentNode.parentNode;
	var tabArr=obj.parentNode.childNodes;
	var tabObjId=tabObj.id;
	if(tabObj.getAttribute("canautoTab")!="auto")return;
	var tabUl=document.getElementById(tabObjId).getElementsByTagName("ul")[0];
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,tabId,tabUl.getElementsByTagName("li").length)
	
}
/*内容事件*/
function tabconOver(obj){
	var tabObj = obj.parentNode;
		tabObj.setAttribute("autoRoll","no")
}
function tabConOut(obj){
	var tabObj = obj.parentNode;
	var tabObjId = tabObj.id;
	if(tabObj.getAttribute("canautoTab")!="auto")return;
	var tabUl=tabObj.getElementsByTagName("ul")[0];
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,parseInt(tabObj.getAttribute("activeTab")),tabUl.getElementsByTagName("li").length)
}

/*自动播放*/
function autoRoll(tabObjId,currentNum,maxNum){
	currentNum = parseInt(currentNum);
	maxNum = parseInt(maxNum);
	var tabObj = document.getElementById(tabObjId);
	var tabLi= tabObj.getElementsByTagName("ul")[0].childNodes[currentNum-1];
	if(tabObj.getAttribute("autoRoll")!="auto")return;
	tabOver(tabLi,currentNum,1);
	document.getElementById(tabObjId).setAttribute("activeTab",currentNum);
	
	if(currentNum<maxNum){
		if( tabObj.getAttribute("autoRoll")=="auto")window.setTimeout('autoRoll("'+tabObjId+'","'+(currentNum+1)+'","'+maxNum+'")',4000);
	}else{
		if(tabObj.getAttribute("autoRoll")=="auto")window.setTimeout('autoRoll("'+tabObjId+'","1","'+maxNum+'")',4000);
	}
}

function initTab(tabObjId,tabId,isAutoRoll){
	var tabObj=document.getElementById(tabObjId);
	var tabUl=document.getElementById(tabObjId).getElementsByTagName("ul")[0];
	tabObj.setAttribute("activeTab",tabId);
	tabObj.setAttribute("canautoTab",isAutoRoll);//记录初始化时tab是否允许自动播放
	tabUl.childNodes[tabId-1].className="graynav";
	document.getElementById(tabObjId).getElementsByTagName("div")[0].getElementsByTagName("div")[tabId-1].style.display="block";
	if(isAutoRoll=="auto"){
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,tabId,tabUl.getElementsByTagName("li").length)
	}
}
function setkeywords(obj)
{
	document.zsname.keywords.value = obj.value;
}

// 招商区域层叠自动播放部分
<!--
/*标签事件*/
function tabOverzs(obj,tabId,auto){
	var tabObj = obj.parentNode.parentNode;
	var tabArr=obj.parentNode.getElementsByTagName("li");
	if(auto){
		if(tabObj.getAttribute("autoRoll")=="no")return;
	}else{
		tabObj.setAttribute("autoRoll","no")
	}
	if(parseInt(tabObj.getAttribute("activeTab"))!=tabId){
			tabArr[parseInt(tabObj.getAttribute("activeTab")-1)].className="orangenav";
			obj.className="graynav";
			tabObj.getElementsByTagName("div")[0].getElementsByTagName("div")[tabId-1].style.display="block";
			tabObj.getElementsByTagName("div")[0].getElementsByTagName("div")[parseInt(tabObj.getAttribute("activeTab")-1)].style.display="none";
			tabObj.setAttribute("activeTab",tabId);
		}
}
function tabOut(obj,tabId){
	var tabObj = obj.parentNode.parentNode;
	var tabArr=obj.parentNode.childNodes;
	var tabObjId=tabObj.id;
	if(tabObj.getAttribute("canautoTab")!="auto")return;
	var tabUl=document.getElementById(tabObjId).getElementsByTagName("ul")[0];
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,tabId,tabUl.getElementsByTagName("li").length)
	
}
/*内容事件*/
function tabconOverzs(obj){
	var tabObj = obj.parentNode;
		tabObj.setAttribute("autoRoll","no")
}
function tabConOut(obj){
	var tabObj = obj.parentNode;
	var tabObjId = tabObj.id;
	if(tabObj.getAttribute("canautoTab")!="auto")return;
	var tabUl=tabObj.getElementsByTagName("ul")[0];
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,parseInt(tabObj.getAttribute("activeTab")),tabUl.getElementsByTagName("li").length)
}

/*自动播放*/
function autoRoll(tabObjId,currentNum,maxNum){
	currentNum = parseInt(currentNum);
	maxNum = parseInt(maxNum);
	var tabObj = document.getElementById(tabObjId);
	var tabLi= tabObj.getElementsByTagName("ul")[0].childNodes[currentNum-1];
	if(tabObj.getAttribute("autoRoll")!="auto")return;
	tabOverzs(tabLi,currentNum,1);
	document.getElementById(tabObjId).setAttribute("activeTab",currentNum);
	
	if(currentNum<maxNum){
		if( tabObj.getAttribute("autoRoll")=="auto")window.setTimeout('autoRoll("'+tabObjId+'","'+(currentNum+1)+'","'+maxNum+'")',4000);
	}else{
		if(tabObj.getAttribute("autoRoll")=="auto")window.setTimeout('autoRoll("'+tabObjId+'","1","'+maxNum+'")',4000);
	}
}

function initTab(tabObjId,tabId,isAutoRoll){
	var tabObj=document.getElementById(tabObjId);
	var tabUl=document.getElementById(tabObjId).getElementsByTagName("ul")[0];
	tabObj.setAttribute("activeTab",tabId);
	tabObj.setAttribute("canautoTab",isAutoRoll);//记录初始化时tab是否允许自动播放
	tabUl.childNodes[tabId-1].className="graynav";
	document.getElementById(tabObjId).getElementsByTagName("div")[0].getElementsByTagName("div")[tabId-1].style.display="block";
	if(isAutoRoll=="auto"){
		tabObj.setAttribute("autoRoll","auto")
		autoRoll(tabObjId,tabId,tabUl.getElementsByTagName("li").length)
	}
}
function setkeywords(obj)
{
	document.zsname.keywords.value = obj.value;
}
//-->


// 品牌和最新会员区域的叠放部分
function showdiv1(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onpno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onp"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}


// 访谈语录区域的叠放部分
function showdiv7(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onfno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onf"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}


// 买壁纸区域的叠放部分和买配材区域层叠部分
function showdiv2(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "on"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}


// 消费维权区域的叠放部分
function showdiv5(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onxfno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onxf"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 即时商机区域的叠放部分
function showdiv6(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onsjno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onsj"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 壁纸学院区域的叠放部分
function showdiv3(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onxno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onx"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 图库区域的叠放部分
function showdiv4(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "ontuno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "ontu"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 右侧宽300招商叠放部分
function showdiv8(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onrno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onr"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 品牌评论叠放部分
function showdiv9(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onplno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onpl"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}
// 品牌评论叠放部分
function showdiv10(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onplno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onpl"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 品牌招商推荐logo叠放部分
function showdiv11(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "onzstjno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "onzstj"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}

// 图库更多阅读叠放部分
function showdiv12(bdiv, num, nn){
var w; 
for ( w=1; w<=num; w++ ){
document.getElementById(bdiv+"li"+w).className = "ontkno"+ w;
document.getElementById(bdiv+"_b_"+w).style.display = "none";
}
document.getElementById(bdiv+"li"+nn).className = "ontk"+nn;
document.getElementById(bdiv+"_b_"+nn).style.display = "";
}
