// JavaScript Document
	MAX_PICTERS=18  <!--max picters to show  in gallery -->
	MAX_IMG_VIEW=6 <!--max picters to show in one row-->
	<!--don't  touch the code bellow to correct work of the gallery-->
	MIN_PICTERS=1 
	count=1	
	function gallery_load(){
		if (MAX_IMG_VIEW>MAX_PICTERS){MAX_IMG_VIEW=MAX_PICTERS}		
		for (i=1;i<=MAX_IMG_VIEW;i++){
			document.getElementById('gallery').innerHTML+='<img src="images/gallery_img_'+i+'.jpg"  alt="" id="main_pic'+i+'" />';
		}
	}								
	function gallery(){	
		if (MAX_IMG_VIEW>MAX_PICTERS){MAX_IMG_VIEW=MAX_PICTERS}	
		document.getElementById('gallery').innerHTML='';
		for (i=count;i<(count+MAX_IMG_VIEW);i++){
			number_of_img=i;
			if (number_of_img>MAX_PICTERS){number_of_img=(i-MAX_PICTERS)}	
			document.getElementById('gallery').innerHTML+='<img src="images/gallery_img_'+number_of_img+'.jpg"  alt="" id="main_pic'+number_of_img+'" />';						
		}			
		
	}
	
	function left(){						
		count--;
		if (count<(MIN_PICTERS)){count=MAX_PICTERS}					
		gallery();												
	}
	function right(){	
		count++;
		if (count>MAX_PICTERS){count=MIN_PICTERS}	
		gallery();	
	}
