	//	функция для отображения закладок - id = номер отображаемой закладки, maxid - кол-во закладок, header_name - первая часть id закладки, td_name - первая часть id отображаемого элемента
	function ShowFlash(id,maxid,header_name,td_name,change){
		for (i=1; i<=maxid; i++) {
			our_div = document.getElementById(td_name+'_'+i).style;
			our_td = document.getElementById(header_name+'_'+i).style;
			if (i!=id) {
				our_div.visibility='hidden'; our_div.display='none';
				if (change) our_td.backgroundColor='#24c6f4';
			} else {
				our_div.visibility='visible'; our_div.display='block';
				if (change) our_td.backgroundColor='#137797';
			}
		}
	}

	function FixBug(id_slide){
		our_slider ='slide_'+id_slide;
		document.getElementById('slide_container').style.height=document.getElementById(our_slider).offsetHeight;
	// в скрипте выставляем высоту дива slide_container равной высоте таблицы внутри него
	// чтобы работало, раскоментировать первые две строчки
	}



	var step = 10;

	function MoveSlide(show_num){
		FixBug(show_num);
		var container = document.getElementById('slide_container');
//		var slides = container.getElementsByTagName('DIV');
		var slides = [
				document.getElementById('slide_0'),
				document.getElementById('slide_1'),
				document.getElementById('slide_2'),
				document.getElementById('slide_3')
				];
		
		var to_y = -100 * show_num;
		var cur_y = parseInt(slides[0].style.top);
		var cur_step = 0;
		if(to_y < cur_y) cur_step = -1 * step;
		else if(to_y > cur_y) cur_step = step;
		
		if(cur_step != 0){
		
			for(var i = 0; i < slides.length; i++  ){
			
				slides[i].style.top = (parseInt(slides[i].style.top)+cur_step)+'%';
			}
			setTimeout('MoveSlide('+show_num+')', 3);
		}
		setTimeout("document.location = '#'", 300);
		
		setTimeout('VisibleFlash('+show_num+')',1000);
	}

