function StraightPath(fromX, fromY, toX, toY, n) {
	// All path objects must have these 5 methods
	this.x  = fromX;	// Retrieves the current x value
	this.y  = fromY;
	this.step = int_step;			// Move to next step
									// Returns true if the step was succesfull
									// Returns false when the path has been done
	this.reset = int_reset;
	// The rest may vary from different path objects

	this.startX = fromX;
	this.startY = fromY;
	this.endX = toX;
	this.endY = toY;

// Initiate steps
 	this.steps = n;
 	this.totalSteps = n;
 	if (this.totalSteps < 1) {	// No Amimation!
 		this.x = this.endX;
 		this.y = this.endY;
 		this.deltaX = 0;	// NN work around
 		this.deltaY = 0;
 	}
	else {
	 	this.deltaX = (this.endX - this.startX) / this.totalSteps;
		this.deltaY = (this.endY - this.startY) / this.totalSteps;
	}

	function int_step() {
		if (this.steps >= 0) {
			this.steps--;
			this.x += this.deltaX;
			this.y += this.deltaY;
		}
		return (this.steps >= 0 );
	}
	
	function int_reset() {
		if (this.totalSteps < 1) {
			this.steps = 0;
			this.x = this.endX;
			this.y = this.endY;
		}
		else {
			this.steps = this.totalSteps;
			this.x = this.startX;
			this.y = this.startY;
		}
	}
}

StraightPath.prototype = new Path;