
// 选项卡效果
function setTab(name,num) {
	var menu = document.getElementById(name+"Menu").getElementsByTagName("LI");

	for ( i = 1 ; i <= menu.length ; i++ ) {
		menu[i-1].className = i == num ? "current" : "";
		document.getElementById(name+i).style.display = i == num ? "block" : "none";
	}
} 


// 选项卡效果
function setTab2(m,n){

	var title = document.getElementById("smenu"+m).getElementsByTagName("LI");
	var content = document.getElementById("scontent"+m).getElementsByTagName("LI");
	
	for(i = 0 ; i < title.length ; i++){
		if (i == n) {
			title[i].parentNode.parentNode.className = "title tab"+i;
		}
		title[i].className = i == n ? "current" : "";
		content[i].className = i == n ? "block" : "hidden";
	}
}



// 加入到收藏夹
function addFavorite(sUrl, sTitle) {
	var sUrl = 'http://en.juren.com/';
	var sTitle = '英语网 - 巨人网 做感动中国人的教育！';
	if (window.sidebar && "object" == typeof( window.sidebar ) && "function" == typeof( window.sidebar.addPanel ) ) {
		window.sidebar.addPanel( sTitle, sUrl, '' );
	} else if ( document.all && "object" == typeof( window.external ) ) {
		window.external.addFavorite( sUrl, sTitle );
	}
} 

