<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by alex (mmlab) -->
<rmml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="L:\collaborative-nir\program\Cscl3DWS\rmml\RMML.xsd">
	<include src="window.xml" />
	<composition _name="CInstruction" _class="CBaseWindow">
		<composition  _name="imFrame">
			<script event="onPress" >
				fireEvent("parent.btClose.onPress");
			</script>
		</composition>
		<script>
			this.useOnlyClientArea = true;
		</script>
		<styles _name="stlInstruction" fontSize="14"  fontFamily="MS Sans Serif"  textAlign="justify" color="#000000"/>
		<styles _name="stlInstructionV" fontSize="30"  fontFamily="MS Sans Serif"  textAlign="justify" color="#000000"/>
		<text _name="oText"  _x="5" _y="30" _width="510"  style="parent.stlInstruction" _visible="true" ></text>
		<script event="onMoved">
			if (this.maskIm != undefined)
				this.oText.setMask(this.maskIm);
		</script>
		<script>
			this.setTitle("Инструкция");
			this.bFirstTime=true;

			function Initialize(sText)
			{<![CDATA[
				if( sText == undefined || sText == null)	return;

				resize(520, 320);
				centerScreen();
				oText.height = 0;
				oText.value = sText;
				if (scene.moduleV != undefined && scene.moduleV == true)
				{
					this.oText.style = this.stlInstructionV;
					if (this.scroller == undefined)
					{
						this.scroller = new Composition();
						this.scroller.name = "scroller";
						scroller._class = "CScrollerVertical";
						scroller.parent = this;
					}
					scroller.depth = -100;
					this.scroller.slider = 2;
					this.scroller.sheight = 30;
					this.scroller.initialize(this, 318, this.oText.getMediaSize().height, 5);
					this.scroller.resizeScroller(318);
					this.scroller.moveScroller(506, 24);
					this.scroller.reconstructScroller();
					var im = new Image();
					im.parent = this;
					im.name =  "maskIm";
					im.hide();
					im.y = 30;
					im.height = this.imFrame.height - 15;
					im.width = this.imFrame.width + 20;
					this.oText.setMask(this.maskIm);
					this.oTextStartPos = this.oText.y;
					this.scrollTo = function(pos)
					{
						this.oText.y = this.oTextStartPos  - pos;
					}
				}
			}]]>

			function resize(w, h)
			{
				this.oText._width = w - 20;
				CBaseWindow_resize(w, h);
			}

			function showDialog()
			{
				scene.CreateSEngineIfNecessary();
				if( this.bFirstTime)
				{
					seqInstruction.rewindAndPlay();
					this.bFirstTime = false;
				}
				CBaseWindow_showDialog();
			}

			function close()
			{
				seqInstruction.stop();
				CBaseWindow_close();
			}
		</script>
<!--		<script event="onPress">
			fireEvent("btClose.onPress");
		</script>-->
		<sequencer _name="seqInstruction" >
			<script >
				scene.sengine.scplay(40);
			</script>
			<script >
				scene.sengine.scplay(41);
			</script>
			<script >
				22000;
			</script>
			<script >
				scene.sengine.scplay(42);
			</script>
			<script >
				22000;
			</script>
			<script >
				seqInstruction.currentFrame = 1;
			</script>
		</sequencer>
	</composition>
</rmml>
