//<![CDATA[
function focus(name,total){
	this.name = name;
	this.total = total;
	this.current = 1
	setFocus.call(this)
	this.reset = setTimeout(tofocus(this,1),2000);
}
focus.prototype={
	to:function(i){
		if(i>this.total)i=1;
		this.current=i;
		for(var j=1;j<=this.total;j++){
			document.getElementById(this.name+"_cont"+j).style.display=(this.current==j)?"block":"none";
			document.getElementById(this.name+"_btn"+j).className=(this.current==j)?"current":"";
		}
		clearTimeout(this.reset);
		this.reset = setTimeout(tofocus(this,++this.current),5000);
	}
}
function setFocus(){
	for(i=1;i<=this.total;i++){
		document.getElementById(this.name+"_btn"+i).onclick=tofocus.call(this,this,i)
	}
}
function tofocus(obj,i){
	return function(){
		obj.to(i)
	}
}
//]]>
