 
//////////////////////////////////////////////////////
//  SliderClass
//////////////////////////////////////////////////////
function sliderClass(){
  	this.ele =  undefined;
	this.orgLoc = new locationClass;
	this.curLoc = new locationClass;
	this.newLoc = new locationClass;
	this.steps = 0;
	this.curStep = 0;
	this.atEndOfMove = undefined;
}

	sliderClass.prototype.elementID=function(eleName){
		this.ele = document.getElementById(eleName);
  	}
	
	sliderClass.prototype.init=function(eleName){
		this.curStep = 0;
		this.orgLoc.X = this.curLoc.X
		this.orgLoc.Y = this.curLoc.Y
  	}
	
	sliderClass.prototype.findLoc=function(start, finish){
		return (Math.round((((this.curStep / this.steps) * (finish - start))) + start));
	}
	
	
	sliderClass.prototype.timeTick=function(){
    var moved = false;
  
  	if (this.curStep < this.steps){
		this.curStep++;
		this.curLoc.X = this.findLoc(this.orgLoc.X, this.newLoc.X)
		this.curLoc.Y = this.findLoc(this.orgLoc.Y, this.newLoc.Y)
		
	   	this.ele.style.left = "" + this.curLoc.X  + "px";
	   	this.ele.style.top = "" + this.curLoc.Y  + "px";
       moved = true;
    }else{
		if(this.atEndOfMove != undefined){
			eval(this.atEndOfMove);
			this.atEndOfMove = undefined;
		}
	}
    return moved;
  };
  
  // Set the zorder of the Slider   
  sliderClass.prototype.setZ=function(zlevel){
    this.ele.style.zIndex= zlevel;
  };

//////////////////////////////////////////////////////
