//////////////////////////////////////////////////////////////////////
// Object2VR studio 3.0beta4/10565 Object Player                    //
// License: Volodymyr Kostenko                                      //
// (c) 2014, Garden Gnome Software, http://ggnome.com               //
//////////////////////////////////////////////////////////////////////

var j=!0,k=null,r=!1;
function object2vrPlayer(Ca){function ec(){var a;u=document.createElement("div");u.innerHTML=fc("PGRpdiBzdHlsZT0icG9zaXRpb246IHJlbGF0aXZlOyBsZWZ0OiAwcHg7IHJpZ2h0OiAwcHg7IHRvcDogNDAlOyBib3R0b206IDYwJTsgbWFyZ2luOiBhdXRvOyB3aWR0aDogMThlbTsgaGVpZ2h0OiA0ZW07IGJvcmRlcjogM3B4IHNvbGlkICM1NTU7IGJveC1zaGFkb3c6IDVweCA1cHggMTBweCAjMzMzOyBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTsgZGlzcGxheTogdGFibGU7IGZvbnQtZmFtaWx5OiBWZXJkYW5hLCBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmOyBmb250LXNpemU6IDEwcHQ7IG9wYWNpdHk6IDAuOTU7IGJvcmRlci1yYWRpdXM6IDE1cHg7Ij48cCBzdHlsZT0idGV4dC1hbGlnbjogY2VudGVyOyBkaXNwbGF5OiB0YWJsZS1jZWxsOyB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOyAiPkNyZWF0ZWQgd2l0aCA8YSBocmVmPSJodHRwOi8vb2JqZWN0MnZyLmNvbS8iIHRhcmdldD0iX2JsYW5rIj5PYmplY3QyVlI8L2E+PC9wPjwvZGl2Pg==");a=
"top:\t0px;left: 0px;width: 100px;height: 100px;overflow: hidden;z-index: 5000;position:relative;";"-webkit-"==H&&(a+=H+"transform: translateZ(99999999999999px);");u.setAttribute("style",a);e.e.insertBefore(u,e.e.firstChild);u.style.width=0+E+Wa+A+"px";u.style.height=0+F+Xa+B+"px";u.onclick=function(){u&&(e.e.removeChild(u),u=k)};u.oncontextmenu=u.onclick}function xb(){setTimeout(function(){e.setFullscreen(0)},10);setTimeout(function(){e.setFullscreen(0)},100)}function Da(){yb?setTimeout(function(){Da()},
1E3/60):zb(function(){Da()});Ya=0;if(0<=p){if(2==Za){var a=R-$a,f=S-ab;bb(a*ka/300,f*ka/300)}else if(3==Za){var f=la(),b;T?(a=(R-f.x)/A,b=(S-f.y)/B):(b=(R-f.x)/A,a=(S-f.y)/B);cb&&(b=1-b);db&&(a=1-a);f=Math.floor((1-b)*c.f);a=Math.floor((1-a)*c.k);0>f&&(f=0);f>=c.f&&(f=c.f-1);0>a&&(a=0);a>=c.k&&(a=c.k-1);e.showObjectImage(f,a)}else U=0.4*(R-Ea),V=0.4*(S-Fa),Ea+=U,Fa+=V,bb(U*ka/10,V*ka/10),Ab&&e.changeFov(0.4*(0-100*g.a));e.b=j}if(0!=ca)switch(ca){case 16:e.changeFovLog(-1,j);e.b=j;break;case 17:case 18:case 91:e.changeFovLog(1,
j),e.b=j}if(eb&&(0!=U||0!=V)&&0>p)U*=0.9,V*=0.9,0.1>U*U+V*V?V=U=0:(bb(U,V),e.b=j);if(!e.isLoaded&&e.hasConfig){for(a=f=0;a<e.checkLoaded.length;a++)e.checkLoaded[a].complete&&"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC"!=e.checkLoaded[a].src&&f++;Bb&&(Bb=r);f==e.checkLoaded.length?(fb=1,e.isLoaded=j,e.divSkin&&e.divSkin.ggLoaded&&e.divSkin.ggLoaded()):fb=f/(1*e.checkLoaded.length)}if(ma){c.g=
fa-c.x;c.m=ga-c.y;I=(gb-100*g.a)/10;a=Math.sqrt(c.g*c.g+c.m*c.m+I*I);10*a<ra?(ma=r,c.g=0,I=c.m=0,c.x=Number(fa),c.y=Number(ga),g.a=gb/100):(a=a>5*ra?ra/a:0.2,c.g*=a,c.m*=a,I*=a);c.x+=1*c.g;c.y+=1*c.m;c.x>=c.f&&(c.x-=c.f,fa-=c.f);0>c.x&&(c.x+=c.f,fa+=c.f);c.y>=c.k&&(c.y-=c.k,ga-=c.k);0>c.y&&(c.y+=c.k,ga+=c.k);g.a+=I/10;if(0<Y&&0.5>I){var i;b=0.5-g.c/c.width;i=0.5-g.d/c.height;a=(Cb-b)/Y;f=(Db-i)/Y;console.log("Center: "+b+","+i+" "+a+","+f);g.c=(0.5-b-a)*c.width;g.d=(0.5-i-f)*c.height;console.log(g);
Y--;Y&&(ma=j)}a=new Date;hb=a.getTime();e.b=j}else if(Z){c.g=0.95*c.g+0.05*ha;c.x+=c.g;if(ib&&(0>c.x||c.x>=c.f))ha=-ha,c.g=-c.g,c.x+=2*c.g;e.b=j}else if(ia&&(a=new Date,a=a.getTime()-hb,0>p&&0<Ga&&a>1E3*Ga&&(Z=j,c.g=0,c.m=0)),eb&&0==ca&&0>p&&(0!=c.g||0!=c.m||0!=I))c.g*=0.9,c.m*=0.9,I*=0.9,c.x+=c.g,c.y+=c.m,e.changeFovLog(I),1.0E-4>c.g*c.g+c.m*c.m&&(c.g=0,I=c.m=0),e.b=j;if(0<s){if(2==s)for(a=0;a<y.length;a++)f=y[a],"poly"==f.hstype&&f.t!=f.p&&(f.t>f.p?(f.p+=0.05,f.t<f.p&&(f.p=f.t)):(f.p-=0.05,f.t>
f.p&&(f.p=f.t)),e.b=j);3==s&&$!=L&&($>L?(L+=0.05,$<L&&(L=$)):(L-=0.05,$>L&&(L=$)),e.b=j)}e.b&&(e.b=r,e.updateObject(),sa&&gc())}function Eb(){setTimeout(function(){Eb()},200);5<Ya&&(zb=function(){return function(a){window.setTimeout(a,10)}},yb=j,Da());Ya++}function Fb(a){e.skinObj&&e.skinObj.hotspotProxyClick&&e.skinObj.hotspotProxyClick(a.id);""!=a.url&&(e.openUrl(a.url,a.target),Ha(-1,-1))}function Gb(){0<J&&(e.openUrl(e.hotspot.url,e.hotspot.target),e.skinObj&&e.skinObj.hotspotProxyClick(J))}function jb(a,
f){var b=-1,e,C;e=((a-E-0.5*A)/(g.viewport*g.a)-g.c)/c.width+0.5;C=((f-F-0.5*B)/(g.viewport*g.a)-g.d)/c.height+0.5;for(var l=0;l<y.length;l++){var K=y[l];if("poly"==K.hstype&&K.H&&0<=s)for(var z=0;z<K.H.length;z++){var h=K.H[z];if((h.Z==c.r||K.reuse&1)&&(h.$==c.s||K.reuse&2)&&(h.state==c.u||K.reuse&4))for(var m=0;m<h.L.length;m++){var n=h.L[m];if(0<n.q.length){var q,p,o,x;o=r;for(q=0,p=n.q.length-1;q<n.q.length;p=q++)x=n.q[q],p=n.q[p],x.y>C!=p.y>C&&e<(p.x-x.x)*(C-x.y)/(p.y-x.y)+x.x&&(o=!o);o&&(b=
l)}}}}return 0<=b?y[b]:r}function gc(){if(e.i){var a,f;kb!=s&&(kb=s,e.i.style.visibility=0<s?"inherit":"hidden");if(0<s){if(!o)try{o=e.i.getContext("2d")}catch(b){}if(o){if(o.width!=A||o.height!=B)o.width=A,o.height=B;o.clear?o.clear():o.clearRect(0,0,e.i.width,e.i.height);var i=1;3==s&&(i=L);for(var C=0;C<y.length;C++){var l=y[C];if("poly"==l.hstype)for(var K=0;K<l.H.length;K++){var z=l.H[K];if((z.Z==c.r||l.reuse&1)&&(z.$==c.s||l.reuse&2)&&(z.state==c.u||l.reuse&4))for(var h=0;h<z.L.length;h++){var n=
z.L[h];2==s&&(i=l.p);o.fillStyle=O(l.B,l.A*i);o.strokeStyle=O(l.D,l.C*i);if(0<n.q.length){o.beginPath();for(var m=0;m<n.q.length;m++)v=n.q[m],a=g.viewport*g.a*(g.c+(v.x-0.5)*c.width)+0.5*A,f=g.viewport*g.a*(g.d+(v.y-0.5)*c.height)+0.5*B,0==m?o.moveTo(a,f):o.lineTo(a,f);o.closePath();o.stroke();o.fill()}}}}}}}}function Ia(a,f){if(na&&aa!=k&&ja&&ja.getContext){var b=la(),i=a-b.x-A/2,i=i/g.a/g.viewport-g.c+c.width/2,b=f-b.y-B/2,b=b/g.a/g.viewport-g.d+c.height/2;d=ja.getContext("2d").getImageData(i,b,
1,1);J=d.data[2];Ja!=J&&(0<Ja&&e.skinObj&&e.skinObj.hotspotProxyOut&&e.skinObj.hotspotProxyOut(Ja),e.hotspot=0<J&&oa[J]?oa[J]:e.emptyHotspot,0<J&&e.skinObj&&e.skinObj.hotspotProxyOver&&e.skinObj.hotspotProxyOver(J),Ja=J)}}function lb(a,f,b,e,g,l){var K=c.l.length-1-e,h=c.ja,h=ta(h,"c",a%c.f+(f%c.k+b%c.G*c.k)*c.f),h=ta(h,"r",e),h=ta(h,"l",K),h=ta(h,"x",g),h=ta(h,"y",l);return Ka(h)}function ta(a,f,b){var e=RegExp("%0*"+f,"i").exec(a.toString());if(e){var e=e.toString(),c=b.toString();for(e.charAt(e.length-
1)!=f&&(c=(1+b).toString());c.length<e.length-1;)c="0"+c;a=a.replace(e,c)}return a}function mb(a,f,b){return Ka(c.path+"/img_"+b+"_"+f+"_"+a+"."+c.ba)}function La(a){db&&(a=-a);c.y+=a;ua()}function Ma(a){cb&&(a=-a);c.x+=a;ua()}function ua(){if(Hb){for(;0>c.x;)c.x+=c.f;for(;c.x>=c.f;)c.x-=c.f}else 0>c.x&&(c.x=0),c.x>=c.f&&(c.x=c.f-1);if(Ib){for(;0>c.y;)c.y+=c.k;for(;c.y>=c.k;)c.y-=c.k}else 0>c.y&&(c.y=0),c.y>=c.k&&(c.y=c.k-1);c.state>=c.G&&(c.state=c.G-1);0>c.state&&(c.state=0);g.a=Math.max(g.min,
Math.min(g.max,g.a));Jb&&(W=1<g.a);if(A>=g.viewport*g.a*c.width)g.c=0;else{var a=(c.width*g.viewport*g.a-A)/(2*g.a*g.viewport);g.c=Math.max(-a,g.c);g.c=Math.min(+a,g.c)}B>=g.viewport*g.a*c.height?g.d=0:(a=(c.height*g.viewport*g.a-B)/(2*g.a*g.viewport),g.d=Math.max(-a,g.d),g.d=Math.min(+a,g.d))}function Kb(){ca=0;va||m()}function Lb(){ca=0;va||m()}function Mb(a){if(!va){a=a?a:window.event;ca=a.keyCode;if(0!=ca){switch(ca){case 37:W?g.c+=10/g.a:e.changePan(1,j);break;case 38:W?g.d+=10/g.a:e.changeTilt(1,
j);break;case 39:W?g.c+=-10/g.a:e.changePan(-1,j);break;case 40:W?g.d-=10/g.a:e.changeTilt(-1,j);break;case 43:case 107:case 187:e.changeFovLog(-1,j);break;case 109:case 45:case 189:e.changeFovLog(1,j)}e.b=j}m()}}function Nb(a){D||(Ab=r,P(a.target)&&(a.preventDefault(),m(),pa&&pa.reset()))}function hc(a){D||(a.preventDefault(),1!=a.scale&&(Na*=a.scale,e.setZoom(Na*g.V),m()))}function ic(a){!D&&P(a.target)&&(a.preventDefault(),e.setZoom(event.scale*g.V),m())}function nb(a){Oa=j;Na=1;D||(a.touches?
(e.o=a.touches.target,e.o==e.control&&(a.preventDefault(),m())):(a.preventDefault(),m()))}function jc(a){pa||(pa=new MSGesture,pa.target=e.i);pa.ma(a.sa)}function kc(a){D||(a.preventDefault(),p=-1)}function lc(a){if(!D){0<=p&&(a.preventDefault(),m());var f=(new Date).getTime(),b=-1,b=Math.abs(Ob-wa)+Math.abs(Pb-xa);if(0<=b&&20>b&&P(a.target)){var c=r;if(e.o)for(b=e.o;b&&b!=e.control;)b.onclick&&!c&&(b.onclick(),c=j),b=b.parentNode;if((b=jb(e.mouse.x,e.mouse.y))&&!c)Fb(b),c=j;na&&!c&&Gb();c&&a.preventDefault();
b=Math.abs(Qb-wa)+Math.abs(Rb-xa);if(700>f-e.K&&0<=b&&20>b&&!c){e.o==e.control&&ob&&setTimeout(function(){e.toggleFullscreen()},10);if(e.o){b=e.o;for(c=r;b&&b!=e.control;)b.ondblclick&&!c&&(b.ondblclick(),c=j),b=b.parentNode;c&&a.preventDefault()}e.K=0}else e.K=f;Qb=wa;Rb=xa}if(e.o){b=e.o;for(c=r;b&&a!=e.control;){if(b.onmouseout)b.onmouseout();a.onmouseup&&!c&&(b.onmouseup(),c=j);b=b.parentNode}c&&a.preventDefault()}e.o=k;p=-1}}function mc(a){a||(a=window.event);var f=a.touches,b=la();e.mouse.x=
f[0].pageX-b.x+E;e.mouse.y=f[0].pageY-b.y+F;if(!D){if(1==f.length&&f[0]&&(wa=f[0].pageX,xa=f[0].pageY,0<=p)){a.preventDefault();for(b=0;b<f.length;b++)if(f[b].identifier==p){var c=f[b].pageY;Pa=f[b].pageX;Qa=c;R=Pa;S=Qa;break}m();Ia(f[0].pageX,f[0].pageY)}2==f.length&&f[0]&&f[1]&&(p=-1,Oa||(g.ia=Math.sqrt((f[0].pageX-f[1].pageX)*(f[0].pageX-f[1].pageX)+(f[0].pageY-f[1].pageY)*(f[0].pageY-f[1].pageY)),e.setZoom(g.V/g.la*g.ia),a.preventDefault()))}}function nc(a){a||(a=window.event);var f=a.touches,
b=la();e.mouse.x=f[0].pageX-b.x+E;e.mouse.y=f[0].pageY-b.y+F;if(!D){console.log("Touch start...");if(1==f.length&&0>p&&f[0]){Ra=(new Date).getTime();Ob=f[0].pageX;Pb=f[0].pageY;wa=f[0].pageX;xa=f[0].pageY;e.o=f[0].target;P(f[0].target)&&(a.preventDefault(),pb(f[0].pageX,f[0].pageY),p=f[0].identifier,m());if(e.o){b=e.o;for(flag=r;b&&!P(b);){if(b.onmouseover)b.onmouseover();b.onmousedown&&!flag&&(b.onmousedown(),flag=j);b=b.parentNode}flag&&a.preventDefault()}Ia(f[0].pageX,f[0].pageY)}1<f.length&&(p=
-1);!Oa&&2==f.length&&f[0]&&f[1]&&(g.la=Math.sqrt((f[0].pageX-f[1].pageX)*(f[0].pageX-f[1].pageX)+(f[0].pageY-f[1].pageY)*(f[0].pageY-f[1].pageY)),g.V=g.a)}}function ya(a){if(!Sb&&(a=a?a:window.event,a=Sa(a),P(a.target))){var f=a.detail?-1*a.detail:a.wheelDelta/40;Tb&&(f=-f);e.changeFovLog((0<f?1:-1)*Ub,j);e.b=j;a.preventDefault?a.preventDefault():a.returnValue=r;m()}}function Vb(a){if(!D&&(a=a?a:window.event,a=Sa(a),0<=p)){a.preventDefault?a.preventDefault():a.returnValue=r;p=-1;var f=(new Date).getTime(),
b=-1,b=Math.abs($a-R)+Math.abs(ab-S);if(400>f-Ra&&0<=b&&20>b&&P(a.target)){var b=Math.abs(Wb-R)+Math.abs(Xb-S),c=jb(e.mouse.x,e.mouse.y);c&&Fb(c);Wb=R;Xb=S;na&&(Ia(a.pageX,a.pageY),Gb());700>f-e.K&&0<=b&&20>b&&!c?(ob&&setTimeout(function(){e.toggleFullscreen()},10),e.K=0):e.K=f}m()}}function za(a){var f=la(),a=a?a:window.event,a=Sa(a);document.webkitIsFullScreen||document.mozFullScreen||document.fullScreen?(e.mouse.x=a.screenX+E,e.mouse.y=a.screenY+F):(e.mouse.x=a.pageX-f.x+E,e.mouse.y=a.pageY-f.y+
F);if(!D&&(0<=p&&(f=a.pageY,Pa=a.pageX,Qa=f,R=Pa,S=Qa,m(),a.preventDefault?a.preventDefault():a.returnValue=r),na&&P(a.target)?(Ia(a.pageX,a.pageY),0<J&&Ha(e.mouse.x-E,e.mouse.y-F)):J=0,0==J&&e.hotspot==e.emptyHotspot||"poly"==e.hotspot.hstype))f=e.emptyHotspot,P(a.target)&&(f=jb(e.mouse.x,e.mouse.y)),e.hotspot!=f&&(e.hotspot!=e.emptyHotspot&&(0<s&&(e.hotspot.t=0),e.skinObj&&e.skinObj.hotspotProxyOut&&e.skinObj.hotspotProxyOut(e.hotspot.id)),f?(e.hotspot=f,e.skinObj&&e.skinObj.hotspotProxyOver&&e.skinObj.hotspotProxyOver(e.hotspot.id),
M.style.cursor="pointer",0<s&&($=1,e.hotspot.t=1,e.b=j)):(e.hotspot=e.emptyHotspot,M.style.cursor="auto",0<s&&($=0,e.b=j))),Ha(e.mouse.x-E,e.mouse.y-F)}function Ha(a,f){var b=Aa;b.enabled&&(e.hotspot!=e.emptyHotspot&&0<=a&&0<=f&&""!=e.hotspot.title?(h.innerHTML=e.hotspot.title,h.style.color=O(b.Y,b.X),h.style.backgroundColor=b.background?O(b.B,b.A):"transparent",h.style.border="solid "+O(b.D,b.C)+" "+b.Q+"px",h.style.borderRadius=b.P+"px",h.style.textAlign="center",0<b.width?(h.style.left=a-b.width/
2+"px",h.style.width=b.width+"px"):(h.style.width="auto",h.style.left=a-h.offsetWidth/2+"px"),h.style.height=0<b.height?b.height+"px":"auto",h.style.top=f+25+"px",h.style.visibility="inherit",h.style.overflow="hidden"):(h.style.visibility="hidden",h.innerHTML=""))}function oc(a){if(u)u.onclick();D||(a=a?a:window.event,a.preventDefault?a.preventDefault():a.returnValue=r,pb(a.screenX,a.screenY),p=1,Ra=(new Date).getTime(),m())}function Ta(a){if(u)u.onclick();if(!D&&(a=a?a:window.event,a=Sa(a),(!a.which||
0==a.which||1==a.which)&&P(a.target)))pb(a.pageX,a.pageY),p=1,Ra=(new Date).getTime(),m(),a.preventDefault?a.preventDefault():a.returnValue=r}function Sa(a){a.pageX==k&&a.clientX!=k&&(a.pageX=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,a.pageY=a.clientY+document.body.scrollTop+document.documentElement.scrollTop);return a}function P(a){return a==n||a==G||a==q||a==Q||a==e.control||a==e.i||a.ggType&&"container"==a.ggType?j:r}function m(){Z&&(Z=r,c.g=0,c.m=0);ma&&(ma=r,c.g=
0,c.m=0);hb=(new Date).getTime()}function bb(a,f){e.getFov();if(W)g.c+=a/(g.a*g.viewport),g.d+=f/(g.a*g.viewport);else{var b=-a/20;T?La(b):Ma(b);b=-f/20;T?Ma(b):La(b)}ua()}function pb(a,f){$a=a;ab=f;R=a;S=f;Ea=a;Fa=f}function Yb(){switch(g.fa){case 1:g.viewport=Math.min(A/c.width,B/c.height);break;case 2:g.viewport=Math.max(A/c.width,B/c.height);break;case 3:g.viewport=A/c.width;break;case 4:g.viewport=B/c.height;break;default:g.viewport=1}var a,f;a=g.viewport*g.a*(g.c-c.width/2)+A/2;f=g.viewport*
g.a*(g.d-c.height/2)+B/2;var b,i;a=Math.round(a);f=Math.round(f);b=Math.round(c.width*g.viewport*g.a);i=Math.round(c.height*g.viewport*g.a);if(X){if(sa=r,0<=c.r&&0<=c.s){if((b<A||i<B)&&g.J>g.a)N.clear?N.clear():N.clearRect(0,0,q.width,q.height);if(0<c.l.length){for(var C=0,l,h,z;c.l.length>=C+2&&c.l[C+1].width>b;)C++;for(var m=C,p=r;!p;){p=j;l=c.l[m];var o=-a/b*(l.width/c.n);h=-f/i*(l.height/c.n);var s=(-a+A)/b*(l.width/c.n),t=(-f+B)/i*(l.height/c.n),o=Math.min(Math.max(0,Math.floor(o)),l.v-1);h=
Math.min(Math.max(0,Math.floor(h)),l.O-1);s=Math.min(Math.max(0,Math.floor(s)),l.v-1);t=Math.min(Math.max(0,Math.floor(t)),l.O-1);for(z=h;z<=t;z++)for(h=o;h<=s;h++){var u=h+z*l.v,x=l.z[u];!x||!x.j?p=r:x.j.complete||(p=r)}p||(m+1<c.l.length?m++:p=j)}for(;m>=C;){l=c.l[m];o=-a/b*(l.width/c.n);h=-f/i*(l.height/c.n);s=(-a+A)/b*(l.width/c.n);t=(-f+B)/i*(l.height/c.n);o=Math.min(Math.max(0,Math.floor(o)),l.v-1);h=Math.min(Math.max(0,Math.floor(h)),l.O-1);s=Math.min(Math.max(0,Math.floor(s)),l.v-1);t=Math.min(Math.max(0,
Math.floor(t)),l.O-1);for(z=h;z<=t;z++)for(h=o;h<=s;h++)u=h+z*l.v,(x=l.z[u])||(x=l.z[u]={}),!x.j&&5>ba&&(x.j=new Image,x.j.setAttribute("src",lb(c.r,c.s,c.u,m,h,z)),x.j.onload=pc,x.j.onerror=Zb,x.j.onabort=Zb,0==ba&&e.divSkin&&e.divSkin.ggReLoadedLevels&&e.divSkin.ggReLoadedLevels(),ba++),x.j&&x.j.complete&&(N.drawImage(x.j,a+(-c.da+c.n*h)*b/l.width,f+(-c.da+c.n*z)*i/l.height,x.j.width*b/l.width,x.j.height*i/l.height),sa=j);m--}g.J=g.a;g.T=g.c;g.U=g.d}else""!=n.src&&n.complete?(N.clear?N.clear():
N.clearRect(0,0,q.width,q.height),N.drawImage(n,a,f,b,i),g.J=g.a,g.T=g.c,g.U=g.d,sa=j):e.b=j;if(sa)for(a=0;a<y.length;a++)if(f=y[a],"point"==f.hstype){C=r;for(l=i=b=0;l<f.locations.length;l++)m=f.locations[l],m.column==c.r&&m.row==c.s&&m.state==c.u&&(C=j,b=g.viewport*g.a*(g.c+m.x*c.width-c.width/2)+A/2,i=g.viewport*g.a*(g.d+m.y*c.height-c.height/2)+B/2);f.obj&&f.obj.__div&&(f.obj.__div.style[Ba]="none",C?(f.obj.__div.style.left=E+b+"px",f.obj.__div.style.top=F+i+"px",f.obj.__div.style.visibility=
"visible"):(f.obj.__div.style.left="-100px",f.obj.__div.style.top="-100px",f.obj.__div.style.visibility="hidden"))}}}else n.setAttribute("width",c.width),n.setAttribute("height",c.height),G.setAttribute("width",c.width),G.setAttribute("height",c.height),n.style.left=a+"px",n.style.top=f+"px",n.style.width=b+"px",n.style.height=i+"px",G.style.left=a+"px",G.style.top=f+"px",G.style.width=b+"px",G.style.height=i+"px",g.J=g.a,g.T=g.c,g.U=g.d}function Zb(){ba&&ba--;0==ba&&e.divSkin&&e.divSkin.ggLoadedLevels&&
e.divSkin.ggLoadedLevels()}function pc(){e.b=j;e.F=j;ba&&ba--;0==ba&&e.divSkin&&e.divSkin.ggLoadedLevels&&e.divSkin.ggLoadedLevels()}function la(){var a={x:0,y:0},f=t;if(f.offsetParent){do a.x+=f.offsetLeft,a.y+=f.offsetTop;while(f=f.offsetParent)}return a}function qb(){if(e.isFullscreen&&(!document.webkitIsFullScreen&&!document.mozFullScreen&&!document.fullScreen&&e.exitFullscreen(),document.webkitIsFullScreen||document.mozFullScreen||document.fullScreen))e.e.style.left="0px",e.e.style.top="0px"}
function qa(){e.setViewerSize(e.I.offsetWidth,e.I.offsetHeight)}function Ka(a){return"/"==a.charAt(0)||0<a.indexOf("://")?a:rb+a}function $b(a){a=Number(a).toString(16);return a="#000000".substr(0,7-a.length)+a}function O(a,f){a=Number(a);return Ua&&8>=Ua?$b(a):"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+f+")"}var Aa,s,L,$,sb,tb,ub,vb,kb;function qc(a,f){var b=this;b.ka=a;b.hotspot=f;b.__div=document.createElement("div");b.j=document.createElement("img");var e;b.j.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D");
b.j.setAttribute("style","position: absolute;top: -14px;left: -14px;");b.__div.appendChild(b.j);e="position:absolute;"+(H+"user-select: none;");b.__div.setAttribute("style",e);b.__div.onclick=function(){b.ka.openUrl(f.url,f.target)};var c=Aa;c.enabled&&(b.text=document.createElement("div"),e="position:absolute;"+("left: -"+c.width/2+"px;"),e=e+"top:\t 20px;"+("width: "+c.width+"px;"),e=0==f.h?e+"height: auto;":e+("height: "+c.height+"px;"),f.wordwrap?e=e+"white-space: pre-wrap;"+("width: "+c.width+
"px;"):(e=0==c.height?e+"width: auto;":e+("width: "+c.width+"px;"),e+="white-space: nowrap;"),e+=H+"transform-origin: 50% 50%;",b.text.setAttribute("style",e+"visibility: hidden;border: 1px solid #000000;background-color: #ffffff;text-align: center;overflow: hidden;padding: 0px 1px 0px 1px;"),b.text.style.color=O(c.Y,c.X),b.text.style.backgroundColor=c.background?O(c.B,c.A):"transparent",b.text.style.border="solid "+O(c.D,c.C)+" "+c.Q+"px",b.text.style.borderRadius=c.P+"px",b.text.style.textAlign=
"center",b.text.style.width=0<c.width?c.width+"px":"auto",b.text.style.height=0<c.height?c.height+"px":"auto",b.text.style.overflow="hidden",b.text.innerHTML=f.title,b.__div.onmouseover=function(){0==c.height&&(w=b.text.offsetWidth,b.text.style.left=-w/2+"px");b.text.style.visibility="inherit"},b.__div.onmouseout=function(){b.text.style.visibility="hidden"},b.__div.appendChild(b.text))}function fc(a){var e="",b,c,g="",h,m="",n=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");do b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++)),
c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++)),h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++)),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(n++)),b=b<<2|c>>4,c=(c&15)<<4|h>>2,g=(h&3)<<6|m,e+=String.fromCharCode(b),64!=h&&(e+=String.fromCharCode(c)),64!=m&&(e+=String.fromCharCode(g));while(n<a.length);return e}var e=this;e.transitionsDisabled=r;var I=0,A=320,B=480,g=
{a:1,S:1,min:1,max:1,J:-1,na:0,c:0,d:0,T:0,U:0,viewport:1,fa:1},$a=0,ab=0,R=0,S=0,Wb=0,Xb=0,Pa=0,Qa=0,p=-1,Ob=0,Pb=0,wa=0,xa=0,Qb=0,Rb=0,Ra,eb=j,Ea=0,Fa=0,U=0,V=0,Ab=r,na=r,J=0,Ja=0,oa,da;oa=[];var y=[];e.emptyHotspot={pan:0,tilt:0,title:"",url:"",target:"",id:"",skinid:"",w:100,h:20,wordwrap:r,obj:k};e.hotspot=e.emptyHotspot;e.mouse={x:0,y:0};var ca=0,t=k,M=k,n=k,G=k,ea=k,q=k,Q=k,X=k,wb=k,N=k,aa=k,ja=k,h=k;e.control=k;e.checkLoaded=[];e.isFullscreen=r;e.divSkin=k;e.isLoaded=r;e.hasConfig=r;var fb=
0,Bb=r,ia=r,Ga=5,Z=r,ha=0.4,ib=r,ma=r,ra=0.1,fa=0,ga=0,Y=0,gb,Cb,Db,hb;e.skinObj=k;e.b=r;e.F=r;e.userdata={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:""};var E=0,F=0,Wa=0,Xa=0,Za=3,va=r,D=r,Sb=r,Jb=j,W=r,Tb=r,Ub=1,ob=j,Hb=r,Ib=r,cb=r,db=r,T=r,ka=10,c={x:0,y:0,g:0,m:0,width:100,height:100,state:0,r:-1,s:-1,u:-1,f:1,k:1,G:1,M:0,N:0,W:0,path:"images/",ba:"jpg",n:512,ra:1,ea:0};c.ca=function(){return c.r%c.f+(c.s%c.f+c.u%c.G*c.k)*c.f};var ac=j,bc=0,H="",
Ba="transition",Oa=r,rb="";s=1;L=0;$=0;sb=255;tb=1;ub=255;vb=0.3;Aa={enabled:j,width:180,height:20,Y:0,X:1,background:j,B:16777215,A:1,D:0,C:1,P:3,Q:1,wordwrap:j};kb=void 0;var cc=navigator.userAgent.toLowerCase(),Ua=-1!=cc.indexOf("msie")?parseInt(cc.split("msie")[1]):r,rc=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?j:r,yb=r,zb=function(){var a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;
return rc||!a?function(a){window.setTimeout(a,10)}:a}();e.detectBrowser=function(){var a=["Webkit","Moz","O","ms","Ms"],e;H="";Ba="transition";for(e=0;e<a.length;e++)"undefined"!==typeof document.documentElement.style[a[e]+"Transform"]&&(H="-"+a[e].toLowerCase()+"-",Ba=a[e]+"Transition")};e.setBasePath=function(a){rb=a};e.getPercentLoaded=function(){return fb};var dc=j;e.setViewerSize=function(a,c){if(e.isFullscreen)if("number"==typeof window.innerWidth)a=window.innerWidth,c=window.innerHeight;else if(document.documentElement&&
(document.documentElement.clientWidth||document.documentElement.clientHeight))a=document.documentElement.clientWidth,c=document.documentElement.clientHeight;else if(document.body&&(document.body.clientWidth||document.body.clientHeight))a=document.body.clientWidth,c=document.body.clientHeight;var b=a-E-Wa,g=c-F-Xa;A=b;B=g;t.style.width=b+"px";t.style.height=g+"px";t.style.left=E+"px";t.style.top=F+"px";Yb();M.style.width=a+"px";M.style.height=c+"px";e.i.style.width=a+"px";e.i.style.height=c+"px";e.i.width=
a;e.i.height=c;e.i.style.left=E+"px";e.i.style.top=F+"px";q.style.width=a+"px";q.style.height=c+"px";Q.style.width=a+"px";Q.style.height=c+"px";if(dc){if(!X)try{wb=Q.getContext("2d"),N=X=q.getContext("2d")}catch(h){}try{X?(t.removeChild(G),t.removeChild(n)):(t.removeChild(q),t.removeChild(Q))}catch(l){}dc=r}if(X&&(b=window.devicePixelRatio||1,b=1,q.width!=Math.round(a*b)||q.height!=Math.round(c*b)))q.width=Math.round(a*b),q.height=Math.round(c*b),Q.width=Math.round(a*b),Q.height=Math.round(c*b),X.scale(b,
b),wb.scale(b,b),e.b=j,e.F=j;e.b=j;e.divSkin&&e.divSkin.ggUpdateSize&&e.divSkin.ggUpdateSize(a,c)};var ba=0,sa=r;e.setMargins=function(a,e,b,c){E=a;F=e;Wa=b;Xa=c;qa()};e.changeViewMode=function(a){0==a&&(W=r);1==a&&(W=j);2==a&&(W=W?r:j)};e.changePolygonMode=function(a,c){s=1==c&&0<s?0:Math.round(a);e.b=j};e.polygonMode=function(){return s};e.getPan=function(){return T?c.y:c.x};e.getPanN=function(){return e.getPan()};e.getPanNorth=function(){return e.getPan()};e.showObjectImage=function(a,f){c.x=a;
c.y=f;ua();e.b=j};e.setPan=function(a){m();isNaN(a)||(T?c.y=Number(a):c.x=Number(a));e.b=j};e.changePan=function(a){m();isNaN(a)||(T?La(a):Ma(a));e.b=j};e.getTilt=function(){return T?c.x:c.y};e.setTilt=function(a){m();isNaN(a)||(T?c.x=Number(a):c.y=Number(a));e.b=j};e.changeTilt=function(a){m();isNaN(a)||(T?Ma(a):La(a));e.b=j};e.changePanLog=function(a,c){e.changePan(a,c)};e.changeTiltLog=function(a,c){e.changeTilt(a,c)};e.getFov=function(){return 100*g.a};e.setZoom=function(a){isNaN(a)||(g.a=a<g.min?
g.min:a>g.max?g.max:a);e.b=j};e.setFov=function(a){m();e.setZoom(a/100)};e.changeFov=function(a){e.setFov(e.getFov()-10*a)};e.changeFovLog=function(a){e.setFov(e.getFov()*Math.exp(-a/50))};e.getX=function(){return c.r};e.getY=function(){return c.s};e.getState=function(){return c.u};e.setCenter=function(a,f){g.c=(0.5-a)*c.width;g.d=(0.5-f)*c.height;e.b=j};e.getCenter=function(){var a={};a.x=0.5-g.c/c.width;a.y=0.5-g.d/c.height;return a};e.setPanTilt=function(a,c){m();isNaN(a)||e.setPan(a);isNaN(c)||
e.setTilt(c);e.b=j};e.setPanTiltFov=function(a,c,b){m();isNaN(a)||e.setPan(a);isNaN(c)||e.setTilt(c);!isNaN(b)&&0<b&&e.setFov(b);e.b=j};e.setDefaultView=function(){c.x=c.oa;c.y=c.pa;e.changeViewState(c.W);g.a=g.S};e.moveTo=function(a,e,b,i,h,l){m();ma=j;var n=a.toString().split("/");1<n.length&&(a=Number(n[0]),i=e,e=Number(n[1]),2<n.length&&(b=Number(n[2])));fa=isNaN(a)?c.x:Number(a);ga=isNaN(e)?c.y:Number(e);gb=!isNaN(b)&&0<b?Number(b):100*g.a;ra=!isNaN(i)&&0<i?Number(i):1;h&&!isNaN(h)&&l&&!isNaN(l)?
(Cb=Number(h),Db=Number(l),Y=Math.ceil(20/ra),0>=Y&&(Y=1)):Y=0};e.moveToDefaultView=function(a){e.moveTo(c.M,c.N,100*g.S,a)};var pa,Na=1,nb=function(a){Oa=j;!D&&P(a.target)&&(a.preventDefault(),g.V=g.a,m())};e.changeViewState=function(a,f){m();if(c.state!=a){c.state=a;if(0<f){var b=1/(20*f);X?(Q.style.visibility="inherit",q.style[Ba]="opacity "+b+"s linear",N==X?(q.style.opacity="0.0",N=wb):(q.style.opacity="1.0",N=X)):(G.style.visibility="inherit",n.style[Ba]="opacity "+b+"s linear",ea==n?(n.style.opacity=
"0.0",ea=G):(n.style.opacity="1.0",ea=n));e.updateObject()}e.b=j}};e.updateObject=function(){ua();var a=Math.floor(c.x),f=Math.floor(c.y),b=c.state,i=r;if(c.r!=a||c.s!=f||c.u!=b){if(0<c.l.length)for(i=0;i<c.l.length;i++){var h=c.l[i];h.R?h.aa[c.ca()]=h.z:h.z=[]}c.r=a;c.s=f;c.u=b;if(0<c.l.length&&X)for(i=0;i<c.l.length;i++)h=c.l[i],h.R&&(h.z=h.aa[c.ca()],h.z||(h.z=[]));else 0<c.l.length?ea.setAttribute("src",lb(a,f,b,c.l.length-1,0,0)):ea.setAttribute("src",mb(a,f,b)),ea.onload=function(){e.b=j;e.F=
j},ea.qa=r;i=j}if(i||e.F||g.a!=g.J||g.c!=g.T||g.d!=g.U)Yb(),e.F=r;i&&na&&(aa==k&&(aa=new Image,ja=document.createElement("canvas"),ja.width=c.width,ja.height=c.height,aa.addEventListener&&aa.addEventListener("load",function(){ja.getContext("2d").drawImage(aa,0,0,c.width,c.height)},r)),8<=da?(da&16&&(a=0),da&32&&(f=0),da&64&&(b=0)):(0<da&&(b=0),1<da&&(a=0),2<da&&(f=0)),aa&&aa.src!=Ka(c.path+"/hs_"+b+"_"+f+"_"+a+".png")&&(aa.src=Ka(c.path+"/hs_"+b+"_"+f+"_"+a+".png")))};e.preloadImages=function(){var a,
f,b,g;if(0<c.l.length)for(g=0;g<c.l.length;g++){var h=c.l[g];if(h.R)for(b=0;b<c.G;b++)for(f=0;f<c.k;f++)for(a=0;a<c.f;a++){var l=[],m,n;for(n=0;n<h.O;n++)for(m=0;m<h.v;m++){var p=m+n*h.v,o;o={};o.j=new Image;o.j.setAttribute("src",lb(a,f,b,g,m,n));o.j.onload=function(){e.b=j;e.F=j};l[p]=o;e.checkLoaded.push(o.j)}h.aa[a+c.f*(f+b*c.k)]=l}}else if(c.ea){g=new Image;g.src=mb(c.M,c.N,c.W);for(b=0;b<c.G;b++)for(f=0;f<c.k;f++)for(a=0;a<c.f;a++)g=new Image,g.src=mb(a,f,b),e.checkLoaded.push(g)}};var o,Ha=
function(a,c){var b=Aa;b.enabled&&(e.hotspot!=e.emptyHotspot&&0<=a&&0<=c&&""!=e.hotspot.title?(h.innerHTML=e.hotspot.title,h.style.color=O(b.Y,b.X),h.style.backgroundColor=b.background?O(b.B,b.A):"transparent",h.style.border="solid "+O(b.D,b.C)+" "+b.Q+"px",h.style.borderRadius=b.P+"px",h.style.textAlign="center",0<b.width?(h.style.left=a-b.width/2+"px",h.style.width=b.width+"px"):(h.style.width="auto",h.style.left=a-h.offsetWidth/2+"px"),h.style.height=0<b.height?b.height+"px":"auto",h.style.top=
c+25+"px",h.style.visibility="inherit",h.style.overflow="hidden"):(h.style.visibility="hidden",h.innerHTML=""))};e.ha=function(){for(var a=0;a<y.length;a++)if("point"==y[a].hstype&&(y[a].obj=e.skinObj&&e.skinObj.addSkinHotspot?new e.skinObj.addSkinHotspot(y[a]):new qc(this,y[a]),y[a].obj&&y[a].obj.__div)){var c=M.firstChild;c?M.insertBefore(y[a].obj.__div,c):M.appendChild(y[a].obj.__div)}};var Ya=0;e.assignHandler=function(){var a;a=M;e.control=a;xb();setTimeout(function(){Da()},10);setTimeout(function(){Eb()},
200);setTimeout(function(){qa();e.updateObject()},10);a.addEventListener?(a.addEventListener("touchstart",nc,r),a.addEventListener("touchmove",mc,r),a.addEventListener("touchend",lc,r),a.addEventListener("touchcancel",kc,r),e.i.addEventListener("MSPointerDown",jc,r),e.i.addEventListener("MSGestureStart",nb,r),e.i.addEventListener("MSGestureEnd",Nb,r),e.i.addEventListener("MSGestureChange",hc,r),a.addEventListener("gesturestart",nb,r),a.addEventListener("gesturechange",ic,r),a.addEventListener("gestureend",
Nb,r),a.addEventListener("mousedown",Ta,r),a.addEventListener("mousemove",za,r),n.addEventListener("mousedown",Ta,r),n.addEventListener("mousemove",za,r),document.addEventListener("mouseup",Vb,r),Ua&&(e.i.addEventListener("mousedown",Ta,r),e.i.addEventListener("mousemove",za,r),q.addEventListener("mousedown",Ta,r),q.addEventListener("mousemove",za,r)),Ua?(n.addEventListener("mousewheel",ya,r),q.addEventListener("mousewheel",ya,r)):(a.addEventListener("mousewheel",ya,r),a.addEventListener("DOMMouseScroll",
ya,r)),document.addEventListener("keydown",Mb,r),document.addEventListener("keyup",Lb,r),window.addEventListener("orientationchange",xb,r),window.addEventListener("resize",qa,r),window.addEventListener("blur",Kb,r),e.e.addEventListener("webkitfullscreenchange",qb,r),document.addEventListener("mozfullscreenchange",qb,r),window.addEventListener("webkitfullscreenchange",qb,r)):a.attachEvent&&(n.attachEvent("onmousedown",oc),n.attachEvent("onmousemove",za),document.attachEvent("onmouseup",Vb),a.attachEvent("onmousedblclick",
e.toggleFullscreen),a.onmousewheel=document.onmousewheel=ya,document.attachEvent("onkeydown",Mb),document.attachEvent("onkeyup",Lb),window.attachEvent("onresize",qa),window.attachEvent("onblur",Kb));a.oncontextmenu=function(a){void 0===a&&(a=window.event);return!a.ctrlKey&&(a="<<U>>","U"!=a.charAt(2))?(ec(),r):j}};e.setFullscreen=function(a){e.isFullscreen!=a&&(e.isFullscreen=a,e.b=j,e.F=j);if(e.isFullscreen){try{e.e.webkitRequestFullScreen?e.e.webkitRequestFullScreen():e.e.mozRequestFullScreen?e.e.mozRequestFullScreen():
e.e.requestFullScreen?e.e.requestFullScreen():e.e.requestFullscreen&&e.e.requestFullscreen()}catch(c){}e.e.style.position="absolute";var a=la(),b=0,g=0;if("number"==typeof window.pageYOffset)g=window.pageYOffset,b=window.pageXOffset;else if(document.body&&(document.body.scrollLeft||document.body.scrollTop))g=document.body.scrollTop,b=document.body.scrollLeft;else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop))g=document.documentElement.scrollTop,
b=document.documentElement.scrollLeft;e.e.style.left=Math.round(b-a.x+E)+"px";e.e.style.top=Math.round(g-a.y+F)+"px";document.body.style.overflow="hidden";e.divSkin&&e.divSkin.ggEnterFullscreen&&e.divSkin.ggEnterFullscreen()}else{try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(h){}e.e.style.position=
"relative";e.e.style.left="0px";e.e.style.top="0px";document.body.style.overflow="";e.divSkin&&e.divSkin.ggExitFullscreen&&e.divSkin.ggExitFullscreen()}qa()};e.toggleFullscreen=function(){e.setFullscreen(!e.isFullscreen)};e.exitFullscreen=function(){e.setFullscreen(r)};e.startAutorotate=function(a,e,b){Z=ia=j;a&&0!=a&&(ha=a);e&&(Ga=e);b&&(ib=1==b)};e.stopAutorotate=function(){ia=Z=r};e.toggleAutorotate=function(){Z=ia=!Z};var u;e.createLayers=function(a){var c;e.I=document.getElementById(a);e.I?(e.I.innerHTML=
"",c="max-width: none !important;max-height: none !important;min-width: none !important;min-height: none !important;padding 0px !important;margin 0px !important;",e.e=document.createElement("div"),e.e.setAttribute("style","top:\t0px;left: 0px;-ms-touch-action: none;position:relative;"+c),e.I.appendChild(e.e),t=document.createElement("div"),a="top:\t0px;left: 0px;overflow: hidden;position:absolute;"+(H+"user-select: none;"),t.setAttribute("style",a+c),e.e.appendChild(t),G=document.createElement("img"),
G.setAttribute("galleryimg","false"),a="top:\t0px;left: 0px;position:absolute;visibility: hidden;"+(H+"user-select: none;"),G.setAttribute("style",a+c),t.appendChild(G),n=document.createElement("img"),n.setAttribute("galleryimg","false"),a="top:\t0px;left: 0px;position:absolute;"+(H+"user-select: none;"),n.setAttribute("style",a+c),t.appendChild(n),ea=n,Q=document.createElement("canvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;visibility: hidden;position:absolute;"+(H+"user-select: none;"),
Q.setAttribute("style",a+c),t.appendChild(Q),q=document.createElement("canvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;position:absolute;"+(H+"user-select: none;"),q.setAttribute("style",a+c),t.appendChild(q),h=document.createElement("div"),h.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;z-index: 1100;"),h.innerHTML=" Hotspot text!",t.appendChild(h),M=document.createElement("div"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;z-index: 1000;"+
(H+"user-select: none;"),M.setAttribute("style",a+c),e.e.appendChild(M),e.i=document.createElement("canvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;z-index: 900;"+(H+"user-select: none;"),e.i.setAttribute("style",a+c),e.e.appendChild(e.i),e.divSkin=M):alert("container not found!")};e.readConfigString=function(a){window.DOMParser?(parser=new DOMParser,xmlDoc=parser.parseFromString(a,"text/xml")):(xmlDoc=new ActiveXObject("Microsoft.XMLDOM"),xmlDoc.async=
"false",xmlDoc.loadXML(a));e.readConfigXml(xmlDoc)};e.readConfigUrl=function(a){try{var c;c=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");c.open("GET",a,r);c.send(k);var b=c.responseXML;if(b){var g=a.lastIndexOf("/");0<=g&&(rb=a.substr(0,g+1));e.readConfigXml(b)}else alert("Error loading XML")}catch(h){alert("Error XML:"+h)}};var Va=j;e.readConfigXml=function(a){var f=a.firstChild,a=f.firstChild;a==k&&(a=f.nextSibling.firstChild);for(var b;a;){if("view"==a.nodeName)for(f=
a.firstChild;f;){"start"==f.nodeName&&(b=f.getAttributeNode("column"),c.M=Number(b?b.nodeValue:0),c.x=c.M,b=f.getAttributeNode("row"),c.N=Number(b?b.nodeValue:0),c.y=c.N,b=f.getAttributeNode("state"),c.W=Number(b?b.nodeValue:0),c.state=c.W);"zoom"==f.nodeName&&(b=f.getAttributeNode("min"),g.min=1*(b?b.nodeValue:1),b=f.getAttributeNode("default"),g.S=1*(b?b.nodeValue:1),g.a=g.S,b=f.getAttributeNode("max"),g.max=1*(b?b.nodeValue:1),b=f.getAttributeNode("centerx"),g.c=1*(b?b.nodeValue:0),b=f.getAttributeNode("centery"),
g.d=1*(b?b.nodeValue:0));if("viewer"==f.nodeName&&((b=f.getAttributeNode("background"))&&(ac=1==b.nodeValue),(b=f.getAttributeNode("backgroundcolor"))&&(bc=1*b.nodeValue),b=f.getAttributeNode("imagescaling")))g.fa=1*b.nodeValue;f=f.nextSibling}if("autorotate"==a.nodeName&&(Va&&(ia=r),(b=a.getAttributeNode("start"))&&(ia=1==b.nodeValue),(b=a.getAttributeNode("pingpong"))&&(ib=1==b.nodeValue),(b=a.getAttributeNode("speed"))&&(ha=1*b.nodeValue),(b=a.getAttributeNode("delay"))&&(Ga=1*b.nodeValue),Z=ia,
(b=a.getAttributeNode("onlyonce"))&&0<b.nodeValue))f=c.M,f=0<ha?f+(b.nodeValue*c.f+0.5):f-(b.nodeValue*c.f+0.5),e.moveTo(f,c.N,0,Math.abs(ha));if("input"==a.nodeName){if(b=a.getAttributeNode("columns"))c.f=1*b.nodeValue;if(b=a.getAttributeNode("rows"))c.k=1*b.nodeValue;if(b=a.getAttributeNode("states"))c.G=1*b.nodeValue;if(b=a.getAttributeNode("width"))c.width=1*b.nodeValue;if(b=a.getAttributeNode("height"))c.height=1*b.nodeValue;if(b=a.getAttributeNode("fileextension"))c.ba=b.nodeValue;if(b=a.getAttributeNode("imagepath"))c.path=
b.nodeValue;if(b=a.getAttributeNode("leveltileurl"))c.ja=b.nodeValue;if(b=a.getAttributeNode("leveltilesize"))c.n=Number(b.nodeValue);if(b=a.getAttributeNode("overlap"))c.da=b.nodeValue;if(b=a.getAttributeNode("preload"))c.ea=1==b.nodeValue;c.l=[];for(f=a.firstChild;f;){if("level"==f.nodeName){var i={};b=f.getAttributeNode("width");i.width=1*(b?b.nodeValue:1);b=f.getAttributeNode("height");i.height=1*(b?b.nodeValue:1);b=f.getAttributeNode("preload");i.R=r;b&&(i.R=1==b.nodeValue);i.v=Math.floor((i.width+
c.n-1)/c.n);i.O=Math.floor((i.height+c.n-1)/c.n);i.z=[];i.aa=[];c.l.push(i)}f=f.nextSibling}}"control"==a.nodeName&&Va&&((b=a.getAttributeNode("simulatemass"))&&(eb=1==b.nodeValue),(b=a.getAttributeNode("locked"))&&(D=1==b.nodeValue),b&&(va=1==b.nodeValue),(b=a.getAttributeNode("lockedmouse"))&&(D=1==b.nodeValue),(b=a.getAttributeNode("lockedkeyboard"))&&(va=1==b.nodeValue),(b=a.getAttributeNode("lockedwheel"))&&(Sb=1==b.nodeValue),(b=a.getAttributeNode("invertwheel"))&&(Tb=1==b.nodeValue),(b=a.getAttributeNode("speedwheel"))&&
(Ub=1*b.nodeValue),(b=a.getAttributeNode("sensitifity"))&&(ka=1*b.nodeValue),(b=a.getAttributeNode("sensitivity"))&&(ka=1*b.nodeValue),(b=a.getAttributeNode("wrapx"))&&(Hb=1==b.nodeValue),(b=a.getAttributeNode("wrapy"))&&(Ib=1==b.nodeValue),(b=a.getAttributeNode("revx"))&&(cb=1==b.nodeValue),(b=a.getAttributeNode("revy"))&&(db=1==b.nodeValue),(b=a.getAttributeNode("swapxy"))&&(T=1==b.nodeValue),(b=a.getAttributeNode("dblclickfullscreen"))&&(ob=1==b.nodeValue),(b=a.getAttributeNode("automovemode"))&&
(Jb=1==b.nodeValue),(b=a.getAttributeNode("controller"))&&(Za=1*b.nodeValue));if("qthotspots"==a.nodeName){(b=a.getAttributeNode("reuse"))&&(da=1*b.nodeValue);(b=a.getAttributeNode("enabled"))&&(na=1==b.nodeValue);oa=[];i={id:0,title:"",url:"",target:""};oa[i.id]=i;for(f=a.firstChild;f;)"hotspot"==f.nodeName&&(i={},b=f.getAttributeNode("id"),i.id=1*(b?b.nodeValue:1),b=f.getAttributeNode("title"),i.title=b?b.nodeValue.toString():"",b=f.getAttributeNode("url"),i.url=b?b.nodeValue.toString():"",b=f.getAttributeNode("target"),
i.target=b?b.nodeValue.toString():"",oa[i.id]=i),f=f.nextSibling}if("hotspots"==a.nodeName)for(f=a.firstChild;f;){if("label"==f.nodeName){i=Aa;if(b=f.getAttributeNode("enabled"))i.enabled=1==b.nodeValue;if(b=f.getAttributeNode("width"))i.width=1*b.nodeValue;if(b=f.getAttributeNode("height"))i.height=1*b.nodeValue;if(b=f.getAttributeNode("textcolor"))i.Y=1*b.nodeValue;if(b=f.getAttributeNode("textalpha"))i.X=1*b.nodeValue;if(b=f.getAttributeNode("background"))i.background=1==b.nodeValue;if(b=f.getAttributeNode("backgroundalpha"))i.A=
1*b.nodeValue;if(b=f.getAttributeNode("backgroundcolor"))i.B=1*b.nodeValue;if(b=f.getAttributeNode("border"))i.Q=1*b.nodeValue;if(b=f.getAttributeNode("bordercolor"))i.D=1*b.nodeValue;if(b=f.getAttributeNode("borderalpha"))i.C=1*b.nodeValue;if(b=f.getAttributeNode("borderradius"))i.P=1*b.nodeValue;if(b=f.getAttributeNode("wordwrap"))i.wordwrap=1==b.nodeValue}"polystyle"==f.nodeName&&((b=f.getAttributeNode("mode"))&&(s=1*b.nodeValue),(b=f.getAttributeNode("bordercolor"))&&(sb=1*b.nodeValue),(b=f.getAttributeNode("backgroundcolor"))&&
(ub=1*b.nodeValue),(b=f.getAttributeNode("borderalpha"))&&(tb=1*b.nodeValue),(b=f.getAttributeNode("backgroundalpha"))&&(vb=1*b.nodeValue));if("hotspot"==f.nodeName){i={hstype:"point",pan:0,tilt:0,url:"",target:"",id:"",skinid:"",w:100,h:20,wordwrap:r,obj:k,q:k};(b=f.getAttributeNode("url"))&&(i.url=b.nodeValue.toString());(b=f.getAttributeNode("target"))&&(i.target=b.nodeValue.toString());(b=f.getAttributeNode("title"))&&(i.title=b.nodeValue.toString());(b=f.getAttributeNode("id"))&&(i.id=b.nodeValue.toString());
if(b=f.getAttributeNode("reuse"))i.reuse=b.nodeValue;(b=f.getAttributeNode("skinid"))&&(i.skinid=b.nodeValue.toString());(b=a.getAttributeNode("width"))&&(i.w=b.nodeValue.toString());(b=a.getAttributeNode("height"))&&(i.h=b.nodeValue.toString());(b=a.getAttributeNode("wordwrap"))&&(i.wordwrap=1==b.nodeValue);i.locations=[];for(var h=f.firstChild;h;){if("location"==h.nodeName){var l={column:0,row:0,state:0,x:0,y:0};(b=h.getAttributeNode("column"))&&(l.column=Number(b.nodeValue));(b=h.getAttributeNode("row"))&&
(l.row=Number(b.nodeValue));(b=h.getAttributeNode("state"))&&(l.state=Number(b.nodeValue));(b=h.getAttributeNode("x"))&&(l.x=Number(b.nodeValue));(b=h.getAttributeNode("y"))&&(l.y=Number(b.nodeValue));i.locations.push(l)}h=h.nextSibling}y.push(i)}if("polyhotspot"==f.nodeName){i={hstype:"poly",url:"",target:"",id:"",skinid:"",reuse:0,w:100,h:20,wordwrap:r,obj:k,q:k,p:0,t:0};(b=f.getAttributeNode("url"))&&(i.url=b.nodeValue.toString());(b=f.getAttributeNode("target"))&&(i.target=b.nodeValue.toString());
(b=f.getAttributeNode("title"))&&(i.title=b.nodeValue.toString());(b=f.getAttributeNode("id"))&&(i.id=b.nodeValue.toString());if(b=f.getAttributeNode("reuse"))i.reuse=b.nodeValue;i.D=sb;i.B=ub;i.C=tb;i.A=vb;if(b=f.getAttributeNode("bordercolor"))i.D=1*b.nodeValue;if(b=f.getAttributeNode("backgroundcolor"))i.B=1*b.nodeValue;if(b=f.getAttributeNode("borderalpha"))i.C=1*b.nodeValue;if(b=f.getAttributeNode("backgroundalpha"))i.A=1*b.nodeValue;i.H=[];for(h=f.firstChild;h;){if("polygon"==h.nodeName){l=
{Z:0,$:0,state:0,ga:""};if(b=h.getAttributeNode("vertices")){l.ga=b.nodeValue.toString();b=l.ga.split("|");l.L=[];for(var m=0;m<b.length;m++){var n={},o=b[m].split(";");n.q=[];for(var p=0;p<o.length;p++){var q=o[p].split(","),u={};u.x=1*q[0];u.y=1*q[1];n.q.push(u)}l.L.push(n)}}if(b=h.getAttributeNode("column"))l.Z=b.nodeValue;if(b=h.getAttributeNode("row"))l.$=b.nodeValue;if(b=h.getAttributeNode("state"))l.state=b.nodeValue;i.H.push(l)}h=h.nextSibling}y.push(i)}f=f.nextSibling}"userdata"==a.nodeName&&
(b=a.getAttributeNode("title"),e.userdata.title=b?b.nodeValue.toString():"",b=a.getAttributeNode("description"),e.userdata.description=b?b.nodeValue.toString():"",b=a.getAttributeNode("author"),e.userdata.author=b?b.nodeValue.toString():"",b=a.getAttributeNode("datetime"),e.userdata.datetime=b?b.nodeValue.toString():"",b=a.getAttributeNode("copyright"),e.userdata.copyright=b?b.nodeValue.toString():"",b=a.getAttributeNode("source"),e.userdata.source=b?b.nodeValue.toString():"",b=a.getAttributeNode("info"),
e.userdata.information=b?b.nodeValue.toString():"",b=a.getAttributeNode("comment"),e.userdata.comment=b?b.nodeValue.toString():"");a=a.nextSibling}e.ha();e.b=j;Va&&e.divSkin&&e.divSkin.ggViewerInit&&e.divSkin.ggViewerInit();Va=r;e.hasConfig=j;qa();t.style.backgroundColor=ac?$b(bc):"transparent";e.preloadImages()};e.openUrl=function(a,c){0<a.length&&window.open(a,c)};e.detectBrowser();e.createLayers(Ca);e.assignHandler()}window.object2vrPlayer=object2vrPlayer;
window.ggHasCanvas=function(){var Ca=document.createElement("canvas");return!(!Ca.getContext||!Ca.getContext("2d"))};
