 var gallery = {

	obj_img:	false,
	arr_photos:	new Array(),

	url_path:	false,

	cur:		0,

	init:		function (obj, url_path, arr_photos) {
				this.obj_img  = DOM.obj(obj);
				this.url_path = url_path;

				for (q=0; q<arr_photos.length; q++) {
					this.preload(arr_photos[q]);
					this.arr_photos[q] = arr_photos[q];
				}

				this.set();
			},

	next:		function () {
				this.cur ++;
				if (this.cur > this.arr_photos.length - 1) this.cur = 0;

				this.set();
			},

	prev:		function () {
				this.cur --;
				if (this.cur < 0) this.cur = this.arr_photos.length - 1;

				this.set();
			},

	set:		function () {
				this.obj_img.src = this.url_path + '/' + this.arr_photos[this.cur];
			},

	preload:	function (img) {
				i = new Image();
				i.src = this.url_path + '/' + img;
			}

 }