<?xml version="1.0" encoding="WIN-1251"?>
<rmml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="R:\collaborative-nir\program\Cscl3DWS\rmml\RMML.xsd">
	<!--  <include src="buttons.xml"/> -->
	<include src="rmcomscr:dragcomp.xml"/>
	<include src="rmcomscr:videowall.xml"/>
	<include src="rmcomscr:StrParser.xml"/>
	<include src="rmcomscr:resimage.xml"/>
	<include src="rmcomscr:frames.xml"/>
	<include src="ramka.xml"/>
	<include src="sceneBaseScorm.xml"/>
<!-- 	<define name="VIDEOPATH" value="':mmlab.chemcommon.resources.video:\\'"/> -->
	<!-- <define name="VIDEOPATH" value="':mmlab.chemcommon.info:resources\\video\\'" />  -->
	<styles name="Title" fontSize="18" fontFamily="Arial" color="#000000"/>
	<text name="cCadr" style="Title" x="20" y="4" depth="-10"/>
	<styles name="defTextStyleWord" fontSize="14" fontFamily="Verdana" color="#BA2F1A"/>
	<styles name="LepRomTitleStyle" fontSize="25" fontFamily="Times New Roman" color="#A23500"/>
	<styles name="LepTextStyleWord" fontSize="20" fontFamily="Verdana" color="#004387"/>
	<styles name="defTextStyle" fontSize="14" fontFamily="Verdana" color="#000000"/>
	<styles name="ruleTextStyle" fontSize="14" fontFamily="Verdana" color="#000000"/>
	<styles name="hintTextStyle" fontSize="14" fontFamily="Arial" fontStyle="italic" color="#000000"/>
	<styles name="LepRomTextStyle" fontSize="14" fontFamily="Verdana" color="#000000"/>
	<styles name="ChemistName" fontSize="14" fontFamily="Verdana" fontWeight="bold"  color="#975525"/>
	<!-- color = "#0069A5"/> -->
	<styles name="MainTextStyle" fontSize="16" fontWeight="normal" fontFamily="Arial" color="#000000"/>
	<styles name="LightTextStyle" fontSize="20" fontFamily="Arial" color="#ff9900"/>
	<!-- color = "#0069A5"/> -->
	<styles name="ItalicTextStyle" fontSize="14" fontFamily="Verdana" fontStyle="italic" color="#000000"/>
	<!-- color = "#0069A5"/> -->
	<composition _name="CHint" x="160" y="550" depth="-110">
		<image name="icon" src="../resources/icon.png" _x="0" _y="0"/>
		<text name="itext" style="hintTextStyle" x="35" y="10" width="750"/>
	</composition>
	<composition _name="CDef" depth="-99" visible="false">
		<!-- 	<text name="defText" style="defTextStyle" width="550" height="55" ></text> -->
		<audio _name="sText"/>
		<image _name="imLUC" src="../resources/text/luc.png" _x="0" _y="0"/>
		<image _name="imLDC" src="../resources/text/ldc.png" _x="0"/>
		<image _name="imRUC" src="../resources/text/ruc.png" _y="0"/>
		<image _name="imLS" src="../resources/text/lside.png" _x="0" _y="0"/>
		<image _name="imRS" src="../resources/text/rside.png"/>
		<image _name="imRDC" src="../resources/text/rdc.png"/>
		<image _name="imUp" src="../resources/text/up.png" y="0"/>
		<image _name="imDn" src="../resources/text/dn.png" y="0"/>
	 	<image _name="imCenter" src="../resources/text/center.png"/>
		<script>
			imCenter.crop(1,1,34,34);
		</script>

		<button _name="hsSound" enabled="false" depth="-100" height="27" width="27">
			<script event="onRollOver"/>
			<script event="onPress">
				fireEvent("scene.allSoundsStop");
 				parent.pSound.rewindAndPlay();

 			</script>
		</button>
		<script><![CDATA[
      this.sTextBckFName = "../resources/text/TextBck.png";
	     this.szTextBck=new Object;
      this.szTextBck.w=259;
      this.szTextBck.h=142;

      this.szCorns = new Object;
      this.szCorns.w=36;
      this.szCorns.h=35;

      this.szTextMargs_h=19;
      this.szTextMargs_w=27;

 	function ShowText(img,x,y)
 	{
 			  this.pText=img;
                 //_x=Player.window.clientWidth-25-szTextMargs_w*2-pText._width;

                 imLUC.x=x;
                 imLUC.y=y;
 			  imUp.x=x+imLUC.width;
 			  imUp.y=y;
 			  imUp.width=pText._width+szTextMargs_w*2-szCorns.w*2;
                 imRUC.x=szTextMargs_w*2-szCorns.w+pText.width+imLUC.x;
                 //imRUC.x=imLUC.x+imUp.width;
                 imRUC.y=y;
 			  imLDC.y=szTextMargs_h*2-szCorns.h+pText._height+imLUC.y;
 			  imLDC.x=x;
 			  imLS.y=szCorns.h+y;
                 imLS.width=szCorns.w;
                 imLS.x=x;
                 imLS.height=pText._height+szTextMargs_h*2-szCorns.h*2;
                 imCenter.x=szCorns.w;
                 imCenter.y=35;
                 imCenter.width=pText._width+szTextMargs_w*2-szCorns.w*2;
                 imCenter.height=pText._height+szTextMargs_h*2-imUp.height-imDn.height;
                 imRS.x=szTextMargs_w*2-szCorns.w+pText._width;
                 imRS.y=szCorns.h+y;
                 imRS.width=szCorns.w;
                 imRS.height=pText._height+szTextMargs_h*2-szCorns.h*2;
 			  imDn.y=szTextMargs_h*2-szCorns.h+pText._height+y;
 			  imDn.x=imRDC._width;
 			  imDn.width=pText._width+szTextMargs_w*2-szCorns.w*2;
                 imRDC.x=szTextMargs_w*2-szCorns.w+pText._width;
                 imRDC.y=szTextMargs_h*2-szCorns.h+pText._height+y;
                 this.pText._x=_x+szTextMargs_w;
                 this.pText._y=_y+szTextMargs_h+y;
 			  this.pText._depth="-100";
 			  this.pText._visible="true";
 			  trace(this.pText.src);
 			  trace(this.pText.visible);
 			  trace('pText.depth='+this.pText.depth);
 			  trace('imCenter.depth='+imCenter.depth);
 	}

     function HideText()
     { this._visible = false;
       pText = null;
     }
 	function LinkWithSound(img,sound,x,y)
 	{
			pText=img;
 		 this.pSound = sound;
            str ="["+(szTextMargs_w*2-szCorns.w+pText._width+x)+","+(szTextMargs_h*2-szCorns.h+pText._height+y)+","+27+","+27+"]";
 		 hsSound.hitArea = str;
 		hsSound.enabled="true";
 	}
 	function EnableText()
 	{
 		hsSound.enabled = true;
 	}
 	function DisableText()
 	{
 		hsSound.enabled = false;
 	}
 ]]></script>
	</composition>
	<composition _name="CDef2" class="CDef" depth="-99" visible="false">
		<image _name="imLUC" src="rmgr:textDef/luc_a.png" _x="0" _y="0"/>
		<image _name="imLDC" src="rmgr:textDef/ldc_a.png" _x="0"/>
		<image _name="imRUC" src="rmgr:textDef/ruc_a.png" _y="0"/>
		<image _name="imRDC" src="rmgr:textDef/rdc_a.png"/>
		<image _name="imLS" src="rmgr:textDef/lside_a.png" _x="0" _y="0"/>
		<image _name="imRS" src="rmgr:textDef/rside_a.png"/>
		<image _name="imUp" src="rmgr:textDef/up_a.png" y="0"/>
		<image _name="imDn" src="rmgr:textDef/dn_a.png" y="0"/>
	</composition>
	<composition name="CRule" class="CDef">
		<image _name="imLUC" src="../resources/rule/luc_a.png" _x="0" _y="0"/>
		<image _name="imLDC" src="../resources/rule/ldc_a.png" _x="0"/>
		<image _name="imRUC" src="../resources/rule/ruc_a.png" _y="0"/>
		<image _name="imLS" src="../resources/rule/lside_a.png" _x="0" _y="0"/>
		<image _name="imRS" src="../resources/rule/rside_a.png"/>
		<image _name="imRDC" src="../resources/rule/rdc_a.png"/>
		<image _name="imUp" src="../resources/rule/up_a.png" y="0"/>
		<image _name="imDn" src="../resources/rule/dn_a.png" y="0"/>
		<image _name="imCenter" src="../resources/rule/center.png"/>
		<script>
      this.sTextBckFName = "../resources/rule/TextBck_a.png";
		</script>
	</composition>

	<text name="ctextInLep" style="LepRomTextStyle" x="105" width="600"/>
	<text name="ctextItalic" style="ItalicTextStyle" x="105" width="600"/>
	<text name="ctextItalic" style="ItalicTextStyle" x="105" width="600"/>
	<text name="ctitleInLep" style="LepTextStyleWord" x="20" y="40" width="500"/>
	<composition name="CBaseBtn" depth="-100">
		<image name="imNormal" visible="true"/>
		<image name="imOver" visible="false"/>
		<image name="imDown" visible="false"/>
		<script event="onRollOver">
		this.imNormal.hide();
		this.imOver.show();
	</script>
		<script event="onRollOut">
		this.imOver.hide();
		this.imNormal.show();
		this.imDown.hide();
	</script>
		<script event="onPress">
		this.imOver.hide();
		this.imDown.show();
	</script>
		<script event="onRelease">
		this.imNormal.show();
		this.imDown.hide();
	</script>
	</composition>
	<composition name="CSmallPlayBtn" class="CBaseBtn">
		<image name="imBckgr" src="../resources/play_btns/little_play_normal_border.jpg" x="-1" y="-1" depth="1"/>
		<image name="imNormal" src="../resources/play_btns/little_play_normal.jpg"/>
		<image name="imOver" src="../resources/play_btns/little_play_over.jpg"/>
		<image name="imDown" src="../resources/play_btns/little_play_down.jpg"/>

		<script>
		this.movie = null;
		function init(movie, sound)
		{
			this.movie = movie;
			this.sound = sound;
		}
	</script>
		<script event="onPress">
		//	fireEvent("scene.allSoundsStop");
 			if ( scene.seq_romashka_play!= undefined){
					scene.seq_romashka_play.stop();
			}
 			if ( scene.seq_scheme_play!= undefined){
					scene.seq_scheme_play.stop();
			}
		</script>

	</composition>
	<composition name="cMicroPlay" class="CSmallPlayBtn">
		<script>
			this.bMicroShown=false;
		</script>
		<script event="onPress">
		//	fireEvent("scene.allSoundsStop");
 			if (scene.microForm != undefined){
					scene.microForm.show();
					//scene.microForm.modal=true;
					scene.microForm.seq_check.rewindAndPlay();
					scene.microForm.btStop.show();
					scene.microForm.btPlay.hide();
				//}
			}
		</script>
	</composition>
	<composition _name="CMicroForm" class="CDraggableComposition" depth="-120" userEvents="evPlayed, evClosed">
		<script>
			this.aMicros = new Array();
		</script>
		<image _name="luconer" src="../resources/micro/top.png"/>
		<image _name="uphmid" src="../resources/micro/top.png"/>
		<image _name="dnhmid" src="../resources/micro/microwin.png"/>
		<image _name="ruconer" src="../resources/micro/top.png"/>
		<image _name="lvmid" src="../resources/micro/microwin.png"/>
		<image _name="rvmid" src="../resources/micro/microwin.png"/>
		<image _name="ldconer" src="../resources/micro/microwin.png"/>
		<image _name="rdconer" src="../resources/micro/microwin.png"/>
		<image _name="center" src="../resources/micro/microwin.png"/>
		<styles _name="stlActive" fontSize="12" fontFamily="Verdana" textAlign="center" color="#24557E"/>
		<text _name="txt" style="stlActive" _x="5" y="3"> Механизм реакции</text>
		<image _name="buttons" src="../resources/micro/buttons.png"/>
		<composition _name="btPlay" _class="CVideoButton" _x="34" visible="false">
			<image _name="img" src="eval(VIDEOPATH+'btPlay.png')"/>
		</composition>
		<composition _name="btStop" _class="CVideoButton" _x="34" _visible="true">
			<image _name="img" src="eval(VIDEOPATH+'btPause.png')"/>
		</composition>
		<composition _name="btRewind" _class="CVideoButton" _x="3">
			<image _name="img" src="eval(VIDEOPATH+'btBack.png')"/>
		</composition>
		<composition _name="btClose" _class="CVideoButton" depth="-220">
			<image _name="img" src="../resources/micro/btClose.png"/>
		</composition>
		<script event="btPlay.onClick">
			btPlay.hide();
			btStop.show();
			this.aMicros[scene.idMicro].call("play");
			seq_check.play();
		</script>
		<script event="btStop.onClick">
			btPlay.show();
			btStop.hide();
			this.aMicros[scene.idMicro].call("stop");
		</script>
		<script event="btRewind.onClick">
			this.aMicros[scene.idMicro].call("stop");
			this.aMicros[scene.idMicro].call("rewind");
		</script>
		<script event="btClose.onClick">
			Closing();
		</script>
		<sequencer name="seq_check" loop="true">
			<script>
		if (this.aMicros[scene.idMicro].call("isPlaying")){
		}else{
			btPlay.show();
			btStop.hide();
			this_seq.stop();

		}
	</script>
		</sequencer>
		<script>
			this.addHotspot(uphmid);
			this.addHotspot(txt);
</script>
		<script>
			function SetSize(px,py)
			{
// 				// cropping
 				luconer.crop(0,0,4,20);
 				uphmid.crop(3,0,10,20);
 				dnhmid.crop(1,0,3,1);
 				ruconer.crop(12,0,23,20);
 				lvmid.crop(0,1,1,3);
 				rvmid.crop(0,1,1,3);
 				ldconer.crop(0,3,2,2);
 				rdconer.crop(3,3,2,2);
 				center.crop(1,1,3,3);
// 				// arranging
 				uphmid.x = luconer._x + luconer._width;
 				uphmid.width = luconer.width+px-ruconer.width;
				ruconer.x = uphmid.width;
				lvmid.y = luconer.y + luconer.height;
				lvmid.height=py;
				ldconer.y = lvmid.y + lvmid.height;
				center.x = luconer.x+lvmid.width;
				center.y = luconer.y+uphmid.height;
				center.height = py+2;
 				center.width = px+2;
 				dnhmid.y = uphmid.y+uphmid.height+center.height;
 				dnhmid.x = lvmid.x+lvmid.width;
 				dnhmid.width = center.width;
				rvmid.x = lvmid.width+center.width;
				rvmid.y = ruconer.y+ruconer.height;
				rvmid.height = lvmid.height+1;
				rdconer.x = lvmid.x+lvmid.width+dnhmid.width-1;
				rdconer.y = ruconer.y+ruconer.height+rvmid.height;

				btClose.x = ruconer.x + 4;
				btClose.y = ruconer.y+3;
				btPlay.y = ldconer.y+4;
				btStop.y = ldconer.y+4;
				btRewind.y = ldconer.y+4;
				buttons.y = uphmid.y+uphmid.height+center.height;
			}
</script>
		<script><![CDATA[
		function AddMicro(path)
		{
				var vd = new Flash();
			if (resourceExists(path)){
				vd.src = ":"+path;
			}
			//	vd._visible = true;
				vd.windowed=false;
				vd._x = 2;
				vd._y = 21;
				vd._depth = 0;
				vd.enabled=false;
				aMicros[aMicros.length] = vd;
				vd.parent = this;
		}
		function Closing(k)
			{
				if (k != undefined){
					this.aMicros[k].hide();
					this.aMicros[k].call("rewind");
				}else{
					this.hide();
//					this.modal=false;
					this.aMicros[scene.idMicro].call("rewind");
				}
			}

		function OnMicroSelected(n)
			{
				if (scene.idMicro!=n){
					Closing(scene.idMicro);
				}
				scene.idMicro=n;
				for(i=0; i<this.aMicros.length; i++)
					if( i == n)
					{
						if (this.aMicros[i].call("isPlaying")){
						}else{
							scene.microForm.SetSize(this.aMicros[i].width,this.aMicros[i].height);
							this.aMicros[i]._visible = true;
							this.aMicros[i].call("play");
						}
					}
					else
					{
						this.aMicros[i]._visible = false;
					}
			}

	]]></script>
	</composition>
	<composition name="CActiveXPlayBtn" class="CSmallPlayBtn">
		<script event="onPress"><![CDATA[
		trace("this.movie"+this.movie);
		if (this.sound != undefined || this.sound == null)
			fireEvent("scene.allSoundsStop");
		if (this.movie != null)
		{
			this.movie.show();
			this.movie.call("Rewind");	trace('Rewind swf');
			this.movie.call("Play");
		}
		if (this.sound != undefined){
			if (this.sound != null)
				this.sound.rewindAndPlay();
		}
	]]></script>
	</composition>

	<composition name="CMoviePlayBtn" class="CSmallPlayBtn">
		<script event="onPress">

		if (this.movie != null)
		{
			this.movie.show();
			this.movie.rewindAndPlay();
		}
		if (this.sound != undefined){
			fireEvent("scene.allSoundsStop");
			this.sound.rewindAndPlay();
		}
	</script>
	</composition>
	<composition name="CVideoPlayButton" class="CBaseBtn" depth="-100" visible="true">
		<image name="imNormal" src="eval(VIDEOPATH+'show_video_button_normal.jpg')"/>
		<image name="imOver" src="eval(VIDEOPATH+'show_video_button_over.jpg')"/>
		<image name="imDown" src="eval(VIDEOPATH+'show_video_button_down.jpg')"/>
		<script event="onPress">
 			if (scene.videowall != undefined){
				scene.videowall.show();
				scene.videowall.modal=true;
				if (scene.shownLep==undefined){ //если видео не в ромашке
					num=0;
				}
				else{											//если видео в ромашке
					if (scene.videowall.aVideoNum!=undefined){//количество видео нестандартное
					// то scene.videowall.OnPreviewSelected(num) - вызывается из скрипта конкретнойсцены
 					}else{		// один ролик на лепестке ромашки

						num=eval(scene.shownLep-1);
						scene.videowall.OnPreviewSelected(num);
					}
				}
			}

		</script>
	</composition>
	<image name="onOverImage" visible="false"/>
	<button name="onOverButton">
		<script event="onRollOver"><![CDATA[
 		if (this.overImg != null){
 			this.overImg.show();
 		}else{
 			this.funcOnOver(true,this);
 		}
	]]></script>
		<script event="onRollOut">
 		if (this.overImg != null){
 			this.overImg.hide();
 		}else{
 			this.funcOnOver(false,this);
 		}
	</script>
		<script event="onPress">
		if (this.overImg != null){
			this.overImg.hide();
		}else{
			scene.borderComp.hide();
		}
	</script>
		<script><![CDATA[
	function funcOnOver(bflag,curButton){
		if (bflag){

				var myHitArea=ParseString(curButton.hitArea);
//trace('curButton.parent='+curButton.parent);
				if (curButton.parent.name=="Lep0"){
					scene.borderComp.borderCreate(myHitArea[0],myHitArea[1],myHitArea[2],myHitArea[3]);
				}else{
					if(scene.shownLep!=0){
						var minRomVar=scene['minRom'+scene.shownLep];
						scene.borderComp.borderCreate(minRomVar.x+myHitArea[0],minRomVar.y+myHitArea[1],myHitArea[2],myHitArea[3]);
					}
				}
		}
 		scene.borderComp.visible=bflag;
 	}


	function ParseString(SomeString)
			{
			trace('SomeString='+SomeString);
				_f = SomeString.split("[");
				ParseArray=_f[1].split(",");
				var tempVar = ParseArray[3];
				var _tempVar = tempVar.split("]");
				ParseArray[3] = _tempVar[0];

				// преобразование типов
				ParseArray[0]=parseInt(ParseArray[0]);
				ParseArray[1]=parseInt(ParseArray[1]);
				ParseArray[2]=parseInt(ParseArray[2]);
				ParseArray[3]=parseInt(ParseArray[3]);
				// преобразование типов

				return ParseArray;
	}

	]]></script>
	</button>
	<scene name="ScnTmplBasic" class="CSceneBaseScorm" final="false" userEvents="allSoundsStop">
		<script>
		trace('VIDEOPATH scene='+VIDEOPATH);
			scene.idMicro=0;
			scene.idVideo=0;
			scene.bVideo=false;	//для нестандартных ситуаций типа: два видео в лепестке, нулевой лепесток раскрывается
			scene.VideoNum=0;	//для нестандартных ситуаций типа: два видео в лепестке, нулевой лепесток раскрывается
	</script>
		<image src="../resources/fon.png" depth="100"/>
		<composition name="PlayBtnMain" class="CBaseBtn" x="20" y="550" visible="false" depth="-200">
			<image name="imNormal" src="../resources/play_btns/play_button_normal.jpg"/>
			<image name="imOver" src="../resources/play_btns/play_button_over.jpg"/>
			<image name="imDown" src="../resources/play_btns/play_button_down.jpg"/>
			<!-- Подсказка на кнопку-->
			<image name="butHint" src="../resources/play_btns/butHint.png" x="10" y="-50" visible="false"/>
			<script event="onRollOver">
				this.butHint.show();
			</script>
			<script event="onRollOut">
				this.butHint.hide();
			</script>
			<script event="onPress">
				this.butHint.hide();
			</script>
<!-- до сюда-->
		</composition>
		<audio name="titleSound" playing="false">
			<script event="onPlayed">
			if (scene.mainSound!=undefined){
//				scene.setTimeout('scene.mainSound.rewindAndPlay();',500);
				scene.mainSound.rewindAndPlay();
			}
			if (scene.Lep0!=undefined){
			trace('titleSound onPlayed Lep0');
				scene.Lep0.soundLep.rewindAndPlay();
				//scene.setTimeout('scene.Lep0.soundLep.play();',500);
			}
		</script>
		</audio>
		<!-- 	<composition _name="definition" class="CDef" x="50" y="200" ></composition>  -->
		<script><![CDATA[
 		function FirstShowText(img,sound,x,y,def)
 		{
			trace("&&DEFFFFFFF"+def);
			if (def == undefined)
			{
				def = scene.definition;
			}
			trace("!!DEFFFFFFF"+def);

 			if (img != null)
 			{
 				def.ShowText(img,x,y);
 				def._visible="true";
 				if (sound != null)
 				{
 					def.LinkWithSound(img,sound,x,y);
 				}
 			}
		}

	]]></script>
		<composition _name="videowall" _class="CVideoWall" x="349" y="65" _depth="-200" visible="false">
			<script>
				this.Minimize();
			</script>
		</composition>
		<composition _name="microForm" _class="CMicroForm" visible="false">
			<script/>
		</composition>
		<script>
		function startScene(){
			this.titleSound.play();
		}
	</script>
	</scene>
	<scene name="ScnTmplScheme" class="ScnTmplBasic" final="false">
		<composition name="PlayBtnMain" visible="true">
			<script event="onPress">
 			if (scene.seq_scheme_play != undefined)
 				scene.seq_scheme_play.rewindAndPlay();
		</script>
		</composition>
		<script>
		FirstShowText(scene.imgText,scene.sText,10,200);
	</script>
		<sequencer name="seq_scheme_play">
			<script>trace('seq_scheme_play 1');
			fireEvent("scene.allSoundsStop");
		</script>
		</sequencer>
	</scene>
	<composition name="imFreeYellowBckgr" class="CResizablePaper">
		<image _name="lt" src="../resources/rom/openLep.png">
			<script>this.crop(0,0,12,12);</script>
		</image>
		<image _name="ct" src="../resources/rom/openLep.png">
			<script>this.crop(12,0,1,12);</script>
		</image>
		<image _name="rt" src="../resources/rom/openLep.png">
			<script>this.crop(13,0,3,12);</script>
		</image>
		<image _name="lc" src="../resources/rom/openLep.png">
			<script>this.crop(0,12,12,1);</script>
		</image>
		<image _name="cc" src="../resources/rom/openLep.png">
			<script>this.crop(12,12,1,1);</script>
		</image>
		<image _name="rc" src="../resources/rom/openLep.png">
			<script>this.crop(13,12,3,1);</script>
		</image>
		<image _name="lb" src="../resources/rom/openLep.png">
			<script>this.crop(0,13,12,3);</script>
		</image>
		<image _name="cb" src="../resources/rom/openLep.png">
			<script>this.crop(12,13,1,3);</script>
		</image>
		<image _name="rb" src="../resources/rom/openLep.png">
			<script>this.crop(13,13,3,3);</script>
		</image>
		<script>
				this.resize(parent.imLep.width,parent.imLep.height);
			</script>
	</composition>
	<composition name="Lep" depth="-20" visible="false">
		<text name="titleInLep" depth="-25" class="ctitleInLep"/>
		<image name="imLep" visible="false"/>
		<composition name="imBckgr" class="CResizablePaper">
			<image _name="lt" src="../resources/rom/openLep.png">
				<script>this.crop(0,0,12,12);</script>
			</image>
			<image _name="ct" src="../resources/rom/openLep.png">
				<script>this.crop(12,0,1,12);</script>
			</image>
			<image _name="rt" src="../resources/rom/openLep.png">
				<script>this.crop(13,0,3,12);</script>
			</image>
			<image _name="lc" src="../resources/rom/openLep.png">
				<script>this.crop(0,12,12,1);</script>
			</image>
			<image _name="cc" src="../resources/rom/openLep.png">
				<script>this.crop(12,12,1,1);</script>
			</image>
			<image _name="rc" src="../resources/rom/openLep.png">
				<script>this.crop(13,12,3,1);</script>
			</image>
			<image _name="lb" src="../resources/rom/openLep.png">
				<script>this.crop(0,13,12,3);</script>
			</image>
			<image _name="cb" src="../resources/rom/openLep.png">
				<script>this.crop(12,13,1,3);</script>
			</image>
			<image _name="rb" src="../resources/rom/openLep.png">
				<script>this.crop(13,13,3,3);</script>
			</image>
			<script>
				trace(parent.imLep.width+"___"+parent.imLep.height);
				this.resize(parent.imLep.width,parent.imLep.height);
			</script>
		</composition>
		<text name="textInLep" depth="-25" class="ctextInLep"/>
		<audio name="soundtitleLep" playing="false">
			<script event="onPlayed">
				//parent.tmslid = parent.setTimeout('soundLep.rewindAndPlay();',1000);
				parent.soundLep.rewindAndPlay();
			</script>
		</audio>
		<script watch="visible">
			trace('watch=visible');
			if(typeof(tmslid) != 'undefined'){
				trace('clearTimeout '+tmslid);
				clearTimeout(tmslid);
			}
		</script>
		<audio name="soundLep" playing="false"/>
	</composition>
	<composition name="minLep" depth="-20" visible="false">
		<image name="miniPic"/>
		<script><![CDATA[
		this.lepButtonsArr = new Array();
		function lepButtonCreate(buttonCount){
			for( i=0; i<buttonCount; i++)
			{
				var but=new Button();
				but._class="onOverButton";
				but.name="but"+i;
				but.depth="-30";
				but.enabled="true";
				this.lepButtonsArr.push(but);
				but.ind1=i;
				but.parent=this;

				but.onPress = function(){
 					if(scene.seq_romashka_play.playing){
 						scene.butPress=true;
 					}
					parent.lepNext(this.ind1);
				}
			}
			return but;
		}
	]]></script>
	</composition>
	<composition name="MainRom" depth="-20">
		<image name="imMain"/>
		<text name="textMain" style="MainTextStyle"/>
		<audio name="soundLep"  playing="false">
			<script/>
		</audio>
		<!-- 	<animation name="anOver" src="../resources/rom/anOver.fln" visible="false" loop="true"/>
 -->
		<script><![CDATA[
		this.lepsArr = new Array();
		function lepsCreate(LepsCount){
			for( i=0; i<LepsCount; i++)
			{
				var ilep=new Button();
				ilep._class="onOverButton";
				ilep.name="butLep"+i;
				//ilep.hitArea="[0,0,0,0]";
				ilep.depth="-30";
				ilep.enabled="true";
				ilep.overImg = null;
				this.lepsArr.push(ilep);
				ilep.ind=i+1;
				ilep.parent=this;
				ilep.onPress = function(){
					parent.romHideLepShow(this.ind);
				}
			}

			return ilep;
		}
		function lepImReplaceByImage(index, img){
			this.lepsArr[index] = img;
			img.onPress = function(){
				parent.romHideLepShow(this.ind);
			}
		}
	]]></script>
	</composition>
	<scene name="ScnTmplRom" class="ScnTmplBasic" final="false">
		<composition name="cRomHint" class="CHint" x="5" y="30" visible="true">
				<text name="itext" src="../resources/rom/RomHint.htm"/>
		</composition>

		<composition name="borderComp" visible="false" depth="-100">
			<image name="anOverHorz1" src="../resources/rom/anOver.png"/>
			<image name="anOverHorz2" src="../resources/rom/anOver.png"/>
			<image name="anOverVert1" src="../resources/rom/anOver.png"/>
			<image name="anOverVert2" src="../resources/rom/anOver.png"/>
			<script>
			this.anOverHorz1.crop(0,0,4,2);
			this.anOverHorz2.crop(0,0,4,2);
			this.anOverVert1.crop(0,0,2,4);
			this.anOverVert2.crop(0,0,2,4);
			function borderCreate(x,y,w,h){

					this.anOverHorz1.x = x;
 					this.anOverHorz1.y = y;
 					this.anOverHorz1.width =w+2;

 		 			this.anOverVert1.x = x;
 		 			this.anOverVert1.y = y;
 					this.anOverVert1.height=h+2;

 					this.anOverHorz2.x = this.anOverHorz1.x+2;
 					this.anOverHorz2.y = this.anOverHorz1.y+this.anOverVert1.height-2;
 					this.anOverHorz2.width =w+1;

 		 			this.anOverVert2.x = this.anOverVert1.x+this.anOverHorz2.width;
 		 			this.anOverVert2.y = this.anOverVert1.y;
					this.anOverVert2.height=h+2;
				}
		</script>
		</composition>
		<composition name="PlayBtnMain" visible="true">
			<script event="onPress">

 			if (scene.seq_romashka_play != undefined){
				scene.butPress=false;
				for (var ii = 1; eval("scene.Lep"+ii) != undefined; ii++)
				{

					scene.lepestok_count = ii;
				}

				scene.seq_romashka_play.rewindAndPlay();
			}
		</script>
		</composition>
		<image name="imOpenLep" src="../resources/rom/openLep.png" depth="-10" visible="false"/>
		<script>
		scene.butPress=false;
		this.shownLep=0;	//раскрытый лепесток ромашки
		this.VideoLep=0;	//раскрытый лепесток ромашки c видео
	</script>
<sequencer name="seq_romashka_play">
			<script>
		fireEvent("scene.allSoundsStop");
	//	this.romHideLepShow(0);	// главный лепесток не читается, пожелание химиков
		this.i=1;
	//	"scene.Lep0.soundLep.onPlayed";
	</script>
	<script><![CDATA[
		if (scene.borderComp.visible){
			scene.borderComp.hide();
		}
		scene.lepNext(i);
		var a=eval("scene.Lep"+i+".soundLep");
		if (a.src != null){
			"a.onPlayed";
		}else{
			t = eval("scene.Lep"+i+".endTime");
			if(t != undefined)
				t;
			else
				10000;

		}
 	]]></script>
			<script><![CDATA[
		if (!scene.butPress){
			if (this.i<this.lepestok_count ){
			this.i++;
			this_seq.currentFrame=1;
			}
		}else{
			this_seq.stop();
		}
	]]></script>
			<script><![CDATA[
		if (scene.borderComp.visible){
			scene.borderComp.hide();
		}

		scene.lepNext(0);
		scene.Lep0.soundLep.stop();
	]]></script>
</sequencer>
<script><![CDATA[
function romHideLepShow(numRom){ // создает выбранный numRom лепесток
		/* Evgenei */
		Player.globals.scorm.incStep(numRom);
		Player.globals.scorm.updateResutlsValues();
		/* */
		shLep=eval('scene.Lep'+scene.shownLep); // показанный раскрытый лепесток
		shLep.hide();
scene.cRomHint.hide();
		fireEvent("scene.allSoundsStop");

		mRom=eval('scene.minRom'+scene.shownLep); //показанная мини-ромашка
		if ( typeof(mRom) != 'undefined'){
			mRom.hide();}
		if (scene.Lep0.visible){
			scene.Lep0.hide();
		//	scene.Lep0.soundLep.stop();
			scene.cRomHint.show();
		}
		scene.shownLep=numRom;
		if (scene.Lep0.visible){scene.Lep0.hide();}
		jLep=eval('scene.Lep'+numRom);
		jLep.show();
		if (jLep.name!= 'Lep0'){
			jLep.soundtitleLep.rewindAndPlay();
		}else{
			jLep.soundLep.rewindAndPlay();
		}
		if (numRom!=0){
			var miniRom = new Composition();
			miniRom._class = "cMinLep"+numRom;
			miniRom.name = "minRom"+numRom;
			miniRom.visible = "true";
			miniRom.parent=this;
			return miniRom;
		}else{
			return;
		}
	}

	function lepNext(nextLep){	//прячет видимый лепесток и мини-ромашку, показывает выбранный nextLep лепесток
		trace(">>>>>>>>>>>>>>>>>>>"+nextLep);
	var iLep=eval('scene.Lep'+scene.shownLep);
		if (iLep.visible){
			iLep.hide();
		}
		var iminLep=eval('scene.minRom'+scene.shownLep);
		if ( typeof(iminLep) != 'undefined')
		{
			iminLep.hide();
			iminLep.parent=null;
			if (iminLep.lepButtonsArr != undefined ){
				iminLep.lepButtonsArr=null;
			}
		}
 		var iLepNext=eval('scene.Lep'+nextLep);
 		iLepNext.show();
 		this.romHideLepShow(nextLep);
	}
	]]></script>
	</scene>
</rmml>
