//about-main 230px
//bgbnr 473px

// глобальные переменные
top1=223;
top2=473;
top3=523;
top4=773;
h1=50;
h2=350;
time=80; //msCount = 400;

	flashIsOpening = function(msCount) {
		if (h1<=350)
		{
			document.getElementById( "main_flash" ).style.height = h1 + "px";
			document.getElementById( "about-main" ).style.top = top1 + "px";
			document.getElementById( "bgbnr" ).style.top = top2 + "px";
			h1+=60;
			top1+=60;
			top2+=60;
			setTimeout("flashIsOpening()",time);
		}
		else {
			h1=50;
			top1=223;
			top2=473;
			document.getElementById( "animate" ).style.display = "none";
			document.getElementById( "animate1" ).style.display = "none";
			document.getElementById( "animate2" ).style.display = "none";
			document.getElementById( "animate3" ).style.display = "none";
			document.getElementById( "lepestki" ).style.display = "none";
			ShowSide(0);
			}
	}

	flashIsClosing = function(msCount) {
		if (h2>=50)
		{
			document.getElementById( "main_flash" ).style.height = h2 + "px";
			document.getElementById( "about-main" ).style.top = top3 + "px";
			document.getElementById( "bgbnr" ).style.top = top4 + "px";
			h2-=60;
			top3-=60;
			top4-=60;
			setTimeout("flashIsClosing()",time);
		}
		else {
			h2 = 350;
			top3=523;
			top4=773;
			document.getElementById( "animate" ).style.display = "block";
			document.getElementById( "animate1" ).style.display = "block";
			document.getElementById( "animate2" ).style.display = "block";
			document.getElementById( "animate3" ).style.display = "block";
			document.getElementById( "lepestki" ).style.display = "block";
			ShowSide(0);
			}
	}

	ShowSide = function(side_id) {
	document.getElementById('animate1').style.zIndex = "1000";
	document.getElementById('animate2').style.zIndex = "1000";
	document.getElementById('animate3').style.zIndex = "1000";
		if (side_id == 0) {
			for ( var i = 1; i < 4; i++ ) {
				document.getElementById('animate'+i).style.zIndex = "1000";
			}
		}
		else{
			document.getElementById('animate'+side_id).style.zIndex = "1101";
		}
	}

	sendFromJS = function(id) {
		if (id == 0) {
			for ( var j = 1; j < 4; j++ ) {
				document.getElementById('animate'+j).style.zIndex = "1000";
			}
		}
		else{
			document.getElementById('animate'+id).style.zIndex = "1101";
		}
		var movie = (navigator.appName.indexOf("Microsoft")!=-1 ? window : document)["slide_flash"];
		movie.highlightItem(id);
	}
	
	chooseItem = function(id) {
		if (id == 0) {
			for ( var k = 1; k < 4; k++ ) {
				document.getElementById('animate'+j).style.zIndex = "1000";
			}
		}
		else{
			document.getElementById('animate'+id).style.zIndex = "1101";
		}
		var movie = (navigator.appName.indexOf("Microsoft")!=-1 ? window : document)["slide_flash"];
		movie.chooseItem(id);
	}