 
//////////////////////////////////////////////////////
//  SliderClass
//////////////////////////////////////////////////////
function sliderClass(){
  this.ele = "";
  this.curLoc = 0;
  this.newLoc = 0;
  this.speed = 9;
  this.atEndOfMove = undefined;
}

  
  sliderClass.prototype.timeTick=function(){
    var moved = false;
  
    if (this.newLoc != this.curLoc){
      if (this.newLoc > this.curLoc){
        if ((this.newLoc - this.curLoc) > this.speed){
          this.curLoc += this.speed;
	    }else{
          this.curLoc +=  (this.newLoc - this.curLoc);
	    }
      }else{
	    if ((this.curLoc- this.newLoc) > this.speed){
          this.curLoc -= this.speed;
        }else{
          this.curLoc -=  ( this.curLoc - this.newLoc);
        }
      }	
	
	   this.ele.style.left = "" + this.curLoc  + "px";
       moved = true;
    }else{
		if(this.atEndOfMove != undefined){
			eval(this.atEndOfMove);
			this.atEndOfMove = undefined;
			moved = this.timeTick()
		}
	}
    return moved;
  };
  
  // Set the zorder of the Slider   
  sliderClass.prototype.setZ=function(zlevel){
    this.ele.style.zIndex= zlevel;
  };

//////////////////////////////////////////////////////

