<?xml version="1.0" encoding="UTF-8"?>
<krpano version="1.19-pr16">

      
  <!-- Picture Spot Style - Default Picture Spot Style -->

  <style name="RectPictureDefaultPictureSpotStyle"
         distorted="true"
         visible="false"
         scale="1.0" 
         onhover="onhoverRectPictureDefaultPictureSpotStyle"
         onout="onoutRectPictureDefaultPictureSpotStyle"
         />
  <action name="onhoverRectPictureDefaultPictureSpotStyle">
    showTooltip('hotspot');
  </action>
  <action name="onoutRectPictureDefaultPictureSpotStyle">
    hideTooltip();
    
  </action>



  
  <!-- Spot Style - Land -->
  <style name="PolygonLand"
           visible="false"
           bordercolor="0x0e7a8c"
           fillcolor="0xc7c7c7"
           borderwidth="9"
           borderalpha="1"
           fillalpha="0"
           capture="false"
           onhover="onhoverPolygonLand"
           onover="onoverPolygonLand"
           onout="onoutPolygonLand"
           />
  <action name="onhoverPolygonLand">
    showTooltip('hotspot');
  </action>

  <action name="onoverPolygonLand">
    set(borderwidth, 9);
  </action>

  <action name="onoutPolygonLand">

    set(borderwidth, 9);
    hideTooltip();
  </action>



    
  <!-- Spot Style - calloutright -->


  <style name="Iconcalloutright"
         url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint1.png"
         visible="false"
         edge="bottom" ox="0" oy="0"
         onloaded="showPermanentTooltip(all, bottom);"


         height="250"
         width="prop"
         />



    
  <!-- Spot Style - calloutleft -->


  <style name="Iconcalloutleft"
         url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint2.png"
         visible="false"
         edge="bottom" ox="0" oy="0"
         onloaded="showPermanentTooltip(all, bottom);"


         height="250"
         width="prop"
         />



    
  <!-- Spot Style - calloutleftlong -->


  <style name="Iconcalloutleftlong"
         url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint3.png"
         visible="false"
         edge="bottom" ox="0" oy="0"
         onloaded="showPermanentTooltip(all, bottom);"


         height="250"
         width="prop"
         />



    
  <!-- Spot Style - calloutrightlong -->


  <style name="Iconcalloutrightlong"
         url="%FIRSTXML%/spots/hotspot_neutral_user_defaultpoint4.png"
         visible="false"
         edge="bottom" ox="0" oy="0"
         onloaded="showPermanentTooltip(all, bottom);"


         height="250"
         width="prop"
         />



<!-- ********** -->
<!-- Classic Control Bar -->
<!-- id : controlBar_classic -->
<!-- ********** -->

  <krpano controlBar_classicbarbuilt="false" controlBar_classicbackgroundwidthwhenclosed="0" controlBar_classicbackgroundwidthwhenopened="0" controlBar_classicIsOpened="false" />
  <events name="controlBar_classicevents" 
    onxmlcomplete="controlBar_classicbuildMenuBar();" 


    keep="true" />



  <action name="controlBar_classicbuildMenuBar">
    ifnot (controlBar_classicbarbuilt, controlBar_classicbuildMenu(); set(controlBar_classicbarbuilt, true););
  </action>

  <action name="controlBar_classicbuildMenu">
    
    set(controlBar_classicbutton_pos, 20);





    set(layer[controlBar_classicbtn_autorotate_on ].y, get(controlBar_classicbutton_pos));
    set(layer[controlBar_classicbtn_autorotate_off].y, get(controlBar_classicbutton_pos));
    inc(controlBar_classicbutton_pos, 36);







    if (device.desktop,
      set(layer[controlBar_classicbtn_out].y, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
      set(layer[controlBar_classicbtn_in].y, get(controlBar_classicbutton_pos));
      inc(controlBar_classicbutton_pos, 36);
    );


    inc(controlBar_classicbutton_pos, 20);

    set(controlBar_classicbackgroundwidthwhenopened, get(controlBar_classicbutton_pos));



    
    add(controlBar_classicVerifyVisibility, 20, 20);
    if(controlBar_classicbackgroundwidthwhenopened == controlBar_classicVerifyVisibility,
      set(controlBar_classicbackgroundwidthwhenopened, 0);


    );

	
	
  </action>

	<events name="controlBar_classicStartTourEvents" onTourStart="controlBar_classicCallOnStartTour();" keep="true" />

	<action name="controlBar_classicCallOnStartTour">
		
		set(layer[controlBar_classicmenu_controlbar_bg_img].height, get(controlBar_classicbutton_pos));
		set(layer[controlBar_classicmenu_controlbar_bg].height, get(controlBar_classicbutton_pos));
		controlBar_classicshowMenuControls();
	</action>



  <style name="controlBar_classic_btn_style"
         keep="true"
         alpha="0.8"
         edge="bottom" align="bottom"
         width="36" height="36"
         zorder="3"
         onover="controlBar_classicctrlbaronoveraction();"
         onout="controlBar_classicctrlbaronoutaction();"
         onhover="showTooltip('plugin', controlBar_classicmenuTooltipStyle, right);"
         />
  <action name="controlBar_classicctrlbaronoveraction">
    tween(alpha,1,0.1,easeoutquad);
    tween(x,-2,0.1,easeoutquad);
  </action>  
  <action name="controlBar_classicctrlbaronoutaction">
    tween(alpha,0.8);
    tween(x,0,0.1,easeoutquad);
    hideTooltip();
  </action>

  <layer name="controlBar_classicmenu_controlbar_bg_img"
         keep="true"
         align="right"
         x="0" y="10"
         url="%FIRSTXML%/graphics/classiccontrolbar/footer.png"
         zorder="1"
         width="40"
         height="40"
         scale9grid="10|10|80|80"
         visible="false"
         />
  <layer name="controlBar_classicmenu_controlbar_bg"
         keep="true"
         align="right"
         x="0" y="10"
         type="container"
         zorder="2"
         width="40"
         height="40"
         visible="false"
         alpha="1.0"
         >



    <layer name="controlBar_classicbtn_in"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_in.png"
            ondown="viewControlZoomIn(false);"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomInTip"
            devices="desktop"
            visible="false"
            />
    <layer name="controlBar_classicbtn_out"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_zoom_out.png"
            ondown="viewControlZoomOut(false);
"
            onup="viewControlZoomStop();
"
            style="controlBar_classic_btn_style"
            tooltip="controlBar_classiczoomOutTip"
            devices="desktop"
            visible="false"
            />





    <layer name="controlBar_classicbtn_autorotate_on"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_start_autorotation.png"
            onclick="resumeautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOnTip"
            />
    <layer name="controlBar_classicbtn_autorotate_off"
            url="%FIRSTXML%/graphics/classiccontrolbar/btn_stop_autorotation.png"
            onclick="pauseautorotation();
"
            style="controlBar_classic_btn_style"
            visible="false"
            tooltip="controlBar_classicautorotateOffTip"
            />





  </layer>





  <action name="controlBar_classichideMenuControls">
    set(controlBar_classicIsOpened, false);


    controlBar_classicupdateAutorotationButtons();


    set(layer[controlBar_classicbtn_in].visible , false);
    set(layer[controlBar_classicbtn_out].visible, false);






    if(controlBar_classicbackgroundwidthwhenclosed == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].height,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg].height,get(controlBar_classicbackgroundwidthwhenclosed),0.5,easeOutQuad);
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
  </action>
  <action name="controlBar_classicshowMenuControls">
    set(controlBar_classicIsOpened, true);
    if(controlBar_classicbackgroundwidthwhenopened == 0,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, false);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, false);
    ,
      set(layer[controlBar_classicmenu_controlbar_bg_img].visible, true);
      set(layer[controlBar_classicmenu_controlbar_bg].visible, true);
    );
    tween(layer[controlBar_classicmenu_controlbar_bg_img].alpha,1.0,0.5,easeOutQuad);
    controlBar_classicshowMenuButtons();


      tween(layer[controlBar_classicmenu_controlbar_bg_img].height, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);
      tween(layer[controlBar_classicmenu_controlbar_bg].height, get(controlBar_classicbackgroundwidthwhenopened),0.5,easeOutQuad);


  </action>
  <action name="controlBar_classicshowMenuButtons">
    if (device.desktop,
    set(layer[controlBar_classicbtn_in].visible , true);
    set(layer[controlBar_classicbtn_out].visible, true);
    );








    controlBar_classicupdateAutorotationButtons();


  </action>



	<events name="controlBar_classicAutorotationEvents"
		onstartautorotation="controlBar_classicupdateAutorotationButtons();"
		onresumeautorotation="controlBar_classicupdateAutorotationButtons();"
		onstopautorotation="controlBar_classicupdateAutorotationButtons();"
		onpauseautorotation="controlBar_classicupdateAutorotationButtons();"
		keep="true"/>
	<action name="controlBar_classicHideAutorotationButtons">
		set(layer[controlBar_classicbtn_autorotate_off].visible, false);
		set(layer[controlBar_classicbtn_autorotate_on].visible , false);
	</action>
	<action name="controlBar_classicShowAutorotationButtons">
		if(autorotate.enabled == false,
			set(layer[controlBar_classicbtn_autorotate_off].visible, false);
			set(layer[controlBar_classicbtn_autorotate_on].visible , true);
		,
			set(layer[controlBar_classicbtn_autorotate_off].visible, true);
			set(layer[controlBar_classicbtn_autorotate_on].visible , false);
		);
	</action>
	<action name="controlBar_classicupdateAutorotationButtons">
		if (controlBar_classicIsOpened,
			controlBar_classicShowAutorotationButtons();
		,
			controlBar_classicHideAutorotationButtons();
		);
	</action>




<layer name="controlBar_classicmenuTooltipStyle"
	keep="true"
	enabled="false"
	capture="false"
	type="text"
	align="center"
	bg="false"
	bgborder="0"
	txtshadow="1.0 1.0 4.0 0x000000 1"
	css="color:#e6e6e6;font-family:Helvetica;font-weight:bold;font-size:14px;text-align:left;"
	interactivecontent="false"
	zorder="0"
	visible="false"
	html=""
	padding="2"
	xoffset="0"
	yoffset="0"
	edge="right"
	/>



<!-- ********** -->
<!-- Panorama Combobox -->
<!-- id : panoramacombobox -->
<!-- ********** -->

  <!-- path to the scrollarea plugin -->
  <panoramacombobox_kr_scrollareaplugin
    url.html5="%FIRSTXML%/graphics/scrollarea.js"
    url.flash="%FIRSTXML%/graphics/scrollarea.swf"
    />

  <!-- core internal layer styles -->
  <style name="panoramacombobox_kr_container_style" type="container" maskchildren="true" bgcapture="true" visible="false" onclick="panoramacombobox_kr_onclick_event();" mergedalpha="false" alpha="1.0" />
  <style name="panoramacombobox_kr_marker_style" type="text" align="righttop" edge="center" html="▼" havemarkersize="false" onautosized="set(havemarkersize,true);" mergedalpha="false" alpha="1.0" />
  <style name="panoramacombobox_kr_item_style"  type="text" wordwrap="false" vcenter="true" align="lefttop" onover="if(!combbox_item_pressed,onoveritem());asyncloop(hovering,,if(!combbox_item_pressed,onoutitem()));" ondown="onoveritem(); set(combbox_item_pressed,true);" onup="onoutitem(); set(combbox_item_pressed,false);" onoveritem="set(bg,true);" onoutitem="set(bg,false);" mergedalpha="false" alpha="1.0" />

  <panoramacombobox_kr_design name="vtour" margin="4" open_close_speed="0.25">
    <!-- default vtourskin.xml design -->
    <style name="panoramacombobox_kr_container_style" bgalpha="0.8" bgcolor="0x2D3E50" bgborder="0" bgroundedge="1" bgshadow="0 4 10 0x000000 0.3" />
    <style name="panoramacombobox_kr_marker_style" css="color:#FFFFFF;" bg="false" txtshadow="0 0 2 0x000000 1" />
    <style name="panoramacombobox_kr_item_style" css="color:#FFFFFF;" padding="4" bg="false" bgcolor="0xFFFFFF" bgalpha="0.5" bgroundedge="0" txtshadow="0 0 2 0x000000 1" />
  </panoramacombobox_kr_design>

  <!-- internal events -->
  <events name="panoramacombobox_kr_xml_plugin_events" keep="true"
    onxmlcomplete="panoramacombobox_kr_parse_xml_elements();"
    onresize="panoramacombobox_kr_closelist();"
    />

  <!-- krpano version check -->
  <action name="panoramacombobox_kr_versioncheck" autorun="preinit">
    if(build LT '2017-09-13',
      error('combobox.xml - too old krpano version!');
      set(events[panoramacombobox_kr_xml_plugin_events].name, null);
      set(action[panoramacombobox_kr_addComboboxLayer].content, '');
      set(action[panoramacombobox_kr_removeComboboxLayer].content, '');
    );
  </action>

  <action name="panoramacombobox_kr_parse_xml_elements" scope="local">
        copy(cb, combobox["panoramacombobox"]);
        if(cb AND cb.name AND cb.parsed != true,
          set(cb.parsed, true);
          panoramacombobox_kr_addComboboxLayer(get(cb.name), get(cb.design));
          copy(ly, layer[get(cb.name)]);
          copyattributes(get(ly), get(cb));
          set(ly.keep, true);
          def(item_cnt, integer, get(cb.item.count));
          if(item_cnt GT 0,
            def(item_i, integer, 0);
            loop(item_i LT  item_cnt,
              panoramacombobox_kr_additem(get(ly.name), get(cb.item[get(item_i)].name), get(cb.item[get(item_i)].caption), get(cb.item[get(item_i)].onclick));
              inc(item_i);
            );
          );
        );
  </action>

  <!-- dynamically add a combobox layer -->
  <action name="panoramacombobox_kr_addComboboxLayer" scope="local" args="cbname, design">
    <!-- create the layer -->
    addlayer(get(cbname));
    copy(cb, layer[get(cbname)]);
    set(cb.keep, true);

    <!-- copy the design settings (or set defaults) -->
    if(!panoramacombobox_kr_design[get(design)].name, set(design,'default'));
    copy(cb.cbdesign, panoramacombobox_kr_design[get(design)]);
    calc(cb.margin, cb.cbdesign.margin !== null ? cb.cbdesign.margin : 2);
    calc(cb.open_close_speed, cb.cbdesign.open_close_speed !== null ? cb.cbdesign.open_close_speed : 0.25);
    <!-- load the styles and copy the design style settings -->
    cb.loadstyle(panoramacombobox_kr_container_style);
    copyattributes(get(cb), get(cb.cbdesign.style[panoramacombobox_kr_container_style]));

    <!-- add/build/map actions -->
    calc(cb.addItem,          'panoramacombobox_kr_additem(' + cbname + ', null, "%%1", "%%2");');
    calc(cb.addNamedItem,     'panoramacombobox_kr_additem(' + cbname + ', "%%1", "%%2", "%%3");');
    calc(cb.addIdItem,        'panoramacombobox_kr_additem(' + cbname + ', "%%1", "%%2", "%%3");');
    calc(cb.selectItem,       'panoramacombobox_kr_finditem(' + cbname + ', "%%1", __cb_fi); if(__cb_fi GE 0, panoramacombobox_kr_selectitem(' + cbname + ', get(__cb_fi))); delete(__cb_fi);');
    calc(cb.selectItemByName, 'panoramacombobox_kr_selectitem(' + cbname + ', "%%1");');
    calc(cb.selectIdItem,     'panoramacombobox_kr_selectitem(' + cbname + ', "%%1");');
    calc(cb.removeAll,        'panoramacombobox_kr_removeitems(' + cbname + ');');
    calc(cb.openList,         'panoramacombobox_kr_openlist(' + cbname + ');');
    calc(cb.closeList,        'panoramacombobox_kr_closelist(' + cbname + ');');

    <!-- create sub-layers -->
    def(saname, string, 'panoramacombobox_kr_%1_scrollarea');
    addlayer(get(saname));
    copy(sa, layer[get(saname)]);
    copy(sa.parent, cbname);
    copy(sa.url, panoramacombobox_kr_scrollareaplugin.url);
    copy(sa.keep, true);
    copy(sa.align, lefttop);
    set(sa.direction, v);
    set(sa.enabled, false);
    set(sa.width, 100%);
    set(sa.height, 100%);
    copy(cb.scrollarea, sa);

    def(mkname, string, 'panoramacombobox_kr_%1_marker');
    addlayer(get(mkname));
    copy(mk, layer[get(mkname)]);
    copy(mk.parent, saname);
    copy(mk.keep, true);
    mk.loadstyle(panoramacombobox_kr_marker_style);
    copyattributes(get(mk), get(cb.cbdesign.style[panoramacombobox_kr_marker_style]));
    copy(cb.marker, mk);

    <!-- item data array -->
    cb.createarray('item');

    <!-- item autosizing information -->
    set(cb.autosize_i, 0);
    set(cb.autosize_cnt, 0);
    set(cb.autosize_max_w, 0);
    set(cb.autosize_max_h, 0);

    set(cb.lastselecteditemindex, 0);
    set(cb.selecteditemindex, 0);
  </action>


  <!-- dynamically remove a combobox element -->
  <action name="panoramacombobox_kr_removeComboboxLayer" scope="local" args="cbname">
    if(layer[get(cbname)],
      copy(cb, layer[get(cbname)]);
      if(cb === global.openedcombobox, delete(global.openedcombobox));
      if(cb,
        removelayer(get(cbname), true);
      );
    );
  </action>


  <!-- default onclick event for combobox elements: open the list -->
  <action name="panoramacombobox_kr_onclick_event">
    panoramacombobox_kr_openlist(get(name));
  </action>


  <!-- dynamically add items -->
  <action name="panoramacombobox_kr_additem" scope="local" args="cbname, itemname, itemcaption, itemonclick">
    copy(cb, layer[get(cbname)]);

    <!-- when no item name is set, generate an automatic one -->
    if(itemname === null, calc(itemname, 'autoname_' + cb.item.count); );

    <!-- save the item caption and onclick event -->
    copy(cb.item[get(itemname)].caption, itemcaption);
    copy(cb.item[get(itemname)].onclick, itemonclick);

    inc(cb.autosize_cnt);

    <!-- create the item layer/textfield -->
    calc(itemlayername, 'comboboxitem_' + cbname + '_' + itemname);
    addlayer(get(itemlayername));
    copy(li, layer[get(itemlayername)]);



    li.loadstyle(panoramacombobox_kr_item_style);
    copyattributes(get(li), get(cb.cbdesign.style[panoramacombobox_kr_item_style]));




    copy(li.parent, cb.scrollarea.name);
    copy(li.keep, true);
    copy(li.cblayername, cb.name);
    copy(li.itemname, itemname);
    copy(li.html, itemcaption);
    set(li.onautosized, delayedcall(0,panoramacombobox_kr_item_autosize_update()) );
    set(li.onclick, panoramacombobox_kr_item_onclick() );

    copy(cb.item[get(itemname)].itemlayername, itemlayername);
  </action>


  <!-- onautosized callback from the item textfield -->
  <action name="panoramacombobox_kr_item_autosize_update" scope="local">
    copy(cb, layer[get(caller.cblayername)]);
    inc(cb.autosize_i);
    Math.max(cb.autosize_max_w, caller.width);
    Math.max(cb.autosize_max_h, caller.height);
    if(cb.autosize_i == cb.autosize_cnt, panoramacombobox_kr_align_items(get(cb.name)); );
  </action>


  <!-- align the image and set the combobox size -->
  <action name="panoramacombobox_kr_align_items" scope="local" args="cbname">
    copy(cb, layer[get(cbname)]);
    if(cb.marker.havemarkersize == false OR cb.scrollarea.loaded == false,
      <!-- wait until everything is ready -->
      delayedcall(calc(cb.name + '_waitformarkersize'), 0.01, panoramacombobox_kr_align_items(get(cbname)) );
      ,
      <!-- set the item positions and the combobox size -->
      if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );
      copy(sa, cb.scrollarea);
      calc(itemwidth, cb.margin GT 0 ? -2 * cb.margin : '100%');
      copy(mk_w, cb.marker.width);
      copy(item_cnt, cb.autosize_cnt);

      for(def(item_i, integer, 0), item_i LT item_cnt, inc(item_i),
        copy(li, layer[get(cb.item[get(item_i)].itemlayername)]);
        set(li.x, get(cb.margin));
        copy(li.width, itemwidth);
        copy(li.height, cb.autosize_max_h);
        calc(li.y, cb.margin + item_i * (cb.autosize_max_h + cb.margin));
      );

      if(cb.width == null OR cb.width == cb.lastautosizedwidth,
        <!-- no combobox width (or an autosized width) set - set the largest item width -->
        calc(cb.width, cb.margin + cb.autosize_max_w + 2 + mk_w + cb.margin);
        copy(cb.lastautosizedwidth, cb.width);
      );

      calc(cb.height, 2*cb.margin + cb.autosize_max_h);
      calc(sa.height, cb.margin + item_cnt*(cb.margin+cb.autosize_max_h));
      calc(sa.y, -(cb.selecteditemindex * (cb.autosize_max_h + cb.margin)));
      calc(cb.marker.x, cb.margin + mk_w/2);
      tween(layer[get(cb.name)].marker.y, calc(cb.margin + cb.selecteditemindex*(cb.autosize_max_h + cb.margin) + cb.autosize_max_h/2), 0.1);
    );
  </action>


  <!-- default onclick event for items: select the current item, close the list and call the item onclick event -->
  <action name="panoramacombobox_kr_item_onclick" scope="local">
    copy(cb, layer[get(caller.cblayername)]);
    copy(itemname, caller.itemname);
    panoramacombobox_kr_selectitem(get(cb.name), get(itemname));

    if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );

    if(cb.item[get(itemname)].onclick,
      <!-- call the onclick event after the combobox has closed -->
      delayedcall(get(cb.open_close_speed),
        copy(cb.curitem, cb.item[get(itemname)]);
        callwith(cb,
          cb.item[get(itemname)].onclick();
        );
      );
    );
  </action>


  <!-- select an item -->
  <action name="panoramacombobox_kr_selectitem" scope="local" args="cbname, itemname">
    if(global.combbox_item_pressed != true,
      copy(cb, layer[get(cbname)]);
      copy(cb.lastselecteditemindex, cb.selecteditemindex);
      copy(cb.selecteditemindex, cb.item[get(itemname)].index);
      <!-- call onchange event on selection change -->
      if(cb.lastselecteditemindex != cb.selecteditemindex AND cb.onchange,
        callwith(cb, onchange() );
      );
      if(global.openedcombobox === cb,
        <!-- when opened, just close to the selected item -->
        panoramacombobox_kr_closelist();
        ,
        if(layer[get(cbname)].scrollarea.loaded,
          layer[get(cbname)].scrollarea.stopscrolling();
          calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
          tween(layer[get(cbname)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), 0);
          tween(layer[get(cbname)].scrollarea.y, calc(-offset), 0, default, layer[get(cbname)].scrollarea.update(); );
        );
      );
    );
  </action>


  <!-- find an item by its caption, the global variable defined in 'returnvariable' will contain the index  -->
  <action name="panoramacombobox_kr_finditem" scope="local" args="cbname, itemcaption, returnvariable">
    copy(cb, layer[get(cbname)]);
    copy(item_cnt, cb.item.count);
    set(calc('global.' + returnvariable), -1);
    for(def(item_i, integer, 0), item_i LT  item_cnt, inc(item_i),
      if(cb.item[get(item_i)].caption == itemcaption,
        copy(calc('global.' + returnvariable), item_i);
        copy(item_i, item_cnt);
      );
    );
  </action>


  <!-- remove all items (to be able to add new ones) -->
  <action name="panoramacombobox_kr_removeitems" scope="local" args="cbname">
    copy(cb, layer[get(cbname)]);
    if(global.openedcombobox === cb, panoramacombobox_kr_closelist() );

    <!-- remove all item layers -->
    calc(item_i, cb.item.count - 1);
    loop(item_i GE 0,
      removelayer(get(cb.item[get(item_i)].itemlayername));
      dec(item_i);
    );

    <!-- reset the item information -->
    set(cb.item.count, 0);
    set(cb.autosize_i,0);
    set(cb.autosize_cnt, 0);
    set(cb.autosize_max_w, 0);
    set(cb.autosize_max_h, 0);
    set(cb.selecteditemindex, 0);
    set(cb.lastselecteditemindex, 0);
    if(cb.width == cb.lastautosizedwidth, set(cb.width, null));
  </action>


  <!-- open the combobox list -->
  <action name="panoramacombobox_kr_openlist" scope="local" args="cbname">
    <!-- if another combobox is already open, close that one first -->
    if(global.openedcombobox !== null, panoramacombobox_kr_closelist() );

    copy(cb, layer[get(cbname)]);
    copy(global.openedcombobox, cb);

    <!-- find the available screen space above or below the combobox -->
    calc(cbheight, 2*cb.margin + cb.autosize_max_h);
    set(lx1, 0);
    set(ly1, 0);
    copy(lx2, cb.pixelwidth);
    copy(ly2, cbheight);
    layertoscreen(get(cbname), lx1,ly1, lx1,ly1);
    layertoscreen(get(cbname), lx2,ly2, lx2,ly2);
    calc(space_above, ly1 - area.pixely);
    calc(space_below, area.pixelheight - (ly2 - area.pixely));

    <!-- the required space for full opening: -->
    calc(openheight, cb.margin + cb.autosize_cnt*(cb.margin+cb.autosize_max_h) );

    <!-- vertical centered alignment? -->
    calc(cb_edge, cb.edge ? cb.edge : cb.align);
    calc(iscentered, cb_edge == 'left' OR cb_edge == 'center' OR cb_edge == 'right');
    if(iscentered,
      calc(openheight_max, space_above + space_below);
      ,
      Math.max(openheight_max, space_above, space_below);
    );

    <!-- limit the height to the available space (minus some margin) -->
    Math.min(openheight, calc(openheight_max + cbheight - 20));

    <!-- need vertical offset? (depending on the available space and the align/edge setting) -->
    set(yoffset, null);
    calc(top_overflow, -ly1 + area.pixely + openheight/2);
    calc(bottom_overflow, ly2 - area.pixely + openheight/2 - area.pixelheight);
    if(cb.parent,
      <!-- no vertical offset inside other layers, do only a height clipping -->
      Math.max(max_overflow, top_overflow, bottom_overflow, 0);
      sub(openheight, max_overflow);
      ,
      if(iscentered,
        if(openheight GE (area.pixelheight - 20),
          set(yoffset,0);
          ,
          if(top_overflow GT 0, calc(yoffset, cb.y + top_overflow); );
          if(bottom_overflow GT 0, calc(yoffset, cb.y - bottom_overflow); );
        );
      ,
        indexoftxt(isbottomalign, get(cb_edge), 'bottom');
        if(space_above GT space_below,
          if(isbottomalign LT 0, calc(yoffset, cb.y - openheight + cbheight); );
          ,
          if(isbottomalign GE 0, calc(yoffset, cb.y - openheight + cbheight); );
        );
      );
    );
    if(yoffset != null,
      copy(cb.ybackup, cb.y);
      tween(layer[get(cbname)].y, calc(yoffset), get(cb.open_close_speed));
    );

    <!-- center the opened list at the selected item -->
    calc(centeritem_y, -1 * (cb.margin + cb.selecteditemindex*(cb.margin+cb.autosize_max_h) + cb.autosize_max_h/2 - openheight/2));
    clamp(centeritem_y, calc(openheight - cb.scrollarea.height), 0);

    <!-- apply the changes now -->
    tween(layer[get(cbname)].height, get(openheight), get(cb.open_close_speed));
    tween(layer[get(cbname)].scrollarea.y, get(centeritem_y), get(cb.open_close_speed), default, layer[get(cbname)].scrollarea.update(); );

    <!-- special html5/flash case:
       rotating textfields (the marker symbol here) are not possible in
       flash (a flashplayer limitation), so use a rotated symbol instead.
    -->
    if(device.html5,
      tween(layer[get(cbname)].marker.rotate, 90, get(cb.open_close_speed));
      ,
      set(layer[get(cbname)].marker.html, '◀');
    );

    <!-- enable the scrollarea to allow the user to drag it -->
    set(cb.scrollarea.enabled, true);

    <!-- install a global onmousedown event to close the list when clicking at the pano -->
    set(events[panoramacombobox_kr_xml_plugin_events].onmousedown, panoramacombobox_kr_closelist() );
  </action>


  <!-- close the current open list -->
  <action name="panoramacombobox_kr_closelist" scope="local">
    if(global.openedcombobox !== null,
      copy(cb, global.openedcombobox);
      delete(global.openedcombobox);

      <!-- clear the global onmousedown event -->
      set(events[panoramacombobox_kr_xml_plugin_events].onmousedown, null);

      <!-- disable the dragging -->
      set(cb.scrollarea.enabled, false);

      <!-- closing animations -->
      calc(offset, cb.selecteditemindex*(cb.autosize_max_h + cb.margin));
      if(cb.ybackup !== null, tween(cb.y, get(cb.ybackup), get(cb.open_close_speed)));
      layer[get(cb.name)].scrollarea.stopscrolling();
      tween(layer[get(cb.name)].height, calc(2*cb.margin + cb.autosize_max_h), get(cb.open_close_speed));
      tween(layer[get(cb.name)].scrollarea.y, calc(-offset), get(cb.open_close_speed), default, layer[get(cb.name)].scrollarea.update(); );
      tween(layer[get(cb.name)].marker.y, calc(cb.margin + offset + cb.autosize_max_h/2), get(cb.open_close_speed));
      <!-- special html5/flash case: rotate marker or change symbol -->
      if(device.html5,
        tween(layer[get(cb.name)].marker.rotate, 0, get(cb.open_close_speed));
        ,
        set(layer[get(cb.name)].marker.html, '▼');
      );
    );
  </action>

  <events name="panoramacomboboxStartTourEvents" onTourStart="set(layer[panoramacombobox].isStarted, true);if(layer[panoramacombobox].isLoaded,panoramacomboboxShow(););" keep="true" />


  <combobox name="panoramacombobox"
    design=""
    keep="true"
    visible="false"
    zorder="4"
    align="top"
    x="5" y="10"
    onloaded="panoramacomboboxLoaded();"
    isStarted="false"
    isLoaded="false"
    />

  <action name="panoramacomboboxLoaded">

    layer[panoramacombobox].removeAll();


    panoramacomboboxAddItem(pano12_title, pano12, pano12, false);
    panoramacomboboxAddItem(pano161_title, pano161, pano161, false);
    panoramacomboboxAddItem(pano216_title, pano216, pano216, false);
    panoramacomboboxAddItem(pano326_title, pano326, pano326, false);
    panoramacomboboxAddItem(pano417_title, pano417, pano417, false);
    panoramacomboboxAddItem(pano271_title, pano271, pano271, false);
    panoramacomboboxAddItem(pano106_title, pano106, pano106, false);
    panoramacomboboxAddItem(pano10_title, pano10, pano10, false);
    panoramacomboboxAddItem(pano11_title, pano11, pano11, false);
    set(layer[panoramacombobox].isLoaded, true);

    if(layer[panoramacombobox].isStarted,
      panoramacomboboxShow();
    );
  </action>


  <action name="panoramacomboboxAddItem">
    getmessage(caption, %1);

    indexoftxt(found, get(caption), '&amp;');
    if(found GE 0,
      subtxt(part1, get(caption), 0, get(found));
      add(found, 1);
      subtxt(part2, get(caption), get(found), get(caption.length));
      txtadd(caption, get(part1), '&amp;', get(part2));
    );
    if(%4,
      txtadd(title, "&#x00A0;&#x00A0;&#x00A0;", get(caption));
    ,
      set(title, get(caption));
    );

    layer[panoramacombobox].addNamedItem(%2, get(title), mainloadscene(%3));
  </action>

  <action name="panoramacomboboxUpdateLanguage">
    layer[panoramacombobox].closeList();
    layer[panoramacombobox].removeAll();

    panoramacomboboxAddItem(pano12_title, pano12, pano12, false);
    panoramacomboboxAddItem(pano161_title, pano161, pano161, false);
    panoramacomboboxAddItem(pano216_title, pano216, pano216, false);
    panoramacomboboxAddItem(pano326_title, pano326, pano326, false);
    panoramacomboboxAddItem(pano417_title, pano417, pano417, false);
    panoramacomboboxAddItem(pano271_title, pano271, pano271, false);
    panoramacomboboxAddItem(pano106_title, pano106, pano106, false);
    panoramacomboboxAddItem(pano10_title, pano10, pano10, false);
    panoramacomboboxAddItem(pano11_title, pano11, pano11, false);

    panoramacomboboxUpdateList();
  </action>

  <events name="panoramacomboboxEvents"
    hidetourcontrols="panoramacomboboxHide();"
    showtourcontrols="panoramacomboboxShow();"
    onnewpano="panoramacomboboxOnPanorama();"
    changetourlanguage="panoramacomboboxUpdateLanguage();"
    keep="true"
    />

  <action name="panoramacomboboxHide">
    set(layer[panoramacombobox].visible, false);
  </action>

  <action name="panoramacomboboxShow">
  if(layer[panoramacombobox].isLoaded,
    if (layer[panoramacombobox].item.count GT 0,
      set(layer[panoramacombobox].visible, true);
    ,
      set(layer[panoramacombobox].visible, false);
    );
  ,
    set(layer[panoramacombobox].visible, false);
  );
  </action>

  <action name="panoramacomboboxOnPanorama">
    if(layer[panoramacombobox].isLoaded,
      panoramacomboboxUpdateList();
    ,
      delayedcall(0.2, panoramacomboboxOnPanorama);
    );
  </action>

  <action name="panoramacomboboxUpdateList">
    set(itemtoselect, get(scene[get(xml.scene)].name));
    layer[panoramacombobox].selectItemByName(get(itemtoselect));
  </action>

  <action name="panoramacomboboxOpenComboboxList">
    layer[panoramacombobox].openList();
  </action>

  <action name="panoramacomboboxCloseComboboxList">
    layer[panoramacombobox].closeList();
  </action>

<!-- ********** -->
<!-- LogoShalimar -->
<!-- id : logo -->
<!-- ********** -->


  <layer align="topleft"
         x="10"
         y="10"
         zorder="5"
         name="logo"
         keep="true"
         visible="false"
         capture="false"

			enabled="false"
         url="%FIRSTXML%/graphics/logo/logoshalimar_small.png" 
         handcursor="false"

         height="7%"
         width="prop"

         />

  <events name="logoevents" 
    onTourStart="showlogo();"
    keep="true" />

  <action name="hidelogo">
    set(layer[logo].visible, false);
  </action>
  <action name="showlogo">
      set(layer[logo].visible, true);
  </action>





<!-- ********** -->
<!-- LogoSkyGarden -->
<!-- id : logo1 -->
<!-- ********** -->


  <layer align="topright"
         x="10"
         y="10"
         zorder="6"
         name="logo1"
         keep="true"
         visible="false"
         capture="false"

			enabled="false"
         url="%FIRSTXML%/graphics/logo1/logoskygarden_small.png" 
         handcursor="false"

         height="7%"
         width="prop"

         />

  <events name="logo1events" 
    onTourStart="showlogo1();"
    keep="true" />

  <action name="hidelogo1">
    set(layer[logo1].visible, false);
  </action>
  <action name="showlogo1">
      set(layer[logo1].visible, true);
  </action>




 <!-- 360Images Call Out Titles Plugin -->        <include url="%FIRSTXML%/graphics/callouttitles.xml"/>  <callout author_context="true"/> <style distancepopup="2" distancepopup.tablet="3" distancepopup.mobile="5" visible="false" callout_type="centerscreen" callout_type.mobile="centerscreen" callout_type.tablet="centerscreen" name="calloutright" type="container" width="10" height="10"  bgroundedge="10"  bgcolor="0x0e7a8c" bgalpha="1.00" bgborder="2 0xffffff 1.00" toheight="30" pumpitup="true" pumpitup.mobile="true" pumpitup.tablet="true"  rotate="0"   minfov="180" maxfov="1" minfov.mobile="180" maxfov.mobile="1" minfov.tablet="180" maxfov.tablet="1" onloaded=" txtadd(parentspot,'hotspot[',get(name),']');  txtadd(callout_pulse,'callout_pulse_',get(name)); addlayer(get(callout_pulse)); layer[get(callout_pulse)].loadstyle(call_out_titlescallout_pulse); copy(layer[get(callout_pulse)].parent,parentspot);   txtadd(callout_line,'callout_line_',get(name)); addlayer(get(callout_line)); copy(hotspot[get(name)].callout_line,callout_line); layer[get(callout_line)].loadstyle(call_out_titlescallout_line); copy(layer[get(callout_line)].parent,parentspot); copy(layer[get(callout_line)].x,xpoint); copy(layer[get(callout_line)].y,ypoint);  txtadd(callout_line_vertical,'callout_line_vertical_',get(name)); addlayer(get(callout_line_vertical)); copy(hotspot[get(name)].callout_line_vertical,callout_line_vertical); layer[get(callout_line_vertical)].loadstyle(call_out_titlescallout_line_vertical); txtadd(parentlayer,'layer[',get(callout_line),']'); copy(layer[get(callout_line_vertical)].parent,parentlayer); txtadd(callout_title,'callout_title_',get(name)); addlayer(get(callout_title)); copy(hotspot[get(name)].callout_title,callout_title); layer[get(callout_title)].loadstyle(call_out_titlescallout_title); txtadd(parentlayer2,'layer[',get(callout_line_vertical),']'); copy(layer[get(callout_title)].parent,parentlayer2); getmessage(montitre, get(tooltip)); copy(layer[get(callout_title)].html,montitre);  txtadd(callout_desc,'callout_desc_',get(name)); addlayer(get(callout_desc)); copy(hotspot[get(name)].callout_desc,callout_desc); layer[get(callout_desc)].loadstyle(call_out_titlescallout_desc); copy(layer[get(callout_desc)].parent,callout_title); getmessage(madesc, get(descriptionid)); copy(layer[get(callout_desc)].html,madesc);  if(hotspot[get(name)].onclick, copy(layer[get(callout_line_vertical)].onclick,hotspot[get(name)].onclick);set(layer[get(callout_line_vertical)].bgcapture,true)); if(hotspot[get(name)].callout_type == onuserclick, set(hotspot[get(name)].onclick,oncallout());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); if(hotspot[get(name)].callout_type == onover, set(hotspot[get(name)].onover,oncallout());set(hotspot[get(name)].onout,oncallin());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); set(events[testshotspots].onviewchanged,testhotspots();) "  oncallout="animate_callout(get(callout_line), get(callout_line_vertical), get(callout_title), get(callout_desc),get(toheight));" oncallin="animate_callin(get(callout_line), get(callout_line_vertical));" /> <style name="call_out_titlescallout_line" type="container" width="2" height="0" bgalpha="1" bgcolor="0xffffff" align="top" edge="bottom" /> <style name="call_out_titlescallout_line_vertical" type="container" width="0" height="0" bgcolor="0xffffff"   rotate="-0"   bgborder="0,0,0,2 0xffffff"        edge="bottomleft" align="topright"        maskchildren="true" /> <style name="call_out_titlescallout_title" type="text" enabled="false"  align="topleft" ox="10"    roundedge="5"   bg="true" bgcolor="0xffffff" bgalpha="1"   bgborder="false"   css="color:#0e7a8c;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titlescallout_desc" type="text" enabled="false"  align="bottomleft" edge="topleft"    roundedge="5"   bg="true" bgcolor="0x0e7a8c" bgalpha="1"   bgborder="false"   css="color:#ffffff;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titlescallout_pulse" type="container" align="center" bg="false" bgborder="3 0xffffff 1.00"  bgroundedge="calc:10 * 2"  width="10" height="10" onloaded="pulse(get(name))"/>  <!-- 360Images Call Out Titles Plugin -->      <callout author_context="true"/> <style distancepopup="2" distancepopup.tablet="3" distancepopup.mobile="5" visible="false" callout_type="centerscreen" callout_type.mobile="centerscreen" callout_type.tablet="centerscreen" name="calloutleft" type="container" width="10" height="10"  bgroundedge="10"  bgcolor="0x0e7a8c" bgalpha="1.00" bgborder="2 0xffffff 1.00" toheight="30" pumpitup="true" pumpitup.mobile="true" pumpitup.tablet="true"   rotate="-0"  minfov="180" maxfov="1" minfov.mobile="180" maxfov.mobile="1" minfov.tablet="180" maxfov.tablet="1" onloaded=" txtadd(parentspot,'hotspot[',get(name),']');  txtadd(callout_pulse,'callout_pulse_',get(name)); addlayer(get(callout_pulse)); layer[get(callout_pulse)].loadstyle(call_out_titles1callout_pulse); copy(layer[get(callout_pulse)].parent,parentspot);   txtadd(callout_line,'callout_line_',get(name)); addlayer(get(callout_line)); copy(hotspot[get(name)].callout_line,callout_line); layer[get(callout_line)].loadstyle(call_out_titles1callout_line); copy(layer[get(callout_line)].parent,parentspot); copy(layer[get(callout_line)].x,xpoint); copy(layer[get(callout_line)].y,ypoint);  txtadd(callout_line_vertical,'callout_line_vertical_',get(name)); addlayer(get(callout_line_vertical)); copy(hotspot[get(name)].callout_line_vertical,callout_line_vertical); layer[get(callout_line_vertical)].loadstyle(call_out_titles1callout_line_vertical); txtadd(parentlayer,'layer[',get(callout_line),']'); copy(layer[get(callout_line_vertical)].parent,parentlayer); txtadd(callout_title,'callout_title_',get(name)); addlayer(get(callout_title)); copy(hotspot[get(name)].callout_title,callout_title); layer[get(callout_title)].loadstyle(call_out_titles1callout_title); txtadd(parentlayer2,'layer[',get(callout_line_vertical),']'); copy(layer[get(callout_title)].parent,parentlayer2); getmessage(montitre, get(tooltip)); copy(layer[get(callout_title)].html,montitre);  txtadd(callout_desc,'callout_desc_',get(name)); addlayer(get(callout_desc)); copy(hotspot[get(name)].callout_desc,callout_desc); layer[get(callout_desc)].loadstyle(call_out_titles1callout_desc); copy(layer[get(callout_desc)].parent,callout_title); getmessage(madesc, get(descriptionid)); copy(layer[get(callout_desc)].html,madesc);  if(hotspot[get(name)].onclick, copy(layer[get(callout_line_vertical)].onclick,hotspot[get(name)].onclick);set(layer[get(callout_line_vertical)].bgcapture,true)); if(hotspot[get(name)].callout_type == onuserclick, set(hotspot[get(name)].onclick,oncallout());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); if(hotspot[get(name)].callout_type == onover, set(hotspot[get(name)].onover,oncallout());set(hotspot[get(name)].onout,oncallin());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); set(events[testshotspots].onviewchanged,testhotspots();) "  oncallout="animate_callout(get(callout_line), get(callout_line_vertical), get(callout_title), get(callout_desc),get(toheight));" oncallin="animate_callin(get(callout_line), get(callout_line_vertical));" /> <style name="call_out_titles1callout_line" type="container" width="2" height="0" bgalpha="1" bgcolor="0xffffff" align="top" edge="bottom" /> <style name="call_out_titles1callout_line_vertical" type="container" width="0" height="0" bgcolor="0xffffff"     rotate="0"   bgborder="0,2,0,0 0xffffff"        edge="bottomright" align="topleft"      maskchildren="true" /> <style name="call_out_titles1callout_title" type="text" enabled="false"   align="topright" ox="-10"   roundedge="5"   bg="true" bgcolor="0xffffff" bgalpha="1"   bgborder="false"   css="color:#0e7a8c;font-family:Arial;font-size:14px;text-align:right;"  padding="5 10" /> <style name="call_out_titles1callout_desc" type="text" enabled="false"   align="bottomright" edge="topright"   roundedge="5"   bg="true" bgcolor="0x0e7a8c" bgalpha="1"   bgborder="false"   css="color:#ffffff;font-family:Arial;font-size:14px;text-align:right;"  padding="5 10" /> <style name="call_out_titles1callout_pulse" type="container" align="center" bg="false" bgborder="3 0xffffff 1.00"  bgroundedge="calc:10 * 2"  width="10" height="10" onloaded="pulse(get(name))"/>  <!-- 360Images Call Out Titles Plugin -->      <callout author_context="true"/> <style distancepopup="2" distancepopup.tablet="3" distancepopup.mobile="5" visible="false" callout_type="centerscreen" callout_type.mobile="centerscreen" callout_type.tablet="centerscreen" name="calloutleftlong" type="container" width="10" height="10"  bgroundedge="10"  bgcolor="0x0e7a8c" bgalpha="1.00" bgborder="2 0xffffff 1.00" toheight="80" pumpitup="true" pumpitup.mobile="true" pumpitup.tablet="true"   rotate="-0"  minfov="180" maxfov="1" minfov.mobile="180" maxfov.mobile="1" minfov.tablet="180" maxfov.tablet="1" onloaded=" txtadd(parentspot,'hotspot[',get(name),']');  txtadd(callout_pulse,'callout_pulse_',get(name)); addlayer(get(callout_pulse)); layer[get(callout_pulse)].loadstyle(call_out_titles2callout_pulse); copy(layer[get(callout_pulse)].parent,parentspot);   txtadd(callout_line,'callout_line_',get(name)); addlayer(get(callout_line)); copy(hotspot[get(name)].callout_line,callout_line); layer[get(callout_line)].loadstyle(call_out_titles2callout_line); copy(layer[get(callout_line)].parent,parentspot); copy(layer[get(callout_line)].x,xpoint); copy(layer[get(callout_line)].y,ypoint);  txtadd(callout_line_vertical,'callout_line_vertical_',get(name)); addlayer(get(callout_line_vertical)); copy(hotspot[get(name)].callout_line_vertical,callout_line_vertical); layer[get(callout_line_vertical)].loadstyle(call_out_titles2callout_line_vertical); txtadd(parentlayer,'layer[',get(callout_line),']'); copy(layer[get(callout_line_vertical)].parent,parentlayer); txtadd(callout_title,'callout_title_',get(name)); addlayer(get(callout_title)); copy(hotspot[get(name)].callout_title,callout_title); layer[get(callout_title)].loadstyle(call_out_titles2callout_title); txtadd(parentlayer2,'layer[',get(callout_line_vertical),']'); copy(layer[get(callout_title)].parent,parentlayer2); getmessage(montitre, get(tooltip)); copy(layer[get(callout_title)].html,montitre);  txtadd(callout_desc,'callout_desc_',get(name)); addlayer(get(callout_desc)); copy(hotspot[get(name)].callout_desc,callout_desc); layer[get(callout_desc)].loadstyle(call_out_titles2callout_desc); copy(layer[get(callout_desc)].parent,callout_title); getmessage(madesc, get(descriptionid)); copy(layer[get(callout_desc)].html,madesc);  if(hotspot[get(name)].onclick, copy(layer[get(callout_line_vertical)].onclick,hotspot[get(name)].onclick);set(layer[get(callout_line_vertical)].bgcapture,true)); if(hotspot[get(name)].callout_type == onuserclick, set(hotspot[get(name)].onclick,oncallout());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); if(hotspot[get(name)].callout_type == onover, set(hotspot[get(name)].onover,oncallout());set(hotspot[get(name)].onout,oncallin());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); set(events[testshotspots].onviewchanged,testhotspots();) "  oncallout="animate_callout(get(callout_line), get(callout_line_vertical), get(callout_title), get(callout_desc),get(toheight));" oncallin="animate_callin(get(callout_line), get(callout_line_vertical));" /> <style name="call_out_titles2callout_line" type="container" width="2" height="0" bgalpha="1" bgcolor="0xffffff" align="top" edge="bottom" /> <style name="call_out_titles2callout_line_vertical" type="container" width="0" height="0" bgcolor="0xffffff"     rotate="0"   bgborder="0,2,0,0 0xffffff"        edge="bottomright" align="topleft"      maskchildren="true" /> <style name="call_out_titles2callout_title" type="text" enabled="false"   align="topright" ox="-10"   roundedge="5"   bg="true" bgcolor="0xffffff" bgalpha="1"   bgborder="false"   css="color:#0e7a8c;font-family:Arial;font-size:14px;text-align:right;"  padding="5 10" /> <style name="call_out_titles2callout_desc" type="text" enabled="false"   align="bottomright" edge="topright"   roundedge="5"   bg="true" bgcolor="0x0e7a8c" bgalpha="1"   bgborder="false"   css="color:#ffffff;font-family:Arial;font-size:14px;text-align:right;"  padding="5 10" /> <style name="call_out_titles2callout_pulse" type="container" align="center" bg="false" bgborder="3 0xffffff 1.00"  bgroundedge="calc:10 * 2"  width="10" height="10" onloaded="pulse(get(name))"/>  <!-- 360Images Call Out Titles Plugin -->      <callout author_context="true"/> <style distancepopup="2" distancepopup.tablet="3" distancepopup.mobile="5" visible="false" callout_type="centerscreen" callout_type.mobile="centerscreen" callout_type.tablet="centerscreen" name="calloutrightlong" type="container" width="10" height="10"  bgroundedge="10"  bgcolor="0x0e7a8c" bgalpha="1.00" bgborder="2 0xffffff 1.00" toheight="80" pumpitup="true" pumpitup.mobile="true" pumpitup.tablet="true"  rotate="0"   minfov="180" maxfov="1" minfov.mobile="180" maxfov.mobile="1" minfov.tablet="180" maxfov.tablet="1" onloaded=" txtadd(parentspot,'hotspot[',get(name),']');  txtadd(callout_pulse,'callout_pulse_',get(name)); addlayer(get(callout_pulse)); layer[get(callout_pulse)].loadstyle(call_out_titles3callout_pulse); copy(layer[get(callout_pulse)].parent,parentspot);   txtadd(callout_line,'callout_line_',get(name)); addlayer(get(callout_line)); copy(hotspot[get(name)].callout_line,callout_line); layer[get(callout_line)].loadstyle(call_out_titles3callout_line); copy(layer[get(callout_line)].parent,parentspot); copy(layer[get(callout_line)].x,xpoint); copy(layer[get(callout_line)].y,ypoint);  txtadd(callout_line_vertical,'callout_line_vertical_',get(name)); addlayer(get(callout_line_vertical)); copy(hotspot[get(name)].callout_line_vertical,callout_line_vertical); layer[get(callout_line_vertical)].loadstyle(call_out_titles3callout_line_vertical); txtadd(parentlayer,'layer[',get(callout_line),']'); copy(layer[get(callout_line_vertical)].parent,parentlayer); txtadd(callout_title,'callout_title_',get(name)); addlayer(get(callout_title)); copy(hotspot[get(name)].callout_title,callout_title); layer[get(callout_title)].loadstyle(call_out_titles3callout_title); txtadd(parentlayer2,'layer[',get(callout_line_vertical),']'); copy(layer[get(callout_title)].parent,parentlayer2); getmessage(montitre, get(tooltip)); copy(layer[get(callout_title)].html,montitre);  txtadd(callout_desc,'callout_desc_',get(name)); addlayer(get(callout_desc)); copy(hotspot[get(name)].callout_desc,callout_desc); layer[get(callout_desc)].loadstyle(call_out_titles3callout_desc); copy(layer[get(callout_desc)].parent,callout_title); getmessage(madesc, get(descriptionid)); copy(layer[get(callout_desc)].html,madesc);  if(hotspot[get(name)].onclick, copy(layer[get(callout_line_vertical)].onclick,hotspot[get(name)].onclick);set(layer[get(callout_line_vertical)].bgcapture,true)); if(hotspot[get(name)].callout_type == onuserclick, set(hotspot[get(name)].onclick,oncallout());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); if(hotspot[get(name)].callout_type == onover, set(hotspot[get(name)].onover,oncallout());set(hotspot[get(name)].onout,oncallin());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); set(events[testshotspots].onviewchanged,testhotspots();) "  oncallout="animate_callout(get(callout_line), get(callout_line_vertical), get(callout_title), get(callout_desc),get(toheight));" oncallin="animate_callin(get(callout_line), get(callout_line_vertical));" /> <style name="call_out_titles3callout_line" type="container" width="2" height="0" bgalpha="1" bgcolor="0xffffff" align="top" edge="bottom" /> <style name="call_out_titles3callout_line_vertical" type="container" width="0" height="0" bgcolor="0xffffff"   rotate="-0"   bgborder="0,0,0,2 0xffffff"        edge="bottomleft" align="topright"        maskchildren="true" /> <style name="call_out_titles3callout_title" type="text" enabled="false"  align="topleft" ox="10"    roundedge="5"   bg="true" bgcolor="0xffffff" bgalpha="1"   bgborder="false"   css="color:#0e7a8c;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titles3callout_desc" type="text" enabled="false"  align="bottomleft" edge="topleft"    roundedge="5"   bg="true" bgcolor="0x0e7a8c" bgalpha="1"   bgborder="false"   css="color:#ffffff;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titles3callout_pulse" type="container" align="center" bg="false" bgborder="3 0xffffff 1.00"  bgroundedge="calc:10 * 2"  width="10" height="10" onloaded="pulse(get(name))"/>  <!-- 360Images Call Out Titles Plugin -->      <callout author_context="true"/> <style distancepopup="2" distancepopup.tablet="3" distancepopup.mobile="5" visible="false" callout_type="centerscreen" callout_type.mobile="centerscreen" callout_type.tablet="centerscreen" name="calloutzero" type="container" width="10" height="10"  bgroundedge="10"  bgcolor="0x0e7a8c" bgalpha="1.00" bgborder="2 0xffffff 1.00" toheight="0" pumpitup="true" pumpitup.mobile="true" pumpitup.tablet="true"  rotate="0"   minfov="180" maxfov="1" minfov.mobile="180" maxfov.mobile="1" minfov.tablet="180" maxfov.tablet="1" onloaded=" txtadd(parentspot,'hotspot[',get(name),']');  txtadd(callout_pulse,'callout_pulse_',get(name)); addlayer(get(callout_pulse)); layer[get(callout_pulse)].loadstyle(call_out_titles4callout_pulse); copy(layer[get(callout_pulse)].parent,parentspot);   txtadd(callout_line,'callout_line_',get(name)); addlayer(get(callout_line)); copy(hotspot[get(name)].callout_line,callout_line); layer[get(callout_line)].loadstyle(call_out_titles4callout_line); copy(layer[get(callout_line)].parent,parentspot); copy(layer[get(callout_line)].x,xpoint); copy(layer[get(callout_line)].y,ypoint);  txtadd(callout_line_vertical,'callout_line_vertical_',get(name)); addlayer(get(callout_line_vertical)); copy(hotspot[get(name)].callout_line_vertical,callout_line_vertical); layer[get(callout_line_vertical)].loadstyle(call_out_titles4callout_line_vertical); txtadd(parentlayer,'layer[',get(callout_line),']'); copy(layer[get(callout_line_vertical)].parent,parentlayer); txtadd(callout_title,'callout_title_',get(name)); addlayer(get(callout_title)); copy(hotspot[get(name)].callout_title,callout_title); layer[get(callout_title)].loadstyle(call_out_titles4callout_title); txtadd(parentlayer2,'layer[',get(callout_line_vertical),']'); copy(layer[get(callout_title)].parent,parentlayer2); getmessage(montitre, get(tooltip)); copy(layer[get(callout_title)].html,montitre);  txtadd(callout_desc,'callout_desc_',get(name)); addlayer(get(callout_desc)); copy(hotspot[get(name)].callout_desc,callout_desc); layer[get(callout_desc)].loadstyle(call_out_titles4callout_desc); copy(layer[get(callout_desc)].parent,callout_title); getmessage(madesc, get(descriptionid)); copy(layer[get(callout_desc)].html,madesc);  if(hotspot[get(name)].onclick, copy(layer[get(callout_line_vertical)].onclick,hotspot[get(name)].onclick);set(layer[get(callout_line_vertical)].bgcapture,true)); if(hotspot[get(name)].callout_type == onuserclick, set(hotspot[get(name)].onclick,oncallout());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); if(hotspot[get(name)].callout_type == onover, set(hotspot[get(name)].onover,oncallout());set(hotspot[get(name)].onout,oncallin());set(hotspot[get(name)].bgcapture,true);set(hotspot[get(name)].handcursor,true)); set(events[testshotspots].onviewchanged,testhotspots();) "  oncallout="animate_callout(get(callout_line), get(callout_line_vertical), get(callout_title), get(callout_desc),get(toheight));" oncallin="animate_callin(get(callout_line), get(callout_line_vertical));" /> <style name="call_out_titles4callout_line" type="container" width="2" height="0" bgalpha="1" bgcolor="0xffffff" align="top" edge="bottom" /> <style name="call_out_titles4callout_line_vertical" type="container" width="0" height="0" bgcolor="0xffffff"   rotate="-0"   bgborder="0,0,0,2 0xffffff"        edge="bottomleft" align="topright"        maskchildren="true" /> <style name="call_out_titles4callout_title" type="text" enabled="false"  align="topleft" ox="10"    roundedge="5"   bg="true" bgcolor="0xffffff" bgalpha="1"   bgborder="false"   css="color:#0e7a8c;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titles4callout_desc" type="text" enabled="false"  align="bottomleft" edge="topleft"    roundedge="5"   bg="true" bgcolor="0x0e7a8c" bgalpha="1"   bgborder="false"   css="color:#ffffff;font-family:Arial;font-size:14px;text-align:left;"  padding="5 10" /> <style name="call_out_titles4callout_pulse" type="container" align="center" bg="false" bgborder="3 0xffffff 1.00"  bgroundedge="calc:10 * 2"  width="10" height="10" onloaded="pulse(get(name))"/> 
<!-- ********** -->
<!-- Button Hotels -->
<!-- id : buttonForASinglePano -->
<!-- ********** -->

  <layer name="buttonForASinglePano"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano/location_pin-06.png"
         align="bottom"
         x="-40"
         y="10"
         zorder="12"
         visible="false"
         onclick="buttonForASinglePanoOnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePanoOnClick">
          mainloadscene(pano216);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePanoevents"
    onTourStart="showbuttonForASinglePano();"
    hidetourcontrols="hidebuttonForASinglePano();"
    showtourcontrols="showbuttonForASinglePano();"

    onPanoStart="showbuttonForASinglePano();"

    keep="true" />
  <action name="hidebuttonForASinglePano">set(layer[buttonForASinglePano].visible, false);</action>
  <action name="showbuttonForASinglePano">
    set(display_buttonForASinglePano, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano == panogroup15, set(display_buttonForASinglePano, true); );

    );
    if (display_buttonForASinglePano,
      set(layer[buttonForASinglePano].visible, true);
    ,
      hidebuttonForASinglePano();
    );
  </action>



<!-- ********** -->
<!-- Button GovtAuth -->
<!-- id : buttonForASinglePano1 -->
<!-- ********** -->

  <layer name="buttonForASinglePano1"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano1/location_pin-05.png"
         align="bottom"
         x="157"
         y="10"
         zorder="13"
         visible="false"
         onclick="buttonForASinglePano1OnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePano1OnClick">
          mainloadscene(pano417);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePano1events"
    onTourStart="showbuttonForASinglePano1();"
    hidetourcontrols="hidebuttonForASinglePano1();"
    showtourcontrols="showbuttonForASinglePano1();"

    onPanoStart="showbuttonForASinglePano1();"

    keep="true" />
  <action name="hidebuttonForASinglePano1">set(layer[buttonForASinglePano1].visible, false);</action>
  <action name="showbuttonForASinglePano1">
    set(display_buttonForASinglePano1, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano1, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano1 == panogroup15, set(display_buttonForASinglePano1, true); );

    );
    if (display_buttonForASinglePano1,
      set(layer[buttonForASinglePano1].visible, true);
    ,
      hidebuttonForASinglePano1();
    );
  </action>



<!-- ********** -->
<!-- Button Hospitals -->
<!-- id : buttonForASinglePano2 -->
<!-- ********** -->

  <layer name="buttonForASinglePano2"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano2/location_pin-03.png"
         align="bottom"
         x="-100"
         y="10"
         zorder="14"
         visible="false"
         onclick="buttonForASinglePano2OnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePano2OnClick">
          mainloadscene(pano161);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePano2events"
    onTourStart="showbuttonForASinglePano2();"
    hidetourcontrols="hidebuttonForASinglePano2();"
    showtourcontrols="showbuttonForASinglePano2();"

    onPanoStart="showbuttonForASinglePano2();"

    keep="true" />
  <action name="hidebuttonForASinglePano2">set(layer[buttonForASinglePano2].visible, false);</action>
  <action name="showbuttonForASinglePano2">
    set(display_buttonForASinglePano2, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano2, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano2 == panogroup15, set(display_buttonForASinglePano2, true); );

    );
    if (display_buttonForASinglePano2,
      set(layer[buttonForASinglePano2].visible, true);
    ,
      hidebuttonForASinglePano2();
    );
  </action>



<!-- ********** -->
<!-- Button Malls -->
<!-- id : buttonForASinglePano3 -->
<!-- ********** -->

  <layer name="buttonForASinglePano3"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano3/location_pin-04.png"
         align="bottom"
         x="23"
         y="10"
         zorder="15"
         visible="false"
         onclick="buttonForASinglePano3OnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePano3OnClick">
          mainloadscene(pano326);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePano3events"
    onTourStart="showbuttonForASinglePano3();"
    hidetourcontrols="hidebuttonForASinglePano3();"
    showtourcontrols="showbuttonForASinglePano3();"

    onPanoStart="showbuttonForASinglePano3();"

    keep="true" />
  <action name="hidebuttonForASinglePano3">set(layer[buttonForASinglePano3].visible, false);</action>
  <action name="showbuttonForASinglePano3">
    set(display_buttonForASinglePano3, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano3, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano3 == panogroup15, set(display_buttonForASinglePano3, true); );

    );
    if (display_buttonForASinglePano3,
      set(layer[buttonForASinglePano3].visible, true);
    ,
      hidebuttonForASinglePano3();
    );
  </action>



<!-- ********** -->
<!-- Button Connectivity -->
<!-- id : buttonForASinglePano4 -->
<!-- ********** -->

  <layer name="buttonForASinglePano4"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano4/location_pin-01.png"
         align="bottom"
         x="87"
         y="10"
         zorder="16"
         visible="false"
         onclick="buttonForASinglePano4OnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePano4OnClick">
          mainloadscene(pano271);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePano4events"
    onTourStart="showbuttonForASinglePano4();"
    hidetourcontrols="hidebuttonForASinglePano4();"
    showtourcontrols="showbuttonForASinglePano4();"

    onPanoStart="showbuttonForASinglePano4();"

    keep="true" />
  <action name="hidebuttonForASinglePano4">set(layer[buttonForASinglePano4].visible, false);</action>
  <action name="showbuttonForASinglePano4">
    set(display_buttonForASinglePano4, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano4, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano4 == panogroup15, set(display_buttonForASinglePano4, true); );

    );
    if (display_buttonForASinglePano4,
      set(layer[buttonForASinglePano4].visible, true);
    ,
      hidebuttonForASinglePano4();
    );
  </action>



<!-- ********** -->
<!-- Button Institutes -->
<!-- id : buttonForASinglePano5 -->
<!-- ********** -->

  <layer name="buttonForASinglePano5"
         keep="true"
         url="%FIRSTXML%/graphics/buttonforasinglepano5/location_pin-02.png"
         align="bottom"
         x="-160"
         y="10"
         zorder="17"
         visible="false"
         onclick="buttonForASinglePano5OnClick"
         height="90"
         width="prop"
         />



  <action name="buttonForASinglePano5OnClick">
          mainloadscene(pano106);lookat(get(panoview.h), get(panoview.v), get(panoview.fov));


  </action>

  <events name="buttonForASinglePano5events"
    onTourStart="showbuttonForASinglePano5();"
    hidetourcontrols="hidebuttonForASinglePano5();"
    showtourcontrols="showbuttonForASinglePano5();"

    onPanoStart="showbuttonForASinglePano5();"

    keep="true" />
  <action name="hidebuttonForASinglePano5">set(layer[buttonForASinglePano5].visible, false);</action>
  <action name="showbuttonForASinglePano5">
    set(display_buttonForASinglePano5, false);
    if(tour_displaycontrols,

    set(currentgroup_buttonForASinglePano5, get(scene[get(xml.scene)].group));
    if (currentgroup_buttonForASinglePano5 == panogroup15, set(display_buttonForASinglePano5, true); );

    );
    if (display_buttonForASinglePano5,
      set(layer[buttonForASinglePano5].visible, true);
    ,
      hidebuttonForASinglePano5();
    );
  </action>



<!-- ********** -->
<!-- Compass -->
<!-- id : compass -->
<!-- ********** -->

  <layer name="compassbackground"
         url="%FIRSTXML%/graphics/compass/compassbg0e7a8c.png"
         keep="true"
         handcursor="false"
         capture="false"
         align="topleft"
         x="25"
         y="55"
         zorder="18"
         visible="false"
         active="true"
         started="false"

         height="70"
         width="70"

         >




    <layer name="compasspointer"
           url="%FIRSTXML%/graphics/compass/compasspointer000000.png"
           keep="true"
           align="center"
           handcursor="false"
           capture="false"
           zorder="1"
           height="100%"
           width="100%"
          />
  </layer>

  <events name="compassevts"
          keep="true"
          onnewpano="compassUpdateOrientation();"
          onviewchanged="compassUpdateOrientation();"
    onTourStart="set(layer[compassbackground].started, true);showcompass();"
          hidetourcontrols="hidecompass();"
          showtourcontrols="set(layer[compassbackground].started, true);showcompass();"
         />

  <action name="compassUpdateOrientation">
    if(scene[get(xml.scene)].planar,
      set(layer[compassbackground].active, false);
      hidecompass();
    ,

      set(layer[compassbackground].active, true);
      mod(compasshlookat, view.hlookat, 360);
      mul(compassheading, -1, get(scene[get(xml.scene)].heading));
      if (compassheading == null, set(compassheading, 0));
      sub(layer[compasspointer].rotate, compasshlookat, compassheading);

      showcompass();
    );
  </action>

 
  <action name="hidecompass">
    set(layer[compassbackground].visible, false);
  </action>
  <action name="showcompass">
    if(tour_displaycontrols,
    if(layer[compassbackground].active AND layer[compassbackground].started,set(layer[compassbackground].visible, true););
    ,hidecompass(););
  </action>


<action name="viewControlZoomIn">
	if(%1,
		if(%2,
			if(%2 LT view.fovmin,
				zoomto(get(view.fovmin));
			,
				if(%2 LT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, -1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, -1);
	);
</action>
<action name="viewControlZoomOut">
	if(%1,
		if(%2,
			if(%2 GT view.fovmax,
				zoomto(get(view.fovmax));
			,
				if(%2 GT view.fov,
					zoomto(%2);
				);
			);
		,
			set(fov_moveforce, +1);
			delayedcall(0.1, viewControlZoomStop());
		);
	,
		set(fov_moveforce, +1);
	);
</action>
<action name="viewControlZoomStop">
	set(fov_moveforce, 0);
</action>

</krpano>