//模板切换
function tabit(tabName,btnId,tabNumber){
	for(i=0;i<tabNumber;i++){
		document.getElementById(tabName+"_div"+i).style.display = "none";
		document.getElementById(tabName+"_btn"+i).className = "select_info";
	}
	document.getElementById(tabName+"_div"+btnId).style.display = "block";
	document.getElementById(tabName+"_btn"+btnId).className = "select_menu";
}	

function tabit2(tabName,btnId,tabNumber){
	for(i=0;i<tabNumber;i++){
		document.getElementById(tabName+"_div"+i).style.display = "none";
		document.getElementById(tabName+"_btn"+i).className = "select_infof";
	}
	document.getElementById(tabName+"_div"+btnId).style.display = "block";
	document.getElementById(tabName+"_btn"+btnId).className = "select_menuf";
	
}

function tabit5(tabName,btnId,tabNumber){
	for(i=0;i<tabNumber;i++){
		document.getElementById(tabName+"_div"+i).style.display = "none";
		document.getElementById(tabName+"_btn"+i).className = "select_infof";
	}
	document.getElementById(tabName+"_div"+btnId).style.display = "block";
	document.getElementById(tabName+"_btn"+btnId).className = "select_menuf";
	
}

//导航舌签切换
function doClick(o){
	 o.className="selected";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=12;i++){
	   id ="nav"+i;
	   j = document.getElementById(id);
	   e = document.getElementById("sub"+i);
	   if(id != o.id){
	   	 j.className="no";
	   	 e.style.display = "none";
	   }else{
			e.style.display = "block";
	   }
	 }
	 }
	 
//获取指定ID的元素
function $(eid){
	return document.getElementById(eid);
}

function $DE(id) {
	return document.getElementById(id);
}

//加入收藏
function addBookmark(title) {
                     var url=parent.location.href;
                     if (window.sidebar) { 
                            window.sidebar.addPanel(title, url,""); 
                     } else if( document.all ) {
                     window.external.AddFavorite( url, title);
                     } else if( window.opera && window.print ) {
                     return true;
                     }
       }
//屏蔽错误JS
function ResumeError() { 
return true; 
} 
window.onerror = ResumeError;
var stabid=0;
function setsrch(c){
for(i=0;i<4;i++){document.getElementById("stab"+i).className = "";}
c.className = "cur";
if(c.id=="stab0")
{document.srchfrm.action="/soumoban.php";stabid=0;}
if(c.id=="stab1"){document.srchfrm.action="/soucmsmoban.php";stabid=1;}
if(c.id=="stab2"){document.srchfrm.action="/soujiaocheng.php";stabid=2;}
if(c.id=="stab3"){document.srchfrm.action="/soutexiao.php";stabid=3;}
}
