function LsHotelGallery(photos, id_image, id_left_arrow, id_right_arrow){
	var current, photos, id_image, id_left_arrow, id_right_arrow;
	
	this.photos = photos;
	this.id_image = id_image;
	this.id_left_arrow = id_left_arrow;
	this.id_right_arrow = id_right_arrow;
	this.current = 0;

	//methods
	this.go_left = go_left;
	this.go_right = go_right;
	this.left_make_selected = left_make_selected;
	this.left_make_deselected = left_make_deselected;
	this.right_make_selected = right_make_selected;
	this.right_make_deselected = right_make_deselected;
	
	function go_left(){		
		if(this.current == 0){
			left_pos = this.photos.length - 1;
		}
		else{			
			left_pos = this.current - 1;
		}
				
		image = GetObj(this.id_image);
		image.src = this.photos[left_pos][1];
		
		this.current = left_pos;
	}
	
	function go_right(){
		if(this.current == (this.photos.length - 1)){
			right_pos = 0;
		}
		else{
			right_pos = this.current + 1;
		}
		
		image = GetObj(this.id_image);
		image.src = this.photos[right_pos][1];
		
		this.current = right_pos;
	}
	
	function left_make_selected(){
		left_arrow = GetObj(id_left_arrow);
		
		img = left_arrow.childNodes[0].childNodes[0];
		
		img.src= '/templates/www/mini-oteli/images/h_gallery_left_s.gif';
	}
	
	function left_make_deselected(){
		left_arrow = GetObj(id_left_arrow);
		
		img = left_arrow.childNodes[0].childNodes[0];
		
		img.src= '/templates/www/mini-oteli/images/h_gallery_left.gif';
	}
	
	function right_make_selected(){
		right_arrow = GetObj(id_right_arrow);
		
		img = right_arrow.childNodes[0].childNodes[0];
		
		img.src= '/templates/www/mini-oteli/images/h_gallery_right_s.gif';
	}
	
	function right_make_deselected(){
		right_arrow = GetObj(id_right_arrow);
		
		img = right_arrow.childNodes[0].childNodes[0];
		
		img.src= '/templates/www/mini-oteli/images/h_gallery_right.gif';
	}
}
