function yoboframe_clickminbtn(_1,_2,_3){
var _4=$(_2);
if(_1&&_4){
if(_1.className==_3){
Effect.BlindUp(_4,{duration:0.2});
_1.className=_3+"_r";
}else{
Effect.BlindDown(_4,{duration:0.2});
_1.className=_3;
}
}
}
function yoboframe_clicktogbtn(_5,_6,_7){
var _8=$(_6);
var _9=$(_6+"r");
if(_5&&_8&&_9){
if(_5.className==_7){
Element.hide(_8);
Element.show(_9);
_5.className=_7+"_r";
}else{
Element.show(_8);
Element.hide(_9);
_5.className=_7;
}
}
}
if(typeof (yobo_imageSlider)!="function"){
var yobo_imageSlider=Class.create();
yobo_imageSlider.prototype={initialize:function(_a,_b,_c,_d,_e,_f,_10){
this.container=null;
this.content=null;
this.leftbtn=null;
this.rightbtn=null;
this.isvertical=false;
this.step=30;
this.interval=50;
this.targetstep=300;
this.looptimer=false;
this.targetoffset=0;
this.maxlen=0;
this.contentlen=_10;
if(_a&&_b&&_c&&_d){
this.container=$(_a);
this.content=$(_b);
this.leftbtn=$(_c);
this.rightbtn=$(_d);
if(this.container&&this.content&&this.leftbtn&&this.rightbtn){
this.isvertical=_e?true:false;
this.targetoffset=0;
if(this.isvertical){
this.maxlen=parseInt(this.container.offsetHeight);
this.content.style.top="0px";
}else{
this.maxlen=parseInt(this.container.offsetWidth);
this.content.style.left="0px";
}
this.targetstep=_f?_f:this.maxlen;
this.step=Math.ceil(this.targetstep/10);
Event.observe(this.leftbtn,"click",this.startLoop.bindAsEventListener(this,true));
Event.observe(this.rightbtn,"click",this.startLoop.bindAsEventListener(this,false));
}else{
traceError("Error yobo_imageSlider::initialize -> invalid domid:"+_a+","+_b+","+_c+","+_d);
}
}else{
traceError("Error yobo_imageSlider::initialize -> missing domid:"+_a+","+_b+","+_c+","+_d);
}
},startLoop:function(e,dir){
try{
if(!this.looptimer){
if(dir){
if(this.isvertical){
}else{
var _13=parseInt(this.content.style.left);
if(_13+this.targetstep>0){
_13=0;
}else{
_13+=this.targetstep;
}
this.targetoffset=_13;
this.step=Math.abs(this.step);
}
}else{
if(this.isvertical){
}else{
var _13=parseInt(this.content.style.left);
if(_13+this.contentlen-this.targetstep<this.maxlen){
_13=this.maxlen-this.contentlen;
}else{
_13-=this.targetstep;
}
this.targetoffset=_13;
this.step=0-Math.abs(this.step);
}
}
traceError("yobo_imageSlider::startLoop -> targetoffset="+this.targetoffset+", step="+this.step);
var _14=this;
this.looptimer=setInterval(function(){
_14.loopStep();
},this.interval);
}
}
catch(e){
traceError("Error yobo_imageSlider::startLoop -> e:"+e);
}
},loopStep:function(){
try{
if(this.isvertical){
}else{
var _15=parseInt(this.content.style.left);
if(Math.abs(_15-this.targetoffset)<=Math.abs(this.step)){
this.content.style.left=this.targetoffset+"px";
if(this.looptimer){
clearTimeout(this.looptimer);
this.looptimer=false;
}
}else{
this.content.style.left=(_15+this.step)+"px";
}
}
}
catch(e){
traceError("Error yobo_imageSlider::loopStep -> e:"+e);
}
}};
}
if(typeof (yobo_dropMenu)!="function"){
var yobo_dropMenu=Class.create();
yobo_dropMenu.prototype={initialize:function(_16,_17){
this.btn=$(_16);
this.list=$(_17);
this.btnclick=false;
if(this.btn&&this.list){
Element.hide(this.list);
Event.observe(this.btn,"click",this.clickButton.bindAsEventListener(this));
Event.observe(document,"click",this.clickDocument.bindAsEventListener(this));
}
},clickButton:function(){
this.btn.blur();
if(this.btn.className=="downbtn"){
this.btn.className="downbtncur";
Element.show(this.list);
this.list.style.left=getPos(this.btn.parentNode,"Left")+"px";
this.list.style.top=getPos(this.btn.parentNode,"Top")+this.btn.parentNode.offsetHeight+"px";
}else{
this.btn.className="downbtn";
Element.hide(this.list);
}
this.btnclick=true;
},clickDocument:function(){
if(!this.btnclick){
Element.hide(this.list);
this.btn.className="downbtn";
}
this.btnclick=false;
}};
}
