var isAuato = true;
function TBox_showtip(TBname,TBcount,id,sT){
	if(sT==1) isAuato=false
	for (i=1;i<=TBcount;i++){
		ot = document.getElementById(TBname+"_t_"+i);
		ob = document.getElementById(TBname+"_b_"+i);
		oc = document.getElementById(TBname+"_c_"+i);
		if (i == id){
			ot.className="TipBoxTonShow";
			ob.className="TipBoxBon_sShow";
			oc.className="TipBoxBonShow";
		}else{
			ot.className="TipBoxTonFree";
			ob.className="TipBoxBon_sHide";
			oc.className="TipBoxBonHide";
		}
	}

	onid = document.getElementById(TBname+"_nowID");
	onid.value = id;
	

}

function TBox_changeTB(TBname,TBcount){
	if(isAuato == false) return false;
	os = document.getElementById(TBname+"_onStop");
	onstop = os.value;
	if (onstop == 0){
		onid = document.getElementById(TBname+"_nowID");
		nowID = parseInt(onid.value);
		if (nowID < TBcount){
			nextID = nowID+1;
		}else{
			nextID = 1;
		}
		TBox_showtip(TBname,TBcount,nextID,0);
		onid.value = nextID;
	}
	setTimeout("TBox_changeTB('"+TBname+"',"+TBcount+","+nextID+")",8000);
}

function TBox_stop(TBname){
	os = document.getElementById(TBname+"_onStop");
	os.value = 1;
}

function TBox_start(TBname){
	os = document.getElementById(TBname+"_onStop");
	os.value = 0;
}