<krpano version="1.0.8.14" onstart="loadscene(scene_outside);" logkey="false" showerrors="false">

<include url="data.xml"/>

	<action name="snd">
		IF(actioncord == 2, play(music), stop()); switch(plugin[snd].actioncord,1,2);  switch(plugin[snd].crop, 0|30|30|30, 0|0|30|30); 
	</action>		

<style name="hotspot" zorder="0" edge="center" details="30" distorted="true"
	         keep="false" zoom="true" jsborder="2px solid #00ff00"
	         visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true"
			 />	
	
	<scene name="scene_Outside" title="Outside" onstart="set(plugin[titletext].html, '[p]Welcome to Shepherd of the Hills[/p]'); set(plugin[infotext].html, data:outside);" thumburl="panos/Outside.tiles/thumb.jpg">
	
<view hlookat="0" vlookat="0" fov="90" fovmin="40" fovmax="120"/><display details="32" sharpen="12"/><control movetocursor="arrow"/>

		<preview url="panos/Outside.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="2048" tiledimageheight="2048">
				<left  url="panos/Outside.tiles/l3_l_%0v%0h.jpg" />
				<front url="panos/Outside.tiles/l3_f_%0v%0h.jpg" />
				<right url="panos/Outside.tiles/l3_r_%0v%0h.jpg" />
				<back  url="panos/Outside.tiles/l3_b_%0v%0h.jpg" />
				<up    url="panos/Outside.tiles/l3_u_%0v%0h.jpg" />
				<down  url="panos/Outside.tiles/l3_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<left  url="panos/Outside.tiles/l2_l_%0v%0h.jpg" />
				<front url="panos/Outside.tiles/l2_f_%0v%0h.jpg" />
				<right url="panos/Outside.tiles/l2_r_%0v%0h.jpg" />
				<back  url="panos/Outside.tiles/l2_b_%0v%0h.jpg" />
				<up    url="panos/Outside.tiles/l2_u_%0v%0h.jpg" />
				<down  url="panos/Outside.tiles/l2_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="512" tiledimageheight="512">
				<left  url="panos/Outside.tiles/l1_l_%0v%0h.jpg" />
				<front url="panos/Outside.tiles/l1_f_%0v%0h.jpg" />
				<right url="panos/Outside.tiles/l1_r_%0v%0h.jpg" />
				<back  url="panos/Outside.tiles/l1_b_%0v%0h.jpg" />
				<up    url="panos/Outside.tiles/l1_u_%0v%0h.jpg" />
				<down  url="panos/Outside.tiles/l1_d_%0v%0h.jpg" />
			</level>
		</image>

	<hotspot name="church" style="hotspot"
 	         ath="-0.65" atv="1.5" alpha="0.75" scale="0.5"
			 url="extras/firespot.png" 
	         onhover="showtext('Welcome to our Family')"
	         onclick="looktohotspot(church); loadscene(scene_foyer,null,MERGE,BLEND(2));"/>				
	
	<hotspot name="preschool" style="hotspot"
 	         ath="71" atv="2" alpha="0.75" scale="0.75"
			 url="extras/preschoolspot.png"
	         onhover="showtext(Shepherds Little Lambs Preschool)"
	         onclick="looktohotspot(preschool); loadscene(scene_preschool,null,MERGE,BLEND(2));"/>	
			 
			 			

	</scene>
	
	<scene name="scene_preschool" title="Preschool" onstart="set(plugin[titletext].html, '[p]Shepheds Little Lambs Preschool[/p]'); set(plugin[infotext].html, data:preschool);" thumburl="panos/preschool.tiles/thumb.jpg">

<view hlookat="0" vlookat="0" fov="90" fovmin="50" fovmax="120"/><display details="32" sharpen="12"/><control movetocursor="arrow"/>

		<preview url="panos/preschool.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="2048" tiledimageheight="2048">
				<left  url="panos/preschool.tiles/l3_l_%0v%0h.jpg" />
				<front url="panos/preschool.tiles/l3_f_%0v%0h.jpg" />
				<right url="panos/preschool.tiles/l3_r_%0v%0h.jpg" />
				<back  url="panos/preschool.tiles/l3_b_%0v%0h.jpg" />
				<up    url="panos/preschool.tiles/l3_u_%0v%0h.jpg" />
				<down  url="panos/preschool.tiles/l3_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<left  url="panos/preschool.tiles/l2_l_%0v%0h.jpg" />
				<front url="panos/preschool.tiles/l2_f_%0v%0h.jpg" />
				<right url="panos/preschool.tiles/l2_r_%0v%0h.jpg" />
				<back  url="panos/preschool.tiles/l2_b_%0v%0h.jpg" />
				<up    url="panos/preschool.tiles/l2_u_%0v%0h.jpg" />
				<down  url="panos/preschool.tiles/l2_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="512" tiledimageheight="512">
				<left  url="panos/preschool.tiles/l1_l_%0v%0h.jpg" />
				<front url="panos/preschool.tiles/l1_f_%0v%0h.jpg" />
				<right url="panos/preschool.tiles/l1_r_%0v%0h.jpg" />
				<back  url="panos/preschool.tiles/l1_b_%0v%0h.jpg" />
				<up    url="panos/preschool.tiles/l1_u_%0v%0h.jpg" />
				<down  url="panos/preschool.tiles/l1_d_%0v%0h.jpg" />
			</level>
		</image>

	<hotspot name="room" style="hotspot"
 	         ath="0" atv="2" alpha="0.75" scale="0.5"
			 url="extras/firespot.png"
	         onhover="showtext(Return to the Multi-purpose room)"
	         onclick="looktohotspot(room); loadscene(scene_multipurposeroom,null,MERGE,BLEND(2));"/>
			 
		 		

	</scene>

	<scene name="scene_Foyer" title="Foyer" onstart="set(plugin[titletext].html, '[p]Foyer[/p]'); set(plugin[infotext].html, data:foyer);" thumburl="panos/Foyer.tiles/thumb.jpg">

<view hlookat="0" vlookat="0" fov="90" fovmin="50" fovmax="120"/><display details="32" sharpen="12"/><control movetocursor="arrow"/>

		<preview url="panos/Foyer.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="2048" tiledimageheight="2048">
				<left  url="panos/Foyer.tiles/l3_l_%0v%0h.jpg" />
				<front url="panos/Foyer.tiles/l3_f_%0v%0h.jpg" />
				<right url="panos/Foyer.tiles/l3_r_%0v%0h.jpg" />
				<back  url="panos/Foyer.tiles/l3_b_%0v%0h.jpg" />
				<up    url="panos/Foyer.tiles/l3_u_%0v%0h.jpg" />
				<down  url="panos/Foyer.tiles/l3_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<left  url="panos/Foyer.tiles/l2_l_%0v%0h.jpg" />
				<front url="panos/Foyer.tiles/l2_f_%0v%0h.jpg" />
				<right url="panos/Foyer.tiles/l2_r_%0v%0h.jpg" />
				<back  url="panos/Foyer.tiles/l2_b_%0v%0h.jpg" />
				<up    url="panos/Foyer.tiles/l2_u_%0v%0h.jpg" />
				<down  url="panos/Foyer.tiles/l2_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="512" tiledimageheight="512">
				<left  url="panos/Foyer.tiles/l1_l_%0v%0h.jpg" />
				<front url="panos/Foyer.tiles/l1_f_%0v%0h.jpg" />
				<right url="panos/Foyer.tiles/l1_r_%0v%0h.jpg" />
				<back  url="panos/Foyer.tiles/l1_b_%0v%0h.jpg" />
				<up    url="panos/Foyer.tiles/l1_u_%0v%0h.jpg" />
				<down  url="panos/Foyer.tiles/l1_d_%0v%0h.jpg" />
			</level>
		</image>

	<hotspot name="sanctuary" style="hotspot"
 	         ath="-0.65" atv="1.5" alpha="0.75" scale="0.5"
			 url="extras/firespot.png" 
	         onhover="showtext('Enter the Sanctuary')"
	         onclick="looktohotspot(sanctuary); loadscene(scene_sanctuary,null,MERGE,BLEND(2));"/>				
	
	<hotspot name="room" style="hotspot"
 	         ath="68" atv="2" alpha="0.75" scale="0.5"
			 url="extras/firespot.png"
	         onhover="showtext(Enter the Multi-purpose room)"
	         onclick="looktohotspot(room); loadscene(scene_multipurposeroom,null,MERGE,BLEND(2));"/>
			 
			 
		 			

	</scene>

	<scene name="scene_multipurposeroom" title="Fellowship Hall" onstart="set(plugin[titletext].html, '[p]Fellowship Hall[/p]'); set(plugin[infotext].html, data:room);" thumburl="panos/multipurposeroom.tiles/thumb.jpg">

<view hlookat="0" vlookat="0" fov="90" fovmin="50" fovmax="120"/><display details="32" sharpen="12"/><control movetocursor="arrow"/>

		<preview url="panos/multipurposeroom.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="2048" tiledimageheight="2048">
				<left  url="panos/multipurposeroom.tiles/l3_l_%0v%0h.jpg" />
				<front url="panos/multipurposeroom.tiles/l3_f_%0v%0h.jpg" />
				<right url="panos/multipurposeroom.tiles/l3_r_%0v%0h.jpg" />
				<back  url="panos/multipurposeroom.tiles/l3_b_%0v%0h.jpg" />
				<up    url="panos/multipurposeroom.tiles/l3_u_%0v%0h.jpg" />
				<down  url="panos/multipurposeroom.tiles/l3_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<left  url="panos/multipurposeroom.tiles/l2_l_%0v%0h.jpg" />
				<front url="panos/multipurposeroom.tiles/l2_f_%0v%0h.jpg" />
				<right url="panos/multipurposeroom.tiles/l2_r_%0v%0h.jpg" />
				<back  url="panos/multipurposeroom.tiles/l2_b_%0v%0h.jpg" />
				<up    url="panos/multipurposeroom.tiles/l2_u_%0v%0h.jpg" />
				<down  url="panos/multipurposeroom.tiles/l2_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="512" tiledimageheight="512">
				<left  url="panos/multipurposeroom.tiles/l1_l_%0v%0h.jpg" />
				<front url="panos/multipurposeroom.tiles/l1_f_%0v%0h.jpg" />
				<right url="panos/multipurposeroom.tiles/l1_r_%0v%0h.jpg" />
				<back  url="panos/multipurposeroom.tiles/l1_b_%0v%0h.jpg" />
				<up    url="panos/multipurposeroom.tiles/l1_u_%0v%0h.jpg" />
				<down  url="panos/multipurposeroom.tiles/l1_d_%0v%0h.jpg" />
			</level>
		</image>

	<hotspot name="foyer" style="hotspot"
 	         ath="-13" atv="1.5" alpha="0.75" scale="0.5"
			 url="extras/firespot.png" 
	         onhover="showtext('Enter the Foyer')"
	         onclick="looktohotspot(foyer); loadscene(scene_foyer,null,MERGE,BLEND(2));"/>				
			 
	<hotspot name="preschool" style="hotspot"
 	         ath="-152" atv="2" alpha="0.75" scale="0.75"
			 url="extras/preschoolspot.png"
	         onhover="showtext(Shepherds Little Lambs Pre-school)"
	         onclick="looktohotspot(preschool); loadscene(scene_preschool,null,MERGE,BLEND(2));"/>
			 

	</scene>

	<scene name="scene_sanctuary" title="Sanctuary" onstart="set(plugin[titletext].html, '[p]Sanctuary[/p]'); set(plugin[infotext].html, data:tvs);" thumburl="panos/sanctuary.tiles/thumb.jpg">

<view hlookat="0" vlookat="0" fov="90" fovmin="50" fovmax="120"/><display details="32" sharpen="12"/><control movetocursor="arrow"/>

		<preview url="panos/sanctuary.tiles/preview.jpg" />

		<image type="CUBE" multires="true" tilesize="512" progressive="false">
			<level tiledimagewidth="2048" tiledimageheight="2048">
				<left  url="panos/sanctuary.tiles/l3_l_%0v%0h.jpg" />
				<front url="panos/sanctuary.tiles/l3_f_%0v%0h.jpg" />
				<right url="panos/sanctuary.tiles/l3_r_%0v%0h.jpg" />
				<back  url="panos/sanctuary.tiles/l3_b_%0v%0h.jpg" />
				<up    url="panos/sanctuary.tiles/l3_u_%0v%0h.jpg" />
				<down  url="panos/sanctuary.tiles/l3_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="1024" tiledimageheight="1024">
				<left  url="panos/sanctuary.tiles/l2_l_%0v%0h.jpg" />
				<front url="panos/sanctuary.tiles/l2_f_%0v%0h.jpg" />
				<right url="panos/sanctuary.tiles/l2_r_%0v%0h.jpg" />
				<back  url="panos/sanctuary.tiles/l2_b_%0v%0h.jpg" />
				<up    url="panos/sanctuary.tiles/l2_u_%0v%0h.jpg" />
				<down  url="panos/sanctuary.tiles/l2_d_%0v%0h.jpg" />
			</level>
			<level tiledimagewidth="512" tiledimageheight="512">
				<left  url="panos/sanctuary.tiles/l1_l_%0v%0h.jpg" />
				<front url="panos/sanctuary.tiles/l1_f_%0v%0h.jpg" />
				<right url="panos/sanctuary.tiles/l1_r_%0v%0h.jpg" />
				<back  url="panos/sanctuary.tiles/l1_b_%0v%0h.jpg" />
				<up    url="panos/sanctuary.tiles/l1_u_%0v%0h.jpg" />
				<down  url="panos/sanctuary.tiles/l1_d_%0v%0h.jpg" />
			</level>
		</image>

	<hotspot name="foyer" style="hotspot"
 	         ath="177" atv="2.5" alpha="0.75" scale="0.5"
			 url="extras/firespot.png" 
	         onhover="showtext('Enter the Foyer')"
	         onclick="looktohotspot(foyer); loadscene(scene_foyer,null,MERGE,BLEND(2));"/>				
			 
	<hotspot name="preschool" style="hotspot"
 	         ath="85" atv="2" alpha="0.75" scale="0.75"
			 url="extras/preschoolspot.png"
	         onhover="showtext(Shepherds Little Lambs Pre-school)"
	         onclick="looktohotspot(preschool); loadscene(scene_preschool,null,MERGE,BLEND(2));"/>


	</scene>	

	<hotspot name="nadir" url="../../core/images/nadir.png"
       	    ath="0"	atv="90" distorted="true"
         	scale="1.0" visible="true" keep="true"
		 	zorder="2" rotatewithview="true"
         	onclick="openurl(http://www.virtualnorthland.com,_blank);"/>	
	
	<plugin name="soundinterface" url="../../core/plugins/soundinterface.swf" alturl="../../core/plugins/soundinterface.js" keep="true" preload="true" volume="0.5" />
	
	<action name="play">
			 playsound(id1,extras/%1.mp3);
	</action>	
	
	<action name="stop">
			stopallsounds();
	</action>
	
	<plugin name="infotext" url="../../core/plugins/textfield.swf"
	        keep="true" visible="false" enabled="true" handcursor="true" capture="true" children="true"
	        zorder="103" alpha="1" blendmode="normal" smoothing="true" align="center" edge="center"
 	        width="98%" height="98%" background="true" roundedge="10" 
	        css="data:cssdata1" onhover="" ondown="set(plugin[infotext].visible,false); set(plugin[noinfo].visible, false);"
	        glowcolor="16777215" html="data:infodata" selectable="false"
	        shadow="0" textglow="0" textglowcolor="ffffffff" textheight="200" textshadow="0" />	
	
			<data name="cssdata1">
		    a:hover { color:#885500; }
			pheader{color:#000000; font-family:comic sans ms; font-weight:bold; font-size:18; margin-left:5; margin-right:5; text-align:center; }
		    ptitle{color:#000000; font-family:comic sans ms; font-weight:bold; font-size:15; margin-left:5; margin-right:5; text-align:center; }
		    pbody{color:#000000; font-family:comic sans ms; font-weight:normal; font-size:13; margin-left:5; margin-right:5; text-align:left; }
		    plink{color:#000000;  font-family:comic sans ms; text-decoration:underline; font-weight:bold; color:#0000ff; font-size:16; margin-left:5; margin-right:5;            text-align:center; }
			</data>  


	<textstyle name="default" font="Arial" fontsize="16" bold="true" italic="false"
	           textcolor="0x000000" background="true" border="true"
	           blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
	           origin="bottomcenter" edge="bottomcenter" xoffset="0" yoffset="105" showtime="0.1" fadeintime="0.1" fadetime="0.1"/>			   
	           
	<textstyle name="INFOTEXT" font="Arial" fontsize="26" bold="true" italic="true"
	           textcolor="0x000000" background="false" border="false"
	           blendmode="layer" effect="glow(0xFFFFFF,0.85,4,4);dropshadow(2,45,0x000000,4,1);"
	           origin="center" edge="center" xoffset="0" yoffset="0" showtime="2.0" fadeintime="0.25" fadetime="0.5"/>	
			   
	<plugin name="logo" url="extras/logo.png"
			zorder="2" jsborder="2px solid #ff9900"
			handcursor="false" alpha="1" 
			scale="1" altscale="1.4" 
			visible="true" keep="true"
			align="topleft" edge="topleft" 
			x="5" y="5" />
		
	<plugin name="snd" url="../../core/images/soundonoff.png"
			keep="true" actioncord="1"
			handcursor="true" alpha="1" crop="0|30|30|30"
			scale="3" altscale="3"
			visible="true" zorder="11"
			align="bottomleft" edge="bottomleft" 
			x="5" y="5" ondown="snd()"
			/>
			
	<plugin name="photos" url="../../core/images/camera_icon.png"
			keep="true" 
			handcursor="true" alpha="1" 
			scale="3" altscale="3"
			visible="true" ondown="addgallery(); set(plugin[nophotos].visible, true); "
			align="bottomright" edge="bottomright" 
			x="10" y="10" zorder="11"
			/> 													
			
			<plugin name="nophotos" url="../../core/images/no.png" 
	        keep="true" visible="false" enabled="true" handcursor="true" 
 	        zorder="20" alpha="1.00" blendmode="normal"
 	        smoothing="true" align="bottomright" edge="bottomright" 
			x="5" y="5" 
			ondown="set(visible,false);  
					removeplugin(thumbbar_image_0);
					removeplugin(thumbbar_image_1);
					removeplugin(thumbbar_image_2);
					removeplugin(thumbbar_image_3);
					removeplugin(thumbbar_image_4);
					removeplugin(thumbbar_image_5);
					removeplugin(thumbbar);"
 	        altscale="0.75"
			/>
			
				<action name="addgallery">
				create_thumbbar(6, right, v, 10,10, 90,60, 8); 
				thumbbar_addimage('extras/1.jpg');
				thumbbar_addimage('extras/3.jpg');
				thumbbar_addimage('extras/10.jpg');
				thumbbar_addimage('extras/12.jpg');
				thumbbar_addimage('extras/9.jpg');
				thumbbar_addimage('extras/8.jpg');
				</action>
			
	<plugin name="info" url="../../core/images/info.png"
			handcursor="true" alpha="1" 
			scale="3" altscale="3"
			visible="true" keep="true"
			align="bottomcenter" edge="bottomcenter" 
			x="0" y="5" zorder="11" 
			onclick="set(plugin[infotext].visible,true); set(plugin[noinfo].visible, true);"
			/>						
			
			<plugin name="noinfo" url="../../core/images/no.png"
	        keep="true" visible="false" enabled="true" handcursor="true" 
 	        zorder="104" alpha="1.00" blendmode="normal"
 	        smoothing="true" align="bottomcenter" edge="bottomcenter" 
			x="0" y="15" ondown="set(plugin[infotext].visible,false); set(visible, false);"
 	        scale="0.5" altscale="0.75"
				/>													
			
	<plugin name="navinfo"
			url="../../core/images/navinfom.png"
	        keep="true" visible="true" enabled="true" handcursor="true" 
 	        zorder="5" alpha="1.00" blendmode="normal"
 	        smoothing="true" align="center" edge="center"
 	        ondown="action(hidenav);" jsborder="2px solid #00ff00"
	        scale="1" altscale="1.1" />
			
			<action name="hidenav">
			play(music); wait(0);
			set(plugin[navinfo].visible,false);
			</action>	

	<action name="create_thumbbar">
		set(thumbbar_images,      %1);
		set(thumbbar_align,       %2);
		set(thumbbar_orientation, %3);
		set(thumbbar_x,           %4);
		set(thumbbar_y,           %5);
		set(thumbbar_thumbwidth,  %6);
		set(thumbbar_thumbheight, %7);
		set(thumbbar_border,      %8);
		set(thumbbar_image_index, 0);

		set(thumbbar_xoffset, get(thumbbar_border) );
		set(thumbbar_yoffset, get(thumbbar_border) );
		set(thumbbar_xborder, 0);
		set(thumbbar_yborder, 0);

		if(thumbbar_orientation == h,
			add(thumbbar_yborder, thumbbar_y, thumbbar_thumbheight);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			add(thumbbar_yborder, thumbbar_yborder, thumbbar_border);
			mul(thumbbar_yborder, thumbbar_yborder, 2);
			mul(thumbbar_xborder, thumbbar_border, 2);
			if(%2 == left,   set(thumbbar_yoffset,0); );
			if(%2 == right,  set(thumbbar_yoffset,0); );
			if(%2 == top,    mul(thumbbar_xoffset,thumbbar_border,0.5); );
			if(%2 == bottom, mul(thumbbar_xoffset,thumbbar_border,0.5); );
			if(%2 == center, mul(thumbbar_xoffset,thumbbar_border,0.5); set(thumbbar_yoffset,0); mul(thumbbar_yborder,thumbbar_border,2); );
		  ,
			add(thumbbar_xborder, thumbbar_x, thumbbar_thumbwidth);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			add(thumbbar_xborder, thumbbar_xborder, thumbbar_border);
			mul(thumbbar_xborder, thumbbar_xborder, 2);
			mul(thumbbar_yborder, thumbbar_border, 2);
			if(%2 == left,   mul(thumbbar_yoffset,thumbbar_border,0.5); );
			if(%2 == right,  mul(thumbbar_yoffset,thumbbar_border,0.5); );
			if(%2 == top,    set(thumbbar_xoffset,0); );
			if(%2 == bottom, set(thumbbar_xoffset,0); );
			if(%2 == center, set(thumbbar_xoffset,0); mul(thumbbar_yoffset,thumbbar_border,0.5); mul(thumbbar_xborder,thumbbar_border,2); );
		  );

		addplugin(thumbbar);
		set(plugin[thumbbar].align, get(thumbbar_align));
		set(plugin[thumbbar].x, get(thumbbar_x));
		set(plugin[thumbbar].y, get(thumbbar_y));
		set(plugin[thumbbar].url, '../../core/images/white.jpg');
		set(plugin[thumbbar].alpha, 0.5);
		set(plugin[thumbbar].zorder, 1);
		set(plugin[thumbbar].enabled, false);
		set(plugin[thumbbar].keep, true);
	</action>


	<action name="thumbbar_addimage">
		txtadd(pname, 'thumbbar_image_', get(thumbbar_image_index));
		addplugin(get(pname));
		set(plugin[%pname].zorder, 2);
		set(plugin[%pname].url, %CURRENTXML%/%1);
		set(plugin[%pname].align,  get(thumbbar_align));
		set(plugin[%pname].width,  get(thumbbar_thumbwidth));
		set(plugin[%pname].height, get(thumbbar_thumbheight));
		set(plugin[%pname].keep, true);
		set(plugin[%pname].jsborder, '1px solid #000000');

		if (thumbbar_orientation == 'v',
			<!-- vertical thumbs -->
			add(plugin[%pname].x, thumbbar_x, thumbbar_xoffset);

			add(tmp, thumbbar_border, thumbbar_thumbheight);
			mul(tmp, tmp, thumbbar_image_index);
			add(tmp, tmp, thumbbar_yoffset);
			add(plugin[%pname].y, thumbbar_y, tmp );

			set(thumbbar_vcenter,false);
			if(thumbbar_align == left,   set(thumbbar_vcenter,true));
			if(thumbbar_align == center, set(thumbbar_vcenter,true));
			if(thumbbar_align == right,  set(thumbbar_vcenter,true));

			if(thumbbar_vcenter,
				add(tmp2, thumbbar_border, thumbbar_thumbheight);
				mul(tmp2, tmp2, thumbbar_images);
				mul(tmp2, tmp2, 0.5);
				sub(plugin[%pname].y, plugin[%pname].y, tmp2 );
				mul(tmp3, thumbbar_thumbheight, 0.5);
				add(plugin[%pname].y, plugin[%pname].y, tmp3 );
			  );

			sub(tmp, tmp, thumbbar_yoffset);
			add(tmp, tmp, thumbbar_border);
			add(tmp, tmp, thumbbar_thumbheight);
			add(tmp, tmp, thumbbar_border);
			set(plugin[thumbbar].height, get(tmp));

			mul(tmp, thumbbar_border, 2);
			add(plugin[thumbbar].width, tmp, thumbbar_thumbwidth);
		   ,

			<!-- horizontal thumbs -->
			add(plugin[%pname].y, thumbbar_y, thumbbar_yoffset);

			add(tmp, thumbbar_border, thumbbar_thumbwidth);
			mul(tmp, tmp, thumbbar_image_index);
			add(tmp, tmp, thumbbar_xoffset);
			add(plugin[%pname].x, thumbbar_x, tmp );

			set(thumbbar_hcenter,false);
			if(thumbbar_align == top,    set(thumbbar_hcenter,true));
			if(thumbbar_align == center, set(thumbbar_hcenter,true));
			if(thumbbar_align == bottom, set(thumbbar_hcenter,true));

			if(thumbbar_hcenter,
				add(tmp2, thumbbar_border, thumbbar_thumbwidth);
				mul(tmp2, tmp2, thumbbar_images);
				mul(tmp2, tmp2, 0.5);
				sub(plugin[%pname].x, plugin[%pname].x, tmp2 );
				mul(tmp3, thumbbar_thumbwidth, 0.5);
				add(plugin[%pname].x, plugin[%pname].x, tmp3 );
			  );

			sub(tmp, tmp, thumbbar_xoffset);
			add(tmp, tmp, thumbbar_border);
			add(tmp, tmp, thumbbar_thumbwidth);
			add(tmp, tmp, thumbbar_border);
			set(plugin[thumbbar].width, get(tmp));

			mul(tmp, thumbbar_border, 2);
			add(plugin[thumbbar].height, tmp, thumbbar_thumbheight);
		   );

		copy(plugin[%pname].thumbx, plugin[%pname].x);
		copy(plugin[%pname].thumby, plugin[%pname].y);

		set(plugin[%pname].onclick, thumbbar_showimage(get(name)) );

		inc(thumbbar_image_index);
	</action>


	<action name="thumbbar_showimage">
		thumbbar_hide_allimages();

		set(plugin[%1].zorder, 3);

		push(plugin[%1].width);
		push(plugin[%1].height);
		plugin[%1].resetsize();
		copy(plugin[%1].originalwidth, plugin[%1].width);
		copy(plugin[%1].originalheight, plugin[%1].height);
		pop(plugin[%1].height);
		pop(plugin[%1].width);

		set(imgwidth, get(plugin[%1].originalwidth));
		set(imgheight, get(plugin[%1].originalheight));

		set(maxwidth, get(stagewidth));
		sub(maxwidth, maxwidth, thumbbar_xborder);

		set(maxheight, get(stageheight));
		sub(maxheight, maxheight, thumbbar_yborder);

		if(imgwidth GT maxwidth,
		   mul(imgheight, imgheight, maxwidth);
		   div(imgheight, imgheight, imgwidth);
		   copy(imgwidth, maxwidth);
		  );

		if(imgheight GT maxheight,
		   mul(imgwidth, imgwidth, maxheight);
		   div(imgwidth, imgwidth, imgheight);
		   copy(imgheight, maxheight);
		  );

		tween(plugin[%1].width, get(imgwidth));
		tween(plugin[%1].height, get(imgheight));

		mul(tmp, thumbbar_border, 3);
		add(tmp, tmp, thumbbar_thumbwidth);

		plugin[%1].changeorigin(center,center);

		tween(plugin[%1].x, 0);
		tween(plugin[%1].y, 0);

		set(plugin[%1].onclick, thumbbar_hideimage(%1) );
	</action>


	<action name="thumbbar_hideimage">
		plugin[%1].changeorigin(get(thumbbar_align),get(thumbbar_align));

		set(plugin[%1].zorder, 2);

		tween(plugin[%1].width, get(thumbbar_thumbwidth));
		tween(plugin[%1].height, get(thumbbar_thumbheight));
		tween(plugin[%1].x, get(plugin[%1].thumbx));
		tween(plugin[%1].y, get(plugin[%1].thumby));

		set(plugin[%1].onclick, thumbbar_showimage(%1) );
	</action>


	<action name="thumbbar_hide_allimages">
		if(%1 != NEXT, set(i,0));
		txtadd(pname, 'thumbbar_image_', get(i));

		thumbbar_hideimage(get(pname));

		inc(i);
		if(i LT thumbbar_images, thumbbar_hide_allimages(NEXT));
	</action>
	
	<action name="removing_plugins">
			sub(i,plugin.count,1);
			if(i GE 0,removing_loop_all_plugins(get(i),%1,%2));
	</action>

	<action name="removing_loop_all_plugins">
			if(%2 == null,
				removeplugin(%1);
				,
				if(plugin[%1].%2 == %3,
					removeplugin(%1);
					);
				);
			dec(i);
			if(i GE 0, removing_loop_all_plugins(get(i),%2,%3) );
	</action>	

<plugin name="cb" keep="true" devices="ipad|iphone|andriod"
        url="../../core/plugins/combobox.swf"
        alturl="../../core/plugins/combobox.js"
        align="topright" x="0" y="0"
        onloaded="fillbox();" zorder="15"
        />
		
<action name="fillbox"> 
		for(set(i,0), i LT scene.count, inc(i),
  		set(scenename, get(scene[get(i)].name));
		set(titlename, get(scene[get(i)].title));
  		txtadd(itemaction, 'loadscene(', get(scenename),',null,MERGE,BLEND(1));');
  		plugin[cb].additem(get(titlename), get(itemaction));
		);
</action>


</krpano>

