	var Images = new Array(ImagesAmount);
	
	var Empty_img = new Image;
	Empty_img.src = EmptyPic;
	
	function DrowImg(i,imgnum) {
		if (Images[i] == null) {
			Images[i] = new Image;
			
			Images[i].src = ImagePath + (i+1) + '.jpg';
		}
		eval("document.scrollimg" + imgnum +".src 	=Images[" + i + "].src");
		eval("document.scrollimg" + imgnum +".border 	= '1'");
	}
	
	function DrowEmptyImg(imgnum) {
		eval("document.scrollimg" + imgnum +".src 		= Empty_img.src");
		eval("document.scrollimg" + imgnum +".border 	= 0");
	}

	function drowIcons(begin_num, action, width, height) {
		
		width	= (width == null)?'220':width;
		height	= (height == null)?'140':height;
		
		begin_num = begin_num > ImagesAmount?ImagesAmount-1:begin_num;
		
		if (begin_num <= 0) {
			begin_num = 0;
		}
		else {
			begin_num = Math.floor(begin_num/show_num)*show_num;
		}
		
		var show_right_but = true;
		
		if (begin_num >= ImagesAmount-show_num) {
			show_right_but = false;
		}
		begin = begin_num;
		
		if (action == 'new') {
			//var Win = window.open("", "", "width=500, height=500");
			var Win = this;
			
			for (i=0; i<=show_num-1; i+=2) {
				Images[i] = new Image;
				Images[i].src = ImagePath + (i+1) + '.jpg';
				
				Images[i+1] = new Image;
				Images[i+1].src = ImagePath + (i+2) + '.jpg';
				
				var img1 = '		<img name="scrollimg' + i + '" src="' + Empty_img.src 	+ '" width="' + width + '" height="' + height + '" border="0">\n';
				if (i < ImagesAmount) {
					img1 = '		<img name="scrollimg' + i 		+ '" src="' + Images[i].src 	+ '" width="' + width + '" height="' + height + '" border="1">\n';
				}
				
				var img2 = '		<img name="scrollimg' + i + '" src="' + Empty_img.src 	+ '" width="' + width + '" height="' + height + '" border="0">\n';
				if ( (i+1) < ImagesAmount) {
					img2 = '		<img name="scrollimg' + (i+1) 	+ '" src="' + Images[i+1].src 	+ '"  width="' + width + '" height="' + height + '" border="1">\n';
				}
				
				Win.document.write (
				'<tr>\n' +
				'	<td>\n' +
						img1 +
				'	</td>\n' +
				'	<td>\n' +
						img2 +
				'	</td>\n' +
				'</tr>\n'
				);
			}
			
			//drowIcons(begin_num);
		}
		else {
			var end_num = begin_num + (show_num-1);
			var imgnum = 0;
			
			for (i=begin_num; i<=end_num; i++) {
				DrowEmptyImg(imgnum);
				imgnum++;
			}
			imgnum = 0;
			
			for (i=begin_num; i<=end_num; i++) {
				if (i <= ImagesAmount-1) {
					DrowImg(i,imgnum);
				}
				imgnum++;
			}
		}
		
		var visible = 'style.visibility = "visible"';
		var hidden	= 'style.visibility = "hidden"';
		
		if (document.all || document.getElementById) {
			if (document.imgscroll) {
				if (begin_num == 0) {
					eval('document.imgscroll.lessbut.' + hidden);
				}
				else {
					eval('document.imgscroll.lessbut.' + visible);
				}
			}
			
			if (document.imgscroll) {
				if (show_right_but) {
					eval('document.imgscroll.morebut.' + visible);
				}
				else {
					eval('document.imgscroll.morebut.' + hidden);
				}
			}
		}
		
	}
	
	function more() {
		//begin++;
		begin += show_num;
		drowIcons(begin, "");
	}
	
	function less() {
		//begin--;
		begin -= show_num
		drowIcons(begin, "");
	}

