var slide={
  element:null,
  current:0,
  paused:false,
  delay:1000,

  init:function(){
    this.element=$$('li.featuredpart');
    this.refresh();
    this.timeout=setTimeout("slide.next()",this.delay);
  },

  refresh:function(){
    var current=this.current;
    this.element.each(function(element,id){
      if(id==current)
        element.show();
      else
        element.hide();
    });
  },

  next:function(){
    if(++this.current>=this.element.length)this.current=0;
    this.refresh();
    clearTimeout(this.timeout);
    this.timeout=setTimeout("slide.next()",this.delay);
  },
  previous:function(){
    if(--this.current<0)this.current=this.element.length-1;
    this.refresh();
    clearTimeout(this.timeout);
    this.timeout=setTimeout("slide.next()",this.delay);
  },

  pause:function(){
    if(this.paused=!this.paused)
      clearTimeout(this.timeout);
    else

      this.timeout=setTimeout("slide.next()",this.delay);
  }
};