var imgbar_state=0,imgbar_savedheight=0,imgbar_savedlogopos=0,imgbar_hlogo=52,imgbar_ylogo=4,imgbar_ytext=12,imgbar_slidesteps=15;function nextRandomImageBar(){var a=document.getElementById("krpano_imagebar"),b=Math.floor(Math.random()*(krpano_imagebars.length/2-1+0.5));a.style.backgroundImage="url("+krpano_rootpath+krpano_imagebars[2*b]+")";a.className="panoindex"+b}
function getWindowHeight(){var a=0;if(typeof window.innerHeight=="number")a=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;return a}function oc(a){for(var b={},c=0;c<a.length;c++)b[a[c]]="";return b}
function showFlash(){var a=document.getElementById("krpano_imagebar");a=parseInt(String(a.className).slice(9),10);if(a>=0&&a<krpano_imagebars.length/2){a='<iframe id="iframeview" src="'+(krpano_rootpath+"krpano.html?xml="+krpano_imagebars[2*a+1]+"&krpanologo=false")+'" name="Bildframe'+a+'" width="100%" height="100%" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="z-Index:101"><p style="padding:10%;"></iframe>';document.getElementById("krpano_imagebar").innerHTML=a}else hideImagebarPano()}
function hideFlash(){document.getElementById("krpano_imagebar").innerHTML=""}function imgbar_getspace(){var a=getWindowHeight(),b=document.getElementById("krpano_imagebar").offsetTop,c=imgbar_hlogo+imgbar_ylogo;if(c<16)c=16;a=a-b-c;if(a<imgbar_savedheight)a=imgbar_savedheight;return a}
function incHeightImageBar(){if(imgbar_state==0){imgbar_state=1;document.getElementById("krpano_showpano").style.display="none";document.getElementById("krpano_footerwrapper").style.display="none";document.getElementById("krpano_contentwrapper").style.display="none";imgbar_savedheight=document.getElementById("krpano_imagebar").offsetHeight;imgbar_savedlogopos=document.getElementById("krpano_imagebar").offsetTop+imgbar_savedheight-document.getElementById("krpano_logo").offsetTop}var a=document.getElementById("krpano_imagebar").offsetTop,
b=imgbar_getspace(),c=parseInt(document.getElementById("krpano_imagebar").offsetHeight,10);c+=b/imgbar_slidesteps;if(c>b)c=b;document.getElementById("krpano_imagebar").style.height=c+"px";document.getElementById("krpano_logo").style.top=a+c+imgbar_ylogo+"px";if(c>=b){document.getElementById("krpano_hidepano").style.top=a+c+imgbar_ytext+"px";document.getElementById("krpano_hidepano").style.display="inline";imgbar_state=2;setTimeout("showFlash()",1)}else setTimeout("incHeightImageBar()",1)}
function decHeightImageBar(){if(imgbar_state==2){imgbar_state=1;hideFlash();document.getElementById("krpano_hidepano").style.display="none"}var a=document.getElementById("krpano_imagebar").offsetTop,b=imgbar_getspace(),c=parseInt(document.getElementById("krpano_imagebar").offsetHeight,10);c-=b/imgbar_slidesteps;if(c<imgbar_savedheight+1)c=imgbar_savedheight;document.getElementById("krpano_imagebar").style.height=c+"px";document.getElementById("krpano_logo").style.top=a+c-imgbar_savedlogopos+"px";
if(c-imgbar_savedheight<1){document.getElementById("krpano_showpano").style.display="inline";document.getElementById("krpano_showpano").style.display="inline";document.getElementById("krpano_footerwrapper").style.display="inline";document.getElementById("krpano_contentwrapper").style.display="inline";imgbar_state=0}else setTimeout("decHeightImageBar()",1)}function showImagebarPano(){imgbar_state==0&&incHeightImageBar()}function hideImagebarPano(){imgbar_state==2&&decHeightImageBar()}
function resizeImagebarpano(){if(imgbar_state==2){var a=document.getElementById("krpano_imagebar").offsetTop,b=imgbar_getspace();document.getElementById("krpano_imagebar").style.height=b+"px";document.getElementById("krpano_logo").style.top=a+b+imgbar_ylogo+"px";document.getElementById("krpano_hidepano").style.top=a+b+imgbar_ytext+"px";if(document.getElementById("iframeview"))document.getElementById("iframeview").style.height=b+"px"}return true}var imagebar_touch_x=0,imagebar_touch_y=0;
function imagebar_onTouchStart(a){a.preventDefault();imagebar_touch_x=a.changedTouches[0].pageX;imagebar_touch_y=a.changedTouches[0].pageY}function imagebar_onTouchMove(a){a.preventDefault()}function imagebar_onTouchEnd(a){var b=a.changedTouches[0].pageX-imagebar_touch_x;if(a.changedTouches[0].pageY-imagebar_touch_y>100){a.preventDefault();showImagebarPano()}else if(b<-100||b>100){a.preventDefault();nextRandomImageBar()}}
function touch_inits(){var a=navigator.platform.toLowerCase();if(a.indexOf("iphone")>=0||a.indexOf("ipod")>=0||a.indexOf("ipad")>=0)try{var b=document.getElementById("krpano_imagebar");if(b){b.addEventListener("touchstart",imagebar_onTouchStart,true);b.addEventListener("touchmove",imagebar_onTouchMove,true);b.addEventListener("touchend",imagebar_onTouchEnd,true)}}catch(c){}}window.onload=touch_inits;window.onresize=resizeImagebarpano;

