function secBoard(n) {
	for (i = 0; i < 6; i++)
		document.getElementById('tabWin_Content' + i).className = "sec1";
	document.getElementById('tabWin_Content' + n).className = "sec2";
	for (i = 0; i < 6; i++)
		document.getElementById('formsearch' + i).style.display = "none";
	document.getElementById('formsearch' + n).style.display = "block";
}

function Latestbard(n) {
	for (i = 0; i < 2; i++)
		document.getElementById('Latest_Content' + i).className = "tit_switch2";
	document.getElementById('Latest_Content' + n).className = "tit_switch1";
	for (i = 0; i < 2; i++)
		document.getElementById('formcener' + i).style.display = "none";
	document.getElementById('formcener' + n).style.display = "block";
}

function supplytbard(n) {
	for (i = 0; i < 2; i++)
		document.getElementById('supply_Content' + i).className = "tit_switch4";
	document.getElementById('supply_Content' + n).className = "tit_switch3";
	for (i = 0; i < 2; i++)
		document.getElementById('formsupply' + i).style.display = "none";
	document.getElementById('formsupply' + n).style.display = "block";
}

function Latetbard(n) {
	for (i = 0; i < 3; i++)
		document.getElementById('Late_Content' + i).className = "Late_no2";
	document.getElementById('Late_Content' + n).className = "Late_no1";
	for (i = 0; i < 3; i++)
		document.getElementById('formlate' + i).style.display = "none";
	document.getElementById('formlate' + n).style.display = "block";
}

function prodtbard(n) {
	for (i = 0; i < 11; i++) {
		if (i == n) {
			document.getElementById('prod_Content' + n).className = "p_bright1";
			document.getElementById('formprod' + n).style.display = "block";
		} else {
			document.getElementById('prod_Content' + i).className = "prod_button";
			document.getElementById('formprod' + i).style.display = "none";
		}
	}
}

function protbard(n) {
	for (i = 0; i < 3; i++)
		document.getElementById('pro_Content' + i).className = "pro_div1";
	document.getElementById('pro_Content' + n).className = "pro_div2";
	for (i = 0; i < 3; i++)
		document.getElementById('formpro' + i).style.display = "none";
	document.getElementById('formpro' + n).style.display = "block";
}

function guitbard(n) {
	for (i = 0; i < 12; i++)
		document.getElementById('gui_Content' + i).className = "guicaxw2";
	document.getElementById('gui_Content' + n).className = "guicaxw1";
	for (i = 0; i < 12; i++)
		document.getElementById('formgui' + i).style.display = "none";
	document.getElementById('formgui' + n).style.display = "block";
}

function rankingtbard(n) {
	for (i = 0; i < 9; i++)
		document.getElementById('ranking_Content' + i).className = "ranking2";
	document.getElementById('ranking_Content' + n).className = "ranking1";
	for (i = 0; i < 9; i++)
		document.getElementById('formranking' + i).style.display = "none";
	document.getElementById('formranking' + n).style.display = "block";
}

function Layer_HideOrShow(cur_div) {
	var current = document.getElementById(cur_div);
	if (current.style.display == "none") {
		current.style.display = "block";
		document.getElementById("btn_" + cur_div).innerHTML = "<span class=\"close\">收起</span>";
	} else {
		current.style.display = "none";
		document.getElementById("btn_" + cur_div).innerHTML = "<span class=\"open\">展开</span>";
	}
}

/* -------add by kin */

function showSdBlock(menu, content, value, max) {
	for (i = 0; i < max; i++) {
		if (i == value) {
			$("#" + menu + i).addClass("tex-bsk");
			$("#" + content + i).css("display", "block");
		} else {
			$("#" + menu + i).removeClass("tex-bsk");
			$("#" + content + i).css("display", "none");
		}
	}
}

function showSupplyByChannelType(tmenu, tv, tmax, chmenu, chitem, chitemv,
		chitemmax, content) {
	if (tv >= 0) {
		for (i = 0; i < tmax; i++) {
			if (i == tv) {
				$("#" + tmenu + i).removeClass("downl_nes");
				$("#" + tmenu + i).addClass("downl_new");
				$("#" + chmenu + i).css("display", "block");
			} else {
				$("#" + tmenu + i).removeClass("downl_new");
				$("#" + tmenu + i).addClass("downl_nes");
				$("#" + chmenu + i).css("display", "none");
			}

			// clear
			for (k = 0; k < chitemmax; k++) {
				$("#" + content + i + k).css("display", "none");
				$("#" + chitem + i + k).attr("class", "ranking2");
			}
		}
		$("#" + chitem + tv + "0").addClass("ranking1");
		;
		$("#" + content + tv + "0").css("display", "block");
	} else {
		for (j = 0; j < chitemmax; j++) {
			if (j == chitemv) {
				$("#" + chitem + j).removeClass("ranking2");
				$("#" + chitem + j).addClass("ranking1");
				$("#" + content + j).css("display", "block");
			} else {
				$("#" + chitem + j).removeClass("ranking1");
				$("#" + chitem + j).addClass("ranking2");
				$("#" + content + j).css("display", "none");
			}
		}
	}
}

function showArticleBlock(menu, content, value, max) {
	for (i = 0; i < max; i++) {
		if (i == value) {
			$("#" + menu + i).attr("class", "not");
			$("#" + content + i).css("display", "block");
		} else {
			$("#" + menu + i).attr("class", "noe");
			$("#" + content + i).css("display", "none");
		}
	}
}

function showBlockOnProjectPage(menu, content, value, max) {
	for (i = 0; i < max; i++) {
		if (i == value) {
			$("#" + menu + i).attr("class", "recom");
			$("#" + content + i).css("display", "block");
		} else {
			$("#" + menu + i).attr("class", "latest");
			$("#" + content + i).css("display", "none");
		}
	}
}

function showBlockOnXieHuiPage(menu, content, value, max) {
	for (i = 0; i < max; i++) {
		if (i == value) {
			$("#" + menu + i).attr("class", "bck");
			$("#" + content + i).css("display", "block");
		} else {
			$("#" + menu + i).attr("class", "");
			$("#" + content + i).css("display", "none");
		}
	}
}

function showProductBlock(menu, content, value, max) {
	for (i = 0; i < max; i++) {
		if (i == value) {
			$("#" + menu + i).attr("class", "p_bright1");
			$("#" + content + i).css("display", "block");
		} else {
			$("#" + menu + i).attr("class", "prod_button");
			$("#" + content + i).css("display", "none");
		}
	}
}
