//
//mjGallery = new Object();
//
function CooCooGallery (DOMimage) {
	//this.DOMimage = document.getElementById(DOMimage);
	//alert(this.DOMimage);
	//this.DOMimage = null;
	//
	this.imagePath = "";
	//
	this.imageArray = new Array;
	//
	this.currentImage = 0;
	//
	//this.DOMimage.onclick = this.setImage();
}
CooCooGallery.prototype.setImage = function(direction){
	//
	if (direction == "next"){
		this.currentImage++;
	} else if (direction == "prev"){
		this.currentImage--;
	} else {
		this.currentImage = direction;
	}
	//
	if(this.currentImage >= this.imageArray.length){
		this.currentImage = 0;
	} else if(this.currentImage < 0){
		this.currentImage = this.imageArray.length-1;
	}
	//alert(this.currentImage);
	this.DOMimage.src = this.imagePath + this.imageArray[this.currentImage]
};
function CooCooImage (DOMimage, image_path, images_array) {
	this.DOMimage = document.getElementById(DOMimage);
	this.imagePath = image_path;
	this.imageArray = images_array;
	this.setImage(0);
	//alert(this.DOMimage);
	//alert(this.DOMimage);
	//
	//alert(this.imagePath)
	//
	//this.DOMimage.onclick = this.setImage();
	/*
	function(){
		//this.setImage("next");
		alert(this.imagePath)
	}
	*/
}
CooCooImage.prototype = new CooCooGallery;
