var gallery = {
	pos: 0,
	w:0,
	cnt:0,
	cont:'',	

	init: function() {
		var container = document.getElementById('container')
		var els = container.getElementsByTagName('IMG')
		var w = 0;
		var cnt = els.length;
		this.cnt = cnt;
		container.style.width = (cnt*143)+1;
		this.cont = container;
		this.w = w;
	},
	
	next: function() {
		if ((this.pos*-1) < (this.cnt-4)) {
			this.pos--
			this.cont.style.left = (this.pos * 143)
		}
	},
	
	prev: function() {
		if ((this.pos) < 0) {
			this.pos++
			this.cont.style.left = (this.pos * 143)
		}
	}
	
}

