function switchTab(identify,index,count) {
		for(i=0;i<count;i++) {
			var CurTabObj = document.getElementById("Tab_"+identify+"_"+i) ;
			var CurListObj = document.getElementById("List_"+identify+"_"+i) ;
			if (i != index) {
				fRemoveClass(CurTabObj , "upH2") ;
				fRemoveClass(CurListObj , "upBox") ;
			}
		}
		fAddClass(document.getElementById("Tab_"+identify+"_"+index),"upH2") ;
		fAddClass(document.getElementById("List_"+identify+"_"+index),"upBox") ;
	}
	function $(item){
		return document.getElementById(item);
	}
	var B=BigNews={
		current:0,
		next:0,
		scrollInterval:0,
		autoScroller:0
	};
	BigNews.turn=function(index,obj){
		clearInterval(BigNews.autoScroller);
		BigNews.scroll(index,obj);
	}
	BigNews.scroll=function(index,obj){
		if(obj.smallpic==null || obj.smallpic==""){
			clearInterval(BigNews.autoScroller);
			return;
		}
		var count=0;
		var step=obj.step;
		var duration=16;
		var b=BigNews;
		b.next=index;
		if(index!=b.current&&count>duration/8){
			return;
		}
		clearInterval(b.scrollInterval);
		for(var i=0;i<obj.totalcount;i++){
			$(obj.smallpic+"_"+i).className='';
			if(obj.pictxt!=null && obj.pictxt!="")		
				$(obj.pictxt+"_"+i).style.display = "none" ;
		}
		$(obj.smallpic+"_"+index).className=obj.selectstyle;
		if(obj.pictxt!=null && obj.pictxt!="")	
			$(obj.pictxt+"_"+index).style.display = "block" ;
		var span=index-b.current;
		var begin_value=$(obj.bigpic).scrollTop;
		var chang_in_value=span*step+(b.current*step-begin_value);
		b.scrollInterval=setInterval(function(){doit(begin_value,chang_in_value)},10);
		function doit(b,c){
			$(obj.bigpic).scrollTop=cpu(count,b,c,duration);
			count++;
			if(count==duration){
				clearInterval(BigNews.scrollInterval);
				scrollInterval=0;
				count=0;
				$(obj.bigpic).scrollTop=b+c;
				BigNews.current=index;
			}
		}
		function cpu(t,b,c,d) {return c*((t=t/d-1)*t*t+1)+b;};
	}
	BigNews.auto=function(obj){
		clearInterval(BigNews.autoScroller);
		BigNews.autoScroller=setInterval(function(){
			BigNews.scroll(BigNews.current==(obj.totalcount-1)?0:BigNews.current+1,obj);
		},obj.autotimeintval);
	}
	BigNews.pauseSwitch = function() {	
		clearTimeout(BigNews.autoScroller);
	}
	BigNews.init=function(obj){
		$(obj.bigpic).onmouseover = new Function("BigNews.pauseSwitch();") ;		
		$(obj.bigpic).onmouseout = new Function("BigNews.auto("+obj.objname+");") ;	
		for (i=0;i<obj.totalcount;i++) {	
			if(obj.smallpic!=null && obj.smallpic!="") {
			 $(obj.smallpic+"_"+i).onmouseover = new Function("BigNews.turn("+i+","+obj.objname+");BigNews.pauseSwitch();") ;		
			 $(obj.smallpic+"_"+i).onmouseout = new Function("BigNews.auto("+obj.objname+");") ;	
			}
		} 
		BigNews.auto(obj);
	}
/**
 * 拼音索引功能js
 * @param o
 * @return
 */
function XMenu(o){
	this.$ = function(o){ return document.getElementById(o);}
	this.$$ = function(o, str){ return o.getElementsByTagName(str);}
	this.obj = o;
	this.bind();
}
XMenu.prototype = {
	bind : function(){
		var xxx = this.$(this.obj);	//得到传对的对象。在这里，我没有做容错处理。没有判断这个对象存在不存在，如果需要请自己判断。
		var xdt = this.$$(xxx, 'dt');//得到这个对象下的所有的dt
		var xdd = this.$$(xxx, 'dd');//得到这个对象下的所有的dd
		var xdtl = xdt.length;//取得有几个dt
		xxx['obj'] = xdt[0];//给传的对象添加一个属性obj，值为 第一个 dd
		for(var i=0; i<xdtl; i++){//循环 该对象下的所有的 dd，并为它添加onmouseover事件。
			xdt[i]['dd'] = xdd[i];//给当前对象添加一个属性dd,值为，与它相对应的dd对象，它的作用是在移动到当前对象的时候给与它相对应的dd设置样式用的。
			xdt[i]['div'] = xxx;//给当前对象添加一个属性div，值为，调用XMenu时，所传入的参数所对应的对象。
			xdt[i].onmouseover = function(){
				this['div']['obj'].className = 'normal';
				this['div']['obj']['dd'].className = 'none';
				this.className = 'over';
				var ddlable=document.all?this.innerText:this.textContent;
				xajax_SpellingSearch(ddlable);
				this['dd'].className = 'block';
				this['div']['obj'] = this;
			}
		}
		xxx.onmouseout = function(){
			var d = this;//用来保存当前的xxx对象
			this.hide = setTimeout(function(){
				d['obj'].className = 'normal';
				d['obj']['dd'].className = 'none';
				d = null;
			},300);	//鼠标移出后几秒隐藏。在这里设置时间[秒数*1000]
		}
		xxx.onmouseover = function(){
			if(this.hide){
				clearTimeout(this.hide);
			}
		}
	}
}
