function changeItem(id,i,n){
	for(x=1;x<=n;x++){
		if(x==i){
			document.getElementById(id+i).className = "Right_01_Title_on"
			document.getElementById(id+"_Body"+i).className = "DisplayShow"
		}else{
			document.getElementById(id+x).className = "Right_01_Title_off"
			document.getElementById(id+"_Body"+x).className = "DisplayHide"
		}
	}
}

//新闻自动切换
var changeItemBody_id
var changeItemBody_i
var changeItemBody_n
var changeItemBody_t
var setTimeoutID

function changeItemBody(id,i,n,t){
	if (id!=null && i!=null && n!=null && t!=null){
		changeItemBody_id=id;
		changeItemBody_i=i;
		changeItemBody_n=n;
		changeItemBody_t=t;
		showChangeItemBody();
	}
	if (changeItemBody_t){
		clearTimeout(setTimeoutID)
		setTimeoutID=setInterval(showChangeItemBody, 4000);
	}
}

function showChangeItemBody() { 
	for(x=1;x<=changeItemBody_n;x++){
		if(x==changeItemBody_i){
			document.getElementById(changeItemBody_id+changeItemBody_i).className = "B_ChangeItem_Title_on"
			document.getElementById(changeItemBody_id+"_Body"+changeItemBody_i).className = "DisplayShow"
		}else{
			document.getElementById(changeItemBody_id+x).className = "B_ChangeItem_Title_off"
			document.getElementById(changeItemBody_id+"_Body"+x).className = "DisplayHide"
		}
	}
	changeItemBody_i++;
	if (changeItemBody_i>changeItemBody_n){changeItemBody_i=1;}

} 
/////////////////




/****************
//新闻自动切换－－－新
功能：修改 window.setTimeout，使之可以传递参数和对象参数   
使用方法： setTimeout(回调函数,时间,参数1,,参数n)   
*****************/
var _st = window.setTimeout; 
window.setTimeout = function(fRef, mDelay) { 
 if(typeof fRef == 'function'){ 
  var argu = Array.prototype.slice.call(arguments,2); 
  var f = (function(){ fRef.apply(null, argu); }); 
  return _st(f, mDelay); 
 } 
 return _st(fRef,mDelay); 
} 
//新闻自动切换

var Items=new Array()
;
function changeTab(id,p,n,t,time,indexID){
	//var indexID=Items.length;
	
	H=0;
	if (Items.length==0){
		indexID=Items.length;
		Items[0]={id:id,p:p,n:n,t:t,time:time,indexID:indexID,tID:null};
		indexID=0;
	}else{
		for(i=0;i<Items.length;i++){
			if (Items[i].id!=id){
				H++;
			}else{
				if (indexID==null){
					Items[i].p=p;
					Items[i].t=t;
					indexID=Items[i].indexID;
				}
				
			}
		}
		
		if (H>=Items.length){
			indexID=Items.length;
			Items.push({id:id,p:p,n:n,t:t,time:time,indexID:indexID,tID:null});
		}
	}

	window.clearTimeout(Items[indexID].tID)
	if (Items[indexID].t){
		if(time!=null && time!=""){
			Items[indexID].p++;
		}
		if (Items[indexID].p>Items[indexID].n){Items[indexID].p=1;}
		Items[indexID].tID=window.setTimeout(changeTab,Items[indexID].time,Items[indexID].id,Items[indexID].p,Items[indexID].n,Items[indexID].t,Items[indexID].time,Items[indexID].indexID);

	}
	showChangeTab(id,p,n);
}

function AutoChange(id,t){
	for(i=0;i<Items.length;i++){
		if (Items[i].id==id){
			Items[i].t=t;
			window.clearTimeout(Items[i].tID);
			if (t){
				Pos=Items[i].p;
				changeTab(Items[i].id,Pos,Items[i].n,Items[i].t,"",Items[i].indexID);
			}
		}
	}
}

function showChangeTab(id,p,n) { 
	for (j=1;j<=n;j++){
		if (p==j){
			document.getElementById(id+p).className = "B_ChangeItem_Title_on";
			document.getElementById(id+"_Body"+p).className = "DisplayShow";
		}else{
			document.getElementById(id+j).className = "B_ChangeItem_Title_off";
			document.getElementById(id+"_Body"+j).className = "DisplayHide";
		}
	}
}