function NewsSpanBar(){
	this.f=1;
	this.event = "click"
	this.titleid = "";
	this.bodyid="";
	this.class_dis = "dis";
	this.class_undis = "undis";
	this.class_hiton = "tab_search_on";
	this.class_hitno = "tab_search";

	var Tags,TagsCnt,len,flag;
	var BClassName;
	this.load=function(){
		if (!document.getElementById(this.titleid)||!document.getElementById(this.bodyid))
		{
			return false;
		}
		flag = this.f;
		BClassName = [this.class_dis,this.class_undis,this.class_hiton,this.class_hitno];
		Tags=document.getElementById(this.titleid).getElementsByTagName('p'); 
		TagsCnt=document.getElementById(this.bodyid).getElementsByTagName('dl'); 
		len=Tags.length;
		for(var i=0;i<len;i++){
			Tags[i].value = i;
			if (this.event!='mouseover'){
				Tags[i].onmouseover=function(){changeNav(this.value)};
			}else{
				Tags[i].onclick=function(){changeNav(this.value)};
			}
			TagsCnt[i].className=BClassName[1];
		}
		Tags[flag].className=BClassName[3];
		TagsCnt[flag].className=BClassName[0];
	}
	function changeNav(v){
		Tags[flag].className=BClassName[2];
		TagsCnt[flag].className=BClassName[1];
		flag=v;
		Tags[v].className=BClassName[3];
		TagsCnt[v].className=BClassName[0];
	}
}

function SpanBarLoad(){
	var new3 = new NewsSpanBar();
	new3.f=0;
	new3.titleid = "topic_bot";
	new3.bodyid = "topicbody";
	new3.class_hiton = "tabgroup_on";
	new3.class_hitno = "tabgroup";
	new3.load();

	//Right Circle Switch
	var new1 = new NewsSpanBar();
	new1.f=0;
	new1.titleid = "tabgroup_bot";
	new1.bodyid = "tabgroupbody";
	new1.class_hiton = "tabgroup_on";
	new1.class_hitno = "tabgroup";
	new1.load();

	//Second Line Set 2_1
	var new1 = new NewsSpanBar();
	new1.f=0;
	new1.titleid = "tab2_1_bot";
	new1.bodyid = "tab2_1body";
	new1.class_hiton = "tabgroup_on";
	new1.class_hitno = "tabgroup";
	new1.load();

	//Second Line Set 2_2
	var new1 = new NewsSpanBar();
	new1.f=0;
	new1.titleid = "tab2_2_bot";
	new1.bodyid = "tab2_2body";
	new1.class_hiton = "tabgroup_on";
	new1.class_hitno = "tabgroup";
	new1.load();

	//Second Line Set 3_1
	var new1 = new NewsSpanBar();
	new1.f=0;
	new1.titleid = "tab3_1_bot";
	new1.bodyid = "tab3_1body";
	new1.class_hiton = "tabgroup_on";
	new1.class_hitno = "tabgroup";
	new1.load();

	//Second Line Set 3_2
	var new1 = new NewsSpanBar();
	new1.f=0;
	new1.titleid = "tab3_2_bot";
	new1.bodyid = "tab3_2body";
	new1.class_hiton = "tabgroup_on";
	new1.class_hitno = "tabgroup";
	new1.load();

}