   var  imageMover = {
	init: function(id){
		var node = document.getElementById(id);
		var image = node.getElementsByTagName('img')[0];
		this.image = image;
		this.width = node.offsetWidth;
		this.node = node;
		if(image.naturalWidth) {
			this.imageWidth = image.naturalWidth 
		} else { 
			this.imageWidth = image.offsetWidth 
		}
		this.imageClone = image.cloneNode(true)
		node.appendChild(this.imageClone);
		this.offset = 0
		this.offset2 = this.imageWidth
		this.pixels = 1
		this.time = 40
		this.run()
	},
	setSpeed: function(pixels,time){
		this.pixels = pixels
		this.time = time
	},
	run: function(){
		var self = this;
		window.setInterval(function(){ self.update(self); }, this.time);
	},
	update: function(self){
		var images = self.node.getElementsByTagName('img');
		if(self.offset2 == 0){
			self.node.appendChild(self.imageClone);
			self.imageClone = images[0].cloneNode(true);
			self.node.removeChild(images[0]);
			self.offset = 0
			self.offset2 = self.imageWidth
		}
		if(images.length < 2){
			self.node.appendChild(self.imageClone);
			self.imageClone = self.image.cloneNode(true);
		}
		self.offset -= self.pixels;
		self.offset2 -= self.pixels;
		images[0].style.left = self.offset + 'px'
		images[1].style.left = self.offset2 + 'px'

	}
   }

