function classSlideMe(csm_bID) {
	this.bID = csm_bID;
	this.num_steps = 25; // 25 steps means 750 ms 
	this.start_top;// = $(bID).style.top; 
	this.start_left;// = $(bID).style.left;
	this.end_top; // when to stop 
	this.end_left; 
	this.now_top; // where we are now 
	this.now_left; 
	this.new_top; // where we want to move to
	this.new_left;
	
	this.rl_at_step = 0; // roll left
	this.rr_at_step = 0; // roll right
	this.rd_at_step = 0; // roll down
	this.ru_at_step = 0; // roll up

	this.position_status = 'closed'; // property specific for the flyout
	this.test = 'my test varg';
}
classSlideMe.prototype.init = function (){
	
	this.start_top = $om(this.bID).style.top.split(/px/)[0]; // get the value, split on px, and return the 0th value in the array - the number
	this.start_left = $om(this.bID).style.left.split(/px/)[0];
	this.now_top = this.start_top;
	this.now_left = this.start_left;
	
}
classSlideMe.prototype.rollIt = function (mytop, myleft) {
	
	if (mytop != '' ) {
		this.end_top = mytop;
		if ( this.start_top < this.end_top ) {
			this.roll_down;
		} else {
			this.roll_up;
		}
	}	
	if (myleft != '' ) {
		this.end_left = myleft;
		
		if ( this.start_left < this.end_left ) {
			this.roll_right();
		} else {
			this.roll_left();
		}
	}	
}
classSlideMe.prototype.roll_left = function () {
	var distance = this.start_left - this.end_left; // because we are heading left the end is less than the beginning
	// this calculation is used to ease at the end - it is supposed to look like what ever power is used - third power here. different powers will have different easing effects - combined with number of steps. 	
	// derive by taking the integral of a curve - thing is we have to do it in steps so it's more like
	// the approximation methods. each step leveling off the curve - to a straight line
	var step_sq = Math.pow( (this.num_steps-this.rl_at_step), 3) - Math.pow( (this.num_steps-this.rl_at_step-1), 3);
	//var step_sq = Math.exp( (num_steps-rl_at_step)) - Math.exp( (num_steps-rl_at_step-1));
	
	var slope = distance / ( Math.pow( this.num_steps, 3) );
	var move_dis = Math.round(slope * step_sq);
	this.new_left = this.now_left -move_dis ;
	
	$om(this.bID).style.left = this.new_left+'px';
	this.now_left = this.new_left;
	var obj = this;
	
	if ( (this.rl_at_step + 1) < this.num_steps ) {
		setTimeout( function(){ obj.roll_left(); }, 30, obj ); // set time out's parent is window. so 'this' refers to window.
		this.rl_at_step++;
	} else {
		$om(this.bID).style.left = this.end_left+'px';
		this.rl_at_step =0; // reset
		this.start_left = this.end_left; // new start is the ending position of the move
		this.now_left = this.start_left;
	}
}

classSlideMe.prototype.roll_right = function () {
	
	var distance = this.end_left - this.start_left; // because we are heading right the end is more than the beginning
	// this calculation is used to ease at the end - it is supposed to look like what ever power is used - third power here. different powers will have different easing effects - combined with number of steps. 	
	// derive by taking the integral of a curve - thing is we have to do it in steps so it's more like
	// the approximation methods. each step leveling off the curve - to a straight line
	var step_sq = Math.pow( (this.num_steps-this.rl_at_step), 3) - Math.pow( (this.num_steps-this.rl_at_step-1), 3);
	//var step_sq = Math.exp( (num_steps-rl_at_step)) - Math.exp( (num_steps-rl_at_step-1));
	
	var slope = distance / ( Math.pow( this.num_steps, 3) );
	var move_dis = Math.round(slope * step_sq);
	//alert(move_dis + ' ' + this.now_left)
	//return;
	this.new_left = parseInt(this.now_left) + parseInt(move_dis) ;
	
	$om(this.bID).style.left = this.new_left+'px';
	this.now_left = this.new_left;
	var obj = this;
	
	if ( (this.rl_at_step + 1) < this.num_steps ) {
		setTimeout( function(){ obj.roll_right(); }, 30, obj ); // set time out's parent is window. so 'this' refers to window.
		this.rl_at_step++;
	} else {
		$om(this.bID).style.left = this.end_left+'px';
		this.rl_at_step =0; // reset
		this.start_left = this.end_left;
		this.now_left = this.start_left;
	}
}



classSlideMe.prototype.get_start_top = function () {
	return this.start_top;
}
classSlideMe.prototype.get_start_left = function () {
	return this.start_left;
}
classSlideMe.prototype.set_start_top = function (pos) {
	$om(this.bID).style.top = pos+'px';
	this.now_top = pos;
}
classSlideMe.prototype.set_start_left = function (pos) {
	$om(this.bID).style.left = pos+'px';
	this.now_left=pos;
}
