function ActionRotator(A){this.container=A;
this.current=-1;
this.items=[];
this.init()
}ActionRotator.prototype={TIME_DELAY:6000,TIME_RESUME:2000,init:function(){var D=/overview/i;
var A=this.container.getElementsByTagName("li");
for(var C,B=0;
B<A.length;
B++){C=A[B];
if(!D.test(C.className)){this.addItem(C)
}}EventListener.addEvent(this.container,"mouseover",this.scope(this.pause));
EventListener.addEvent(document,"mouseover",this.scope(this.unpause));
this.animate()
},addItem:function(B){var A=this.items.length;
this.items[A]=new ActionRotatorItem(B,this,A)
},next:function(E){var B=++this.current%this.items.length;
for(var A,D,C=0;
C<this.items.length;
C++){D=this.items[C];
A=((B==C&&!E)||(E==D))?true:false;
D.toggle(A)
}if(E){this.current=E.index
}},pause:function(B){var A=EventListener.getTarget(B,"li");
if(A&&A.rotatorItem){this.paused=true;
clearTimeout(this.timeout);
this.next(A.rotatorItem)
}},unpause:function(B){if(!this.paused){return 
}var A=EventListener.getTarget(B);
while(A){if(A==this.container){return 
}A=A.parentNode
}this.resume()
},resume:function(){this.paused=false;
this.timeout=setTimeout(this.scope(this.animate),this.TIME_RESUME)
},animate:function(){if(!this.paused){this.next();
this.timeout=setTimeout(this.scope(this.animate),this.TIME_DELAY)
}},scope:function(B){var A=this;
return function(){return B.apply(A,arguments)
}
}};
function ActionRotatorItem(C,D,A){this.container=C;
this.container.rotatorItem=this;
this.rotator=D;
this.index=A;
var B=C.getElementsByTagName("span");
this.banner=B[B.length-1];
this.display(false);
this.animator=new Animator(1,100,this.scope(this.animate),this.scope(this.animateEnd));
this.animator.setDuration(this.TIME_ANIMATE)
}ActionRotatorItem.prototype={CLASS_ACTIVE:"current",TIME_ANIMATE:750,toggle:function(A){this.direction=A?1:-1;
if(A&&ClassName.contains(this.container,this.CLASS_ACTIVE)){this.display(true);
return 
}if(A){this.setOpacity(0);
ClassName.add(this.container,this.CLASS_ACTIVE);
this.display(true)
}else{ClassName.remove(this.container,this.CLASS_ACTIVE)
}if(this.visible){this.animator.start()
}},animate:function(B){var A=(this.direction>0)?B:(100-B);
this.setOpacity(A)
},animateEnd:function(){this.animate(100);
if(this.direction<0){this.display(false)
}},setOpacity:function(A){var B=this.banner.style;
B.opacity=A/100;
B.mozOpacity=A/100;
B.filter="alpha(opacity="+A+")"
},display:function(A){this.banner.style.display=A?"block":"none";
this.visible=A
},scope:function(B){var A=this;
return function(){return B.apply(A,arguments)
}
}};
EventListener.addEvent(window,"load",function(){var B=document.getElementById("rotator");
if(B){new ActionRotator(B)
}var A=document.getElementById("rotator-subhomepage");
if(A){new ActionRotator(A)
}});