function ImageGallery (galleryId, imgsCnt) {
  this.id = galleryId;
  this.gSize = imgsCnt;
  this.step = 0;
  this.moveForward =  function(){
	  if((this.gSize - 5) <= this.step){
	    return;
	  }  
	  this.step++;
	  document.getElementById(this.id+'_'+this.step).style.display = "none";
	  document.getElementById(this.id+'_'+(this.step+5)).style.display = "block";
  };
  this.moveBack = function(){
	  if(this.step == 0){
	     return;
	  }  
	  document.getElementById(this.id+'_'+this.step).style.display = "block";
	  document.getElementById(this.id+'_'+(this.step+5)).style.display = "none";
	  this.step--;
  };
}