<?xml version="1.0" encoding="UTF-8"?>
<!-- for xml compliance -->
<krpano version="1.0.8.14">
   <events onloadcomplete="plugin[combobox].selectitem(asup1);stopallsounds"/>
    <view fisheye="0" limitview="lookat" vlookatmin="-90" vlookatmax="90" fovmin="5" fovmax="170" fov="90" hlookat="0" vlookat="0"/>
    <autorotate horizon="0" tofov="90"/>
    <action name="looktohome">lookto(0,0,90);</action>
    <preview url="montajnikdata/montajnik13/preview.jpg"/>
    <image type="CUBE">
        <left url="images/montajnikjbi14_l.jpg"/>
        <front url="images/montajnikjbi14_f.jpg"/>
        <right url="images/montajnikjbi14_r.jpg"/>
        <back url="images/montajnikjbi14_b.jpg"/>
        <up url="images/montajnikjbi14_u.jpg"/>
        <down url="images/montajnikjbi14_d.jpg"/>
    </image>
	
	<plugin name="soundinterface" url="plugins/soundinterface.swf" rootpath="%CURRENTXML%" preload="true" />
	<plugin name="btn10" url="images/real_logo_trans_krpano.png" x="5" y="90" zorder="500" align="rightbottom" onclick="openurl(http://www.realgrad.ru,_blank);"    />
	<plugin name="btn11" url="images/real_logo_trans_krpano1.png" x="5" y="90" zorder="500" align="leftbottom" onclick="openurl(http://www.realgrad.ru/travel_announce.php,_blank);"    />
	
	<plugin name="btn2" url="perehod1.png" x="160" y="35" zorder="500" align="righttop" onclick="" />
    <plugin name="btn3" url="perehod2.png" x="5" y="35" zorder="500" align="righttop" onclick=""  />
	<plugin name="btn5" url="home.png" x="160" y="35" zorder="500" align="lefttop" onhover="showtext(Домой);" onclick="loadpano(montajnik13.xml, null, MERGE, BLEND(1));"   />
	<plugin name="btn4" url="profi.png" x="5" y="35" align="lefttop" />
	<plugin name="btn9" url="gramma.png" x="252" y="35" zorder="500" align="lefttop" onhover="showtext(Профессиограмма);" onclick="openurl(pdf/montajnik.pdf,_blank);"   />
	<plugin name="btn6" url="off.png" x="344" y="35" zorder="500" align="lefttop" onhover="showtext(Выключить звук);" onclick="togglepause();stopallsounds"    />
	<plugin name="btn7" url="on.png" x="298" y="35" zorder="500" align="lefttop" onhover="showtext(Включить звук);" onclick="plugin[combobox].selectitem(p4);playsound(forest, sound.mp3, 1);"   />
	
	<plugin name="btn" url="question.png" x="206" y="35" zorder="500" align="lefttop" onhover="showtext(Справка);" onover="action(fadein,img1);" onout="action(fadeout,img1);" />
	<plugin name="img1" url="info.png" zorder="1000" align="center" alpha="0" visible="false" z-order="1000" />
	
	<action name="hideSplash">
		action(fadeout, splash); 
		action(fadein, tutor);
	</action>
	
	
	<include url="actions_inc.xml"/>
	
	
	<hotspot name="videospot1" style="flyoutvideo"
			 url="plugins/videoplayer.swf" 
			 videourl="video/video.flv"
			 distorted="true"
			 ath="-10.2553" atv="0.0000"
			 edge="center"
			 scale="0.9"
			 rx="0"
			 ry="0"
			 rz="0"
			 loop="false"
			 pausedonstart="true"
			 onvideocomplete="seek(0); stop()"
			 directionalsound="true"
			 range="110"
			 tiledimagewidth = "8192"
			 tiledimageheight = "4096"
			 tilesize = "1024"
			 volume="0.1"
			 onhover="if(ispaused, showtext(click to play), showtext(click to pause));"
			 onclick="togglepause();stopallsounds"
			 onvideoready="do_time_bar(video,null,bottom,null,70%,6,0,20,false,10);"
  
			 zorder="2"
			 />
			 
			 
			 
			 <style name="flyoutvideo"
	       distorted="true"
	       backup_rx="0"
	       backup_ry="0"
	       backup_rz="0"
	       backup_scale="0"
	       backup_zorder="0"
	       flying="0.0"
	       flystate="0"
	       onhover="if(ispaused, showtext(Воспроизвести), showtext(Остановить));"
	       onclick="if(	flystate == 0,
				resume();flyout_by_name('videospot1');flyout_by_name('pod');set(autorotate.enabled,false); stopallsounds(); playsound2D(golos, sound.mp3, 1, 0, 1);set(plugin[btn7].alpha,0.3);set(plugin[btn6].alpha,0.3),
				flyback_by_name('videospot1'); stop(); flyback_by_name('pod'); set(autorotate.enabled,false); stopallsounds(); set(plugin[btn7].alpha,0.3);set(plugin[btn6].alpha,1);
			);"
	       />
			 
			 
			 <style name="hidden_flyoutimage"
 distorted="true"
 backup_rx="0"
 backup_ry="0"
 backup_rz="0"
 backup_scale="0"
 backup_zorder="0"
 flying="0.0"
 flystate="0"
 visible="false"
 alpha="0"
 onclick="if(flystate != 0, hidden_flyback_by_name(get(name)) );"
 />

 







<action name="play_hotsound">
	pausesound(forest);
	playsound(hotsound,%1);
</action>

<action name="stop_hotsound">
	stopsound(hotsound);
	resumesound(forest);
</action>


<action name="hidden_flyout_by_name">
 <!-- make all other hotspots flying back -->
 flyback_others();

 <!--
 for best control set 4 fly states:
 0 = normal
 1 = while flying out
 2 = out
 3 = while flying back
 -->

 <!-- save original position/rotation -->
 if(hotspot[%1].flystate == 0,
 set(hotspot[%1].visible, true);
 copy(hotspot[%1].backup_rx, hotspot[%1].rx);
 copy(hotspot[%1].backup_ry, hotspot[%1].ry);
 copy(hotspot[%1].backup_rz, hotspot[%1].rz);
 copy(hotspot[%1].backup_scale, hotspot[%1].scale);
 copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
 copy(hotspot[%1].backup_alpha, hotspot[%1].alpha);
 );

 <!-- set new state -->
 set(hotspot[%1].flystate,1);
 set(hotspot[%1].zorder,99);

 <!-- tween the rotations values to 0 for a flat screen view -->
 tween(hotspot[%1].alpha, 1);
 tween(hotspot[%1].rx, 0);
 tween(hotspot[%1].ry, 0);
 tween(hotspot[%1].rz, 0);
 tween(hotspot[%1].scale, 1.5, 0.5, default, play_hotsound(get(hotspot[%1].snd_url)););

 <!--
 tween 'flying' to 1.0,
 this makes the hotspot independent from the panorama rotation and scaling
 -->
 tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); );
 </action>

 <action name="hidden_flyback_by_name">
 stop_hotsound();
 if(hotspot[%1].flystate != 3,
 set(hotspot[%1].flystate,3);

 <!-- tween back to the stored backup values -->
 tween(hotspot[%1].rx, get(hotspot[%1].backup_rx) );
 tween(hotspot[%1].ry, get(hotspot[%1].backup_ry) );
 tween(hotspot[%1].rz, get(hotspot[%1].backup_rz) );
 tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) );
 tween(hotspot[%1].alpha, get(hotspot[%1].backup_alpha),1,default, set(hotspot[%1].visible, false));

 copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);

 <!-- tween 'flying' also back to 0.0 -->
 tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); );
 );
 </action>

 <action name="flyback_others">
 if(%1 != nextloop, set(i,0));

 if(hotspot[%i].style == flyoutimage,
 if(hotspot[%i].flystate != 0, flyback_by_name(get(hotspot[%i].name)); );
 );

 inc(i);
 if(i LT hotspot.count, flyback_others(nextloop); );
 </action>
 
 
 
 <style name="flyoutimage"
	       distorted="true"
	       backup_rx="0"
	       backup_ry="0"
	       backup_rz="0"
	       backup_scale="0"
	       backup_zorder="0"
	       flying="0.0"
	       flystate="0"
	       onclick="if(flystate == 0, flyout_by_name(get(name)), flyback_by_name(get(name)) );"
	       />
		   
		   
		  
		   

	
			 
			 
			 
			 
			 <hotspot name="pod" style="flyoutimage2"
	         url="ramka.png"
	         distorted="true"
	         ath="-10.2553" atv="0.0000"
	         scale="1.0"
	         rx="0" ry="0" rz="0"
	         backup_rx="0"
	         backup_ry="0"
	         backup_rz="0"
	         backup_scale="0"
	         backup_zorder="0"
	         flying="0.0"
	         
			 onout=""
			 onclick=""
			 zorder="1"
	         />
			 
			  
 
	
 <action name="flyout_by_name">
		<!-- make all other hotspots flying back -->
		flyback_others();

		<!--
			for best control set 4 fly states:
			0 = normal
			1 = while flying out
			2 = out
			3 = while flying back
		-->

		<!-- save original position/rotation -->
		if(hotspot[%1].flystate == 0,
		    copy(hotspot[%1].backup_rx,     hotspot[%1].rx);
		    copy(hotspot[%1].backup_ry,     hotspot[%1].ry);
		    copy(hotspot[%1].backup_rz,     hotspot[%1].rz);
		    copy(hotspot[%1].backup_scale,  hotspot[%1].scale);
		    copy(hotspot[%1].backup_zorder, hotspot[%1].zorder);
		  );

		<!-- set new state -->
		set(hotspot[%1].flystate,1);
		set(hotspot[%1].zorder,99);

		<!-- tween the rotations values to 0 for a flat screen view -->
		tween(hotspot[%1].rx, 0);
		tween(hotspot[%1].ry, 0);
		tween(hotspot[%1].rz, 0);
		tween(hotspot[%1].scale, 1.5);

		<!--
			tween 'flying' to 1.0,
			this makes the hotspot independent from the panorama rotation and scaling
		-->
		tween(hotspot[%1].flying, 1.0, 0.5, default, set(hotspot[%1].flystate,2); );
	</action>


	<action name="flyback_by_name">
		if(hotspot[%1].flystate != 3,
			set(hotspot[%1].flystate,3);

			<!-- tween back to the stored backup values -->
			tween(hotspot[%1].rx,    get(hotspot[%1].backup_rx)    );
			tween(hotspot[%1].ry,    get(hotspot[%1].backup_ry)    );
			tween(hotspot[%1].rz,    get(hotspot[%1].backup_rz)    );
			tween(hotspot[%1].scale, get(hotspot[%1].backup_scale) );

			copy(hotspot[%1].zorder, hotspot[%1].backup_zorder);

			<!-- tween 'flying' also back to 0.0 -->
			tween(hotspot[%1].flying, 0.0, 0.5, default, set(hotspot[%1].flystate,0); );
		  );
	</action>


	<action name="flyback_others">
		if(%1 != nextloop, set(i,0));
		
		if(hotspot[%i].style == flyoutimage,
			if(hotspot[%i].flystate != 0, flyback_by_name(get(hotspot[%i].name)); );
		  );
		  
		inc(i);
		if(i LT hotspot.count, flyback_others(nextloop); );
	</action>
	
	
	
	<plugin name="mapmask" url="pano2_mapmask.png" devices="flash" parent="map" enabled="false" onloaded="updatemask();" />
		
		
		
		

		<!-- place here scene local elements like plugins,hotspots, ... -->

		

	


	<!-- second scene/pano-->
	
		
		<plugin name="mapmask" url="pano1_mapmask.png" devices="flash" parent="map" enabled="false" onloaded="updatemask();" />
		
		
		
		<!-- place here scene local elements like plugins,hotspots, ... -->

		

	



	<!-- third scene/pano-->
	
		
		<plugin name="mapmask" url="pano3_mapmask.png" devices="flash" parent="map" enabled="false" onloaded="updatemask();" />
		
		
		
		

		<!-- place here scene local elements like plugins,hotspots, ... -->

		


	<!-- global settings -->
	


	<!-- global settings -->
	
	<plugin name="map" url="map.png" keep="true"  
	        align="righttop" x="5"  y="55" alpha="0.85" handcursor="false" 
	        scalechildren="true"
            width="150" 
            height="84"
            onover="action(openmap,map);"
            onout="action(closemap,map);"
            onclick="action(closemap,map);"
			zorder="2"
/>
			
			<plugin name="map1" url="map2.png" keep="true"  
        align="righttop" x="160"  y="55" alpha="0.85" handcursor="false" 
        scalechildren="true"
        width="150" 
        height="84"
        onover="action(openmap,map1);"
        onout="action(closemap,map1);"
        onclick="action(closemap,map1);"
		zorder="1"
/>
			
      


<plugin name="scene1" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="210"  y="177" zorder="2" onhover="showtext(Подготовка монтажной площадки);"         onclick="action(closemap,map);loadpano(montajnik0.xml, null, MERGE, BLEND(1));" />

<plugin name="scene2" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="510"  y="177" zorder="2" onhover="showtext(Доставка конструкции со склада);"         onclick="action(closemap,map);loadpano(montajnik1.xml, null, MERGE, BLEND(1));" />

<plugin name="scene3" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="810"  y="177" zorder="2" onhover="showtext(Уствновка конструкции);"         onclick="action(closemap,map);loadpano(montajnik2.xml, null, MERGE, BLEND(1));" />

<plugin name="scene4" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="360"  y="402" zorder="2" onhover="showtext(Обварка конструкции);"         onclick="action(closemap,map);loadpano(montajnik3.xml, null, MERGE, BLEND(1));" />

<plugin name="scene5" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="660"  y="402" zorder="2" onhover="showtext(Отделка швов и расцепка конструкции);"         onclick="action(closemap,map);loadpano(montajnik4.xml, null, MERGE, BLEND(1));" />

<plugin name="scene6" url="mappoint2.png" keep="true" parent="map1" align="lefttop" edge="center" x="210"  y="275" zorder="2" onhover="showtext(ООО «УКПФ «УПФИР»);"         onclick="openurl(http://www.upfir.ru,_blank);"
	         />

 <plugin name="activespot" url="mappointactive.png" keep="true" align="center" edge="center" visible="false" zorder="3" />
    
    <!-- radar plugin, set heading with "plugin[radar].heading" -->
    <plugin name="radar"
	        url="plugins/radar.swf"
	        zorder="1"
	        keep="true"
	        heading="0"
	        parent="map"
	        mask="mapmask"
	        align="lefttop"
	        edge="center"
	        x="0" y="0"
	        linecolor="0"
	        fillcolor="0xFF0000"
	        scale="2.5"
	        visible="false"
	        />
    
	<!-- update mask for radar -->
	<action name="updatemask">
		set(plugin[radar].mask, mapmask);
	</action>
    	        

	<!-- actions -->
	<action name="closemap">
        set(plugin[%1].onclick,action(openmap,%1););
        tween(plugin[%1].width,150,distance(320,0.5),easeoutquad);
        tween(plugin[%1].height,84,distance(227,0.5),easeoutquad);
    </action>
    
    <action name="openmap">
	
        set(plugin[%1].onclick,action(closemap,%1););
        tween(plugin[%1].width,1024,distance(320,0.5),easeoutquad);
        tween(plugin[%1].height,576,distance(227,0.5),easeoutquad);
    </action>


	<!-- activatespot action, 
	     - this action has two arguments:
	       - %1 = the current spot
	       - %2 = the current radar heading
	-->
	<action name="activatespot">
		set(plugin[activespot].parent, plugin[%1]);
		set(plugin[activespot].visible, true);
		
		copy(plugin[radar].x, plugin[%1].x);
		copy(plugin[radar].y, plugin[%1].y);
		
		set(plugin[radar].visible, true);
		set(plugin[radar].heading, %2);
	</action>
</krpano>