function SlidingImage(id) {
	this.nodeDiv1 = document.getElementById(id + "1");
	this.nodeDiv2 = document.getElementById(id + "2");
	this.nodeImg = document.getElementById(id + "Img");
	this.picture = new Image();

	this.stepPerSecond = 24; /* per second */
	this.delay = 1000 / this.stepPerSecond;
	this.pixel = 10;
	this.isImageLoaded = false;

	/* methods */
	this.setPixel = function(pixel) {
		this.pixel = pixel;
	}

	this.setDelay = function(delay) {
		this.delay = delay;
	}

	this.setStepPerSecond = function(stepPerSecond) {
		this.stepPerSecond = stepPerSecond;
		this.delay = 1000 / this.stepPerSecond;
	}

	this.run = function() {
		var self = this;

		if (this.nodeImg.complete === true) {
			var slideX = parseInt(this.nodeDiv1.style.left);
			slideX += this.pixel;
			slideX = slideX % this.nodeImg.width;
			this.nodeDiv1.style.left = slideX + "px";
			this.nodeDiv2.style.left = (slideX + (this.pixel < 0 ? this.nodeImg.width
					: -this.nodeImg.width))
					+ "px";
		}

		window.setTimeout( function() {
			self.run();
		}, this.delay);
	}
}