(function(){var e=function(){return this}.call();e.Z={}})(),Z.showImage=function(e,t,n){Z.Utils.z202(),Z.Utils.z201(),Z.Utils.z200(),Z.Utils.z258(),Z.z361=e,Z.imagePath=Z.Utils.z392(t),Z.parameters=Z.Utils.z368(n),Z.Utils.addEventListener(document,"DOMContentLoaded",Z.initialize),Z.Utils.addEventListener(window,"load",Z.initialize)},Z.initialize=function(){arguments.callee.done||(arguments.callee.done=!0,Z.Utils.z259(),Z.Utils.z399(Z.parameters),Z.Viewer=new Z.ZoomifyImageViewer,Z.Utils.isStrVal(Z.z245)?Z.Utils.z275():Z.Viewer.z229(),Z.debug!=0&&Z.Utils.trace(Z.Utils.z285("z122")))},Z.ZoomifyImageViewer=function(){Z.ViewerDisplay=Z.Utils.z248("div","ViewerDisplay","inline-block","relative","hidden","100%","100%","0px","0px","none","0px","transparent none","0px","0px","normal","pointer"),Z.pageContainer=document.getElementById(Z.z361);var e=Z.Utils.getElementStyle(Z.pageContainer);Z.viewerW=parseFloat(e.width),Z.viewerH=parseFloat(e.height),isNaN(Z.viewerW)&&(Z.viewerW=Z.ViewerDisplay.clientWidth),isNaN(Z.viewerH)&&(Z.viewerH=Z.ViewerDisplay.clientHeight),Z.pageContainer.innerHTML="",Z.pageContainer.appendChild(Z.ViewerDisplay),this.z229=function(){Z.Viewport=new Z.ZoomifyViewport},this.z227=function(){Z.toolbarVisible>0&&(Z.Toolbar=new Z.ZoomifyToolbar(Z.Viewport)),Z.navigatorVisible>0&&(Z.Navigator=new Z.ZoomifyNavigator(Z.Viewport)),Z.Navigator&&Z.Navigator.z432()},this.setSizeAndPosition=function(e,t,n,r,i){Z.viewerW=e,Z.viewerH=t,Z.ViewerDisplay.style.width=e+"px",Z.ViewerDisplay.style.height=t+"px",Z.Viewport&&Z.Viewport.z284()&&Z.Viewport.setSizeAndPosition(e,t,n,r);var s=Z.toolbarPosition==1?t-Z.toolbarH:0;Z.ToolbarDisplay&&Z.Toolbar.z284()&&(Z.Toolbar.setSizeAndPosition(e,null,null,s),Z.toolbarVisible>1&&Z.Toolbar.show(!0)),Z.NavigatorDisplay&&Z.Navigator.z284()&&(Z.Navigator.setSizeAndPosition(null,null,n,r,Z.navigatorFit),Z.navigatorVisible>1&&Z.Navigator.setVisibility(!0)),i&&Z.Viewport.updateView(!0)},this.setImagePath=function(e,t){if(Z.Viewport&&Z.Viewport.z284()){Z.Viewport.z448(!0),Z.imagePath=Z.Utils.z392(e);if(t==null){var n=new Z.NetConnector;Z.Viewport.loadImageProperties(n)}else{var r=Z.Utils.z241(t);Z.Viewport.z366(r)}}},this.setHotspotPath=function(e){Z.Viewport&&Z.Viewport.z284()&&Z.Viewport.setHotspotPath(e)}},Z.ZoomifyViewport=function(){function xr(t,s,u,f,l,c,h,p,d,v){Z.imageW=t,Z.imageH=s,n=l,r=c,i=h,o=f,a=u,Z.sourceMagnification=p,Z.focal=d,Z.quality=v,_r(),Hr(),et=Ci(K,Z.initialZ),G=Ci(J,Z.initialZ),Y=G,Z.useCanvas&&x.scale(G,G),A&&Di(),_&&Ii(),Fr(),Hs(Z.initialX,Z.initialY,Z.initialZ),Z.fullPageInitial&&e.toggleFullPageView(!0),Xs(),jr(!0),Z.Viewer.z227()}function Tr(e,t,s,u,f,l,c,h,p,d){jr(!1),Nr(),Z.imageW=e,Z.imageH=t,n=f,r=l,i=c,o=u,a=s,_r(),Hr(),et=Ci(K,Z.initialZ),G=Ci(J,Z.initialZ),Y=G,Z.useCanvas&&(x.restore(),x.scale(G,G)),g&&ui(g),E&&ui(E),N&&ui(N),A&&ui(A),_&&ui(_),q&&ui(q),W&&ui(W),A&&Di(),_&&Ii(),Fr(),kr(kt,Lt,At,Ot),Hs(Z.initialX,Z.initialY,Z.initialZ),jr(!0),Z.navigatorVisible>0&&Z.Navigator.setImagePath(Z.imagePath)}function Nr(){$=1,J=0,K=0,tt=[],nt=[],rt=[],it=[],st=[],ot=[],ut=[],at=[],ft=[],lt=[],ct=[],ht=[],pt=[],dt=[],vt=[],mt=[],gt=[],yt=[],bt=0,A&&(Cn=[],kn=[]),_&&(Ln=[],An=[],Qn!=null?tr=[]:(lr=[],pr=[],dr=[],cr=[],hr=[]))}function Cr(){p=Z.Utils.z248("div","viewportContainer","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),Z.ViewerDisplay.appendChild(p),d=p,v=d.style,m=Z.Utils.z248(Z.useCanvas?"canvas":"div","viewportBackfillDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(m),g=m,y=g.style,w=Z.Utils.z248(Z.useCanvas?"canvas":"div","viewportDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(w),E=w,S=E.style,Z.useCanvas&&(T=Z.Utils.z248("canvas","transitionDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(T),N=T,C=N.style),Z.Utils.isStrVal(Z.watermarkPath)&&(L=Z.Utils.z248("div","watermarkDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(L),A=L,O=A.style);if(Z.Utils.isStrVal(Z.hotspotPath)||Z.Utils.isStrVal(Z.annotationPath))Z.Utils.isStrVal(Z.annotationPath)&&Z.useCanvas&&(I=Z.Utils.z248("canvas","drawingDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(I),q=I,R=q.style,Z.editMode&&(z=Z.Utils.z248("canvas","editingDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(z),W=z,X=W.style)),M=Z.Utils.z248("div","hotspotDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),p.appendChild(M),_=M,D=_.style;Z.useCanvas?(b=g.getContext("2d"),x=E.getContext("2d"),k=N.getContext("2d")):(g.innerHTML="",E.innerHTML=""),A&&(A.innerHTML=""),_&&(_.innerHTML=""),q&&(U=q.getContext("2d")),W&&(V=W.getContext("2d"))}function kr(e,t,n,r){if(typeof n=="undefined"||n===null)n=0;if(typeof r=="undefined"||r===null)r=0;kt=e,Lt=t,Mt=kt*Ct,_t=Lt*Ct,Dt=Mt/2,Pt=_t/2,Ht=-((Mt-kt)/2)+n,Bt=(Mt-kt)/2+n,jt=-((_t-Lt)/2)+r,Ft=(_t-Lt)/2+r,d.width=Mt,d.height=_t,v.width=Mt+"px",v.height=_t+"px",v.left=Ht+"px",v.top=jt+"px",E.width=Mt,E.height=_t,A&&(A.width=Mt,A.height=_t,O.width=Mt+"px",O.height=_t+"px");if(_){_.width=Mt,_.height=_t,D.width=Mt+"px",D.height=_t+"px";if(P){var i=parseInt(Z.Utils.z285("z69"),10),s=rs(Gn,i,kt,Lt);H.left=s.x+"px",H.top=s.y+"px"}}q&&(q.width=Mt,q.height=_t,R.width=Mt+"px",R.height=_t+"px"),W&&(W.width=Mt,W.height=_t,X.width=Mt+"px",X.height=_t+"px");if(B){var o=parseInt(Z.Utils.z285("z29"),10),u=parseInt(Z.Utils.z285("z27"),10),a=ls(rr,o,u,kt,Lt);F.left=a.x+"px",F.top=a.y+"px"}Z.useCanvas&&(x.translate(Dt,Pt),x.save(),q&&(U.translate(Dt,Pt),U.save()),W&&(V.translate(Dt,Pt),V.save()))}function Lr(e){if(Z.tileSource=="ZoomifyImageFolder"){var t=Z.Utils.z215(Z.imagePath+"/"+"ImageProperties.xml");e.loadXML(t)}else Z.tileSource=="ZoomifyImageFile"?Or(e):Z.tileSource=="ImageServer"&&Mr(e)}function Ar(t){if(typeof e.z284=="undefined")var n=window.setTimeout(function(){Ar(t)},100);else{var r=null,i=null,s=null,o=null,u=null,f=null,l=null,c=null,h=null,p=null,d=null;if(Z.tileSource=="ZoomifyImageFolder")r=parseInt(t.documentElement.getAttribute("WIDTH"),10),i=parseInt(t.documentElement.getAttribute("HEIGHT"),10),o=parseInt(t.documentElement.getAttribute("NUMTILES"),10),u=parseInt(t.documentElement.getAttribute("NUMIMAGES"),10),f=parseInt(t.documentElement.getAttribute("VERSION"),10),s=parseInt(t.documentElement.getAttribute("TILESIZE"),10);else if(Z.tileSource=="ZoomifyImageFile")r=parseInt(t.documentElement.getAttribute("WIDTH"),10),i=parseInt(t.documentElement.getAttribute("HEIGHT"),10),s=parseInt(t.documentElement.getAttribute("TILESIZE"),10),o=parseInt(t.documentElement.getAttribute("NUMTILES"),10),u=parseInt(t.documentElement.getAttribute("NUMIMAGES"),10),f=parseInt(t.documentElement.getAttribute("VERSION"),10),l=parseInt(t.documentElement.getAttribute("HEADERSIZE"),10),c=1060+l;else if(Z.tileSource=="ImageServer"){r=parseInt(t.documentElement.getAttribute("WIDTH"),10),i=parseInt(t.documentElement.getAttribute("HEIGHT"),10);var v=t.documentElement.getAttribute("TILESIZE");s=Z.Utils.isStrVal(v)?parseInt(v,10):a;var m=t.documentElement.getAttribute("MAGNIFICATION");h=Z.Utils.isStrVal(m)?parseInt(m,10):Z.sourceMagnification;var g=t.documentElement.getAttribute("FOCAL");p=Z.Utils.isStrVal(g)?parseInt(g,10):Z.focal;var y=t.documentElement.getAttribute("QUALITY");d=Z.Utils.isStrVal(y)?parseInt(y,10):Z.quality}if(Z.tileSource=="ZoomifyImageFolder"||Z.tileSource=="ImageServer"){if(s==null||isNaN(s))s=a;if(o==null||isNaN(o))o=1}!isNaN(r)&&r>0&&!isNaN(i)&&i>0&&!isNaN(s)&&s>0&&o>0?e.z284()?Tr(r,i,s,o,f,l,c,h,p,d):xr(r,i,s,o,f,l,c,h,p,d):Z.Utils.z405(Z.Utils.z285("z147"))}}function Or(e){var t=1,n=0,r=1060,i=Z.imagePath.replace(".","%2E"),s=Z.tileHandlerPathFull+"?file="+i+"&requestType="+t+"&begin="+n+"&end="+r;e.loadXML(s)}function Mr(){}function _r(){var e=Dr();e!=o&&(Z.tileSource=="ZoomifyImageFolder"||Z.tileSource=="ZoomifyImageFile")&&(e=Pr(),e!=o&&Z.Utils.z405(Z.Utils.z285("z146")))}function Dr(){var e=Z.imageW,t=Z.imageH;while(e>a||t>a)e/=2,t/=2,$++;e=Z.imageW,t=Z.imageH;var n=0;for(var r=$-1;r>=0;r--)rt[r]=e,it[r]=t,st[r]=Math.ceil(rt[r]/a),ot[r]=Math.ceil(it[r]/a),ut[r]=st[r]*ot[r],e/=2,t/=2,n+=ut[r];return n}function Pr(){rt=[],it=[],st=[],ot=[],$=0;var e="DIV2",t=Z.imageW,n=Z.imageH;$=1;var r=2;while(t>a||n>a)e=="Div2"?(t=Math.floor(t/2),n=Math.floor(n/2)):e=="Plus1Div2"?(t=Math.floor((t+1)/2),n=Math.floor((n+1)/2)):(t=Math.floor(Z.imageW/r),n=Math.floor(Z.imageH/r),r*=2,t%2&&t++,n%2&&n++),$++;t=Z.imageW,n=Z.imageH,r=2,tileCounter=0;for(var i=$-1;i>=0;i--)st[i]=Math.floor(t/a),t%a&&st[i]++,ot[i]=Math.floor(n/a),n%a&&ot[i]++,ut[i]=st[i]*ot[i],tileCounter+=ut[i],rt[i]=t,it[i]=n,e=="Div2"?(t=Math.floor(t/2),n=Math.floor(n/2)):e=="Plus1Div2"?(t=Math.floor((t+1)/2),n=Math.floor((n+1)/2)):(t=Math.floor(Z.imageW/r),n=Math.floor(Z.imageH/r),r*=2,t%2&&t++,n%2&&n++);return tileCounter}function Hr(){var e=parseFloat(Z.Utils.z285("z74")),t=parseFloat(Z.Utils.z285("z75")),n=parseFloat(Z.Utils.z285("z76")),r=parseFloat(Z.Utils.z285("z83")),i=parseFloat(Z.Utils.z285("z81"));niX=isNaN(e)?null:e,niY=isNaN(t)?null:t,niZ=isNaN(n)?null:n,nmnZ=isNaN(r)?null:r,nmxZ=isNaN(i)?null:i;if(!Z.parameters)Z.initialX=niX,Z.initialY=niY,Z.initialZ=niZ,Z.minZ=nmnZ,Z.maxZ=nmxZ;else{var s=Z.parameters.toString();s.indexOf("zInitialX")==-1&&(Z.initialX=niX),s.indexOf("zInitialY")==-1&&(Z.initialY=niY),s.indexOf("zInitialZoom")==-1&&(Z.initialZ=niZ),s.indexOf("zMinZ")==-1&&(Z.minZ=nmnZ),s.indexOf("zMaxZ")==-1&&(Z.maxZ=nmxZ)}Z.initialX==null&&(Z.initialX=Z.imageW/2),Z.initialY==null&&(Z.initialY=Z.imageH/2),Z.fitZ=Ti(),Z.initialZ==null&&(Z.initialZ=Z.fitZ),Z.minZ==null&&(Z.minZ=Z.fitZ),Z.maxZ==null&&(Z.maxZ=Z.fitZ),Z.initialZZ.maxZ&&(Z.initialZ=Z.maxZ)}function Br(){return t}function jr(e){t=e}function Fr(){Ir(Nt),$>St&&(Ir(Tt),$>Et&&Ir(xt)),nt.sort(),nt=Z.Utils.z391(nt),$r(nt,Gr,"simple","backfill")}function Ir(e){var t=st[e]-1,n=ot[e]-1;for(var r=0;r<=n;r++)for(var i=0;i<=t;i++)nt.push(e+"-"+i+"-"+r)}function qr(e,t){}function Rr(t){var n=!1;if(t||parseFloat(S.width)!=E.width)Z.useCanvas&&(S.width=E.width+"px",S.height=E.height+"px",S.left="0px",S.top="0px",x.restore(),x.save(),x.scale(G,G),q&&(R.width=q.width+"px",R.height=q.height+"px",R.left="0px",R.top="0px"),W&&(X.width=W.width+"px",X.height=W.height+"px",X.left="0px",X.top="0px")),n=!0;if(t||parseFloat(v.left)!=Ht||parseFloat(v.top)!=jt){var r=parseFloat(v.left)-Ht,i=parseFloat(v.top)-jt;v.left=Ht+"px",v.top=jt+"px",Rt=parseFloat(y.left)+r,Ut=parseFloat(y.top)+i,y.left=Rt+"px",y.top=Ut+"px";var s=e.getZoom();Z.imageX=Z.imageX-r/s,Z.imageY=Z.imageY-i/s,n=!0}n&&Xr(E,J,lt,"centerOut",!1,"1. Updating view: resetting display positions")}function Ur(){G!=Y&&(Z.imageZ=rn),Z.imageZ=Z.imageZ)t--,e/=2;t=t-1<0?0:t-1;var n=Ci(t,Z.imageZ);if(t!=J||n!=G)Z.useCanvas&&(x.restore(),x.save(),x.scale(n,n)),J!=t&&(Q=!0),J=t,G=n;Y=G}function zr(){K=J>Et?xt:J>St?Tt:Nt,et=Ci(K,Z.imageZ),tierBackfillW=rt[K],tierBackfillH=it[K],g.width=tierBackfillW,g.height=tierBackfillH;var e=tierBackfillW*et,t=tierBackfillH*et,n=Z.imageX*Z.imageZ,r=Z.imageY*Z.imageZ;It=e,qt=t,Rt=Dt-n,Ut=Pt-r,Z.useCanvas&&(y.width=It+"px",y.height=qt+"px"),y.left=Rt+"px",y.top=Ut+"px"}function Wr(){var e=mi();ft=[];for(var t=e.top,n=e.bottom;t<=n;t++)for(var r=e.left,i=e.right;r<=i;r++)ft.push(J+"-"+r+"-"+t);ct.sort(),ft.sort(),ct=Z.Utils.z391(ct),ft=Z.Utils.z391(ft),Z.debug==2&&Z.Utils.trace("Tiles required: "+ft.join(", "));var s=Z.Utils.intersect(ft,ct);ft=Z.Utils.subtract(ft,ct),bt=tilesLoadingNamesLength=ft.length,Z.ToolbarDisplay&&Z.Toolbar.z284()&&Z.Toolbar.updateProgress(bt,tilesLoadingNamesLength),ct=Z.Utils.subtract(ct,s),ct=ct.concat(s);if(tilesLoadingNamesLength!=0){for(var o=0,u=at.length;o0){var o=mi();i||ui(e);if(r=="canvasCopy")ui(E),x.restore(),x.save(),x.scale(1,1),x.drawImage(N,-Dt,-Pt),x.restore(),x.save(),x.scale(G,G);else if(r=="centerOut"){var u=Math.floor(n.length/2);for(var a=u,f=n.length;a=o.left&&l.c<=o.right&&l.r>=o.top&&l.r<=o.bottom)&&ei(e,t,l);if(n.length-a-1!=a){var l=n[n.length-a-1];l&&l.t==t&&(t==K||l.c>=o.left&&l.c<=o.right&&l.r>=o.top&&l.r<=o.bottom)&&ei(e,t,l)}}}else for(var a=0,f=n.length;a=o.left&&l.c<=o.right&&l.r>=o.top&&l.r<=o.bottom)&&ei(e,t,l)}if(Z.debug==2&&e.id=="viewportDisplay"){var c=[];for(var a=0,f=n.length;a=o.left&&n[a].c<=o.right&&n[a].r>=o.top&&n[a].r<=o.bottom)&&c.push(n[a].name);c.length>0&&(c.sort(),c=Z.Utils.z391(c));var h=c.length>0?c.join(", "):"No cached tiles to redisplay";Z.Utils.trace("Tiles redisplaying - "+s+": "+h)}}}function Vr(e,t){var n=mi();N.width=E.width,N.height=E.height,C.width=S.width,C.height=S.height,C.left=S.left,C.top=S.top,k.restore(),k.save(),k.translate(Dt,Pt),k.scale(G,G);for(var r=0,i=t.length;r=n.left&&s.c<=n.right&&s.r>=n.top&&s.r<=n.bottom)&&ei(N,e,s)}}function $r(e,t,n,r){var i=typeof r!="undefined"&&r!==null?" - "+r+": ":": ";Z.debug==2&&i!=" - backfill: "&&Z.Utils.trace("Tiles to be loaded"+i+e.join(", "));if(e.length==0)Z.debug==2&&Z.Utils.trace("No new tiles loaded.");else{var s=(new Date).getTime();if(n=="centerOut"){var o=Math.floor(e.length/2);for(var u=o,a=e.length;u0&&(lt.push(e),ct.push(n)),at.indexOf(e)==-1&&at.push(e),Z.debug==2&&(Z.Utils.trace("Tile received: "+e.name),i==0&&Z.Utils.trace("Tile loading complete: all requested tiles received.")),ln||(ln=window.setInterval(Zr,50));var i=ft.length;if(i==0){if(Z.useCanvas&&c>0)if(!Q)Xr(E,J,lt,"centerOut",!1,"4. Updating view: all new tiles loaded");else{Vr(J,lt),Xr(E,J,lt,"canvasCopy",!1,"4. Updating view: all new tiles loaded");var s=window.setTimeout(function(){ui(N)},200);Q=!1}ct.length>c&&oi(),bt=0}Z.ToolbarDisplay&&Z.Toolbar.z284()&&Z.Toolbar.updateProgress(bt,i)}}else t==null&&(Z.mobileDevice?console.log(Z.Utils.z285("z161")+e.name+".jpg"):Z.Utils.z405(Z.Utils.z285("z161")+e.name+".jpg"))}function Gr(e,t){if(e&&t){e.image=t;var n=e.name;tt.push(e);var r=nt.indexOf(n);r!=-1&&nt.splice(r,1);if(Z.tileSource=="ZoomifyImageFile"){var i=yt.indexOf(n);i!=-1&&yt.splice(i,1)}e.alpha=1,e.t==K&&ei(g,K,e)}else t==null&&(Z.mobileDevice?console.log(Z.Utils.z285("z161")+e.name+".jpg"):Z.Utils.z405(Z.Utils.z285("z161")+e.name+".jpg"))}function Yr(e,t){if(e&&t){e.image=t;var n=e.name;ei(E,J,e)}else t==null&&(Z.mobileDevice?console.log(Z.Utils.z285("z161")+e.name+".jpg"):Z.Utils.z405(Z.Utils.z285("z161")+e.name+".jpg"))}function Zr(e){var t=0;for(var n=0,r=at.length;n=r&&(window.clearInterval(ln),ln=null,n=r);else{at.splice(n,1);var s=ft.indexOf(i.name);s!=-1&&ft.splice(s,1),r--}}}function ei(e,t,n){if(n.url.substr(0,8)!="skipTile"){var r=n.x,i=n.y,s=Ni(t,1);if(Z.useCanvas){if(e==E||e==N)r-=Z.imageX*s,i-=Z.imageY*s;ti(e,n,r,i)}else{var o;e==E?(r-=Z.imageX*s-Dt/G,i-=Z.imageY*s-Pt/G,o=G):o=et,ni(e,n,r,i,o)}}}function ti(e,t,n,r){var i=e.getContext("2d");Z.alphaSupported&&t.alpha<1&&e.id!="transitionDisplay"?(i.globalAlpha=t.alpha,i.drawImage(t.image,n,r),i.globalAlpha=1):i.drawImage(t.image,n,r),Z.debug==2&&ri(e,t.name,n,r,G)}function ni(e,t,n,r,i){t.elmt||(t.elmt=Z.Utils.z248("img"),t.elmt.onmousedown=Z.Utils.preventDefault,Z.Utils.addEventListener(t.elmt,"contextmenu",Z.Utils.preventDefault),t.elmt.src=t.url,t.style=t.elmt.style,t.style.position="absolute",Z.Utils.renderQuality(t,Z.renderQuality),Z.cssTransformsSupported&&(t.style[Z.cssTransformProperty+"Origin"]="0px 0px")),t.elmt.parentNode!=e&&e.appendChild(t.elmt);var s=t.style;s.display="none",Z.cssTransformsSupported?s[Z.cssTransformProperty]=["matrix(",(t.image.width/t.elmt.width*i).toFixed(8),",0,0,",(t.image.height/t.elmt.height*i).toFixed(8),",",(n*i).toFixed(8),Z.cssTransformNoUnits?",":"px,",(r*i).toFixed(8),Z.cssTransformNoUnits?")":"px)"].join(""):(s.width=t.image.width*i+"px",s.height=t.image.height*i+"px",s.left=n*i+"px",s.top=r*i+"px"),s.display="inline-block",Z.Utils.z398(t,t.alpha),Z.debug==2&&ri(e,t.name,n,r,i)}function ri(e,t,n,r,i){Z.useCanvas?ii(e,t,n,r,i):si(e,t,n,r,i)}function ii(e,t,n,r,i){var s=parseInt(Z.Utils.z285("z64"),10),o=parseInt(Z.Utils.z285("z82"),10),u=parseInt(Z.Utils.z285("z80"),10),f=Math.round(s*i),l=2*(fu?u:f),c=e.getContext("2d");c.font=l+"px verdana",c.textAlign="left",c.textBaseline="top";var h=a*i/2;c.fillStyle="#ffffff",c.fillText(t,n+h,r+h),c.fillStyle="#000000",c.fillText(t,n+h+1,r+h+1)}function si(e,t,n,r,i){var s=parseInt(Z.Utils.z285("z64"),10),o=parseInt(Z.Utils.z285("z82"),10),u=parseInt(Z.Utils.z285("z80"),10),f=Math.round(s*i),l=2*(fu?u:f),c=parseInt(Z.Utils.z285("z65"),10)*i,h=Z.Utils.z248("div","tileNameTextBox","inline-block","absolute","hidden","auto","auto","1px","1px","none","0px","transparent none","0px",c+"px","nowrap"),p=document.createTextNode(t);h.appendChild(p),e.appendChild(h),Z.Utils.z401(p,"white","verdana",l+"px","none","normal","normal","normal","normal","1em","center","none");var d=Z.Utils.z248("div","tileNameTextBox2","inline-block","absolute","hidden","auto","auto","1px","1px","none","0px","transparent none","0px",c+"px","nowrap"),v=document.createTextNode(t);d.appendChild(v),e.appendChild(d),Z.Utils.z401(v,"black","verdana",l+"px","none","normal","normal","normal","normal","1em","center","none");var c=parseFloat(h.style.padding),m=parseFloat(Z.Utils.getElementStyleProperty(h,"width"));if(isNaN(m)){var g=parseFloat(Z.Utils.z285("z56")),y=parseFloat(h.style.fontSize)/g;m=Math.round(parseFloat(t.length*y))}var b=a*i/2,w=a*i/2;h.style.left=n*i+(b-m/2-c)+"px",h.style.top=r*i+w+"px",d.style.left=1+n*i+(b-m/2-c)+"px",d.style.top=1+r*i+w+"px",Z.Utils.addEventListener(h,"contextmenu",Z.Utils.preventDefault),Z.Utils.z260(p),Z.Utils.addEventListener(d,"contextmenu",Z.Utils.preventDefault),Z.Utils.z260(v)}function oi(){while(ct.length>c&<.length>0)j=ct.indexOf(lt[0].name),j!=-1&&ct.splice(j,1),lt.splice(0,1)}function ui(e){if(e)if(Z.useCanvas&&e.tagName=="CANVAS"){var t=e.getContext("2d");t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.restore()}else while(e.hasChildNodes())e.removeChild(e.lastChild)}function ai(e,t,u,a){var f="offsetLoading",l=0,c=0,h,p,d,v,m,g,y,b;for(var w=$-1;w>e;w--)l+=ut[w];l+=u*st[e]+t,h=Math.floor(l/s),c=l-1==-1?0:l-1,p=Math.floor(c/s);if(pt[h]==undefined||pt[h]=="offsetLoading"||pt[p]==undefined||pt[p]=="offsetLoading"){var E=h+","+e+","+t+","+u+","+a;mt.indexOf(E)==-1&&mt.push(E),Z.debug==2&&Z.Utils.trace("Tile recorded for load retry after load chunk: "+h+","+e+","+t+","+u+","+a),pt[h]==undefined&&(pt[h]="offsetLoading",m=i+s*h*8,g=m+s*8,fi(m,g,h)),pt[p]==undefined&&(pt[p]="offsetLoading",y=i+s*p*8,b=y+s*8,fi(y,b,h))}else{var S=Math.floor(pt[h][0]),x=Math.floor(pt[p][0]),T=pt[p][1],N=pt[h][1];v=9*(c%s);var C=Math.floor(parseFloat(T.substring(v,v+9)));d=9*(l%s);var k=Math.floor(parseFloat(N.substring(d,d+9))),L=l==0?i+o*8:x+C,A=S+k;A-L>0?f=Z.tileHandlerPathFull+"?file="+Z.imagePath+"&requestType=0&begin="+L.toString()+"&end="+A.toString()+"&vers="+n.toString()+"&head="+r.toString():f="skipTile:"+e+"-"+t+"-"+u}return f}function fi(e,t,n){dt[e]=n;var r=2,i=Z.imagePath.replace(".","%2E"),s=Z.tileHandlerPathFull+"?file="+i+"&requestType="+r+"&begin="+e+"&end="+t,o=new Z.NetConnector;o.loadXML(s)}function li(e){Z.debug==2&&Z.Utils.trace("In z397Retry-chunk received: "+e);for(var t=0,n=mt.length;t0&&(vt.sort(),vt=Z.Utils.z391(vt),Z.debug==2&&Z.Utils.trace("Tiles being requested - offset chunk now loaded: "+vt.join(", ")),ci(vt,Qr,"simple","display")),yt.length>0&&(yt.sort(),yt=Z.Utils.z391(yt),ci(yt,Gr,"simple","backfill"))}function ci(t,n,r,i){var s=(new Date).getTime();for(var o=0,u=t.length;o0&&(lt.push(e),ct.push(e.name));var t=ft.indexOf(e.name);t!=-1&&ft.splice(t,1);if(Z.tileSource=="ZoomifyImageFile"){var n=vt.indexOf(e.name);n!=-1&&vt.splice(n,1)}at.push(e)}function pi(e,t,n,r){var i=Z.imagePath.toLowerCase().indexOf(".svs")!=-1?"svs":Z.imagePath.toLowerCase().indexOf(".ndpi")!=-1?"ndpi":null,s=di(),o=Z.imageX*Z.imageZ,u=Z.imageY*Z.imageZ,f=1;return tilePath=Z.tileHandlerPathFull+"?FIF="+Z.imagePath+"&focal="+Z.focal+"&QLT="+Z.quality+"&DSTL="+o+","+u+","+a+","+a+","+s+","+f+"&type="+i,Z.Utils.trace(tilePath),tilePath="Assets/Skins/Default/standard/toolbarLogo.png",tilePath}function di(){var e=Z.imageZ*100,t=f,n;return Z.sourceMagnification==40?e<=2.5+t?n=32:e<=5+t?n=16:e<=10+t?n=8:e<=25+t?n=4:e<=50+t?n=2:n=1:Z.sourceMagnification==20&&(e<=5+t?n=16:e<=10+t?n=8:e<=20+t?n=4:e<=50+t?n=2:n=1),n}function vi(){return new bi(gi(),J)}function mi(){return new bi(yi(),J)}function gi(){var t=parseFloat(v.left)-Ht,n=parseFloat(v.top)-jt;if(Z.useCanvas){var r=parseFloat(v.width)/d.width;t/=r,n/=r}var i=e.getZoom();t!=0&&(t/=i),n!=0&&(n/=i);var s=Z.imageX-t,o=Z.imageY-n,u=-(kt/2),a=kt/2,f=-(Lt/2),l=Lt/2;return new wi(s,o,u,a,f,l,i)}function yi(){var t=parseFloat(v.left)-Ht,n=parseFloat(v.top)-jt;if(Z.useCanvas){var r=parseFloat(v.width)/d.width;t/=r,n/=r}var i=e.getZoom();t!=0&&(t/=i),n!=0&&(n/=i);var s=Z.imageX-t,o=Z.imageY-n,u=-(Mt/2),a=Mt/2,f=-(_t/2),l=_t/2;return new wi(s,o,u,a,f,l,i)}function bi(e,t){var n=Ni(t,1),r=Math.floor(e.left*n/a),i=Math.floor(e.right*n/a),s=Math.floor(e.top*n/a),o=Math.floor(e.bottom*n/a);r<0&&(r=0),i>st[J]-1&&(i=st[J]-1),s<0&&(s=0),o>ot[J]-1&&(o=ot[J]-1),this.left=r,this.right=i,this.top=s,this.bottom=o}function wi(e,t,n,r,i,s,o){this.left=e+n/o,this.right=e+r/o,this.top=t+i/o,this.bottom=t+s/o}function Ei(e,t){var n=e-Z.Utils.getElementPosition(Z.ViewerDisplay).x,r=t-Z.Utils.getElementPosition(Z.ViewerDisplay).y;return new Z.Utils.Point(n,r)}function Si(e,t){var n=parseFloat(v.left)+Dt,r=parseFloat(v.top)+Pt,i=e-n,s=t-r,o=i/Z.imageZ,u=s/Z.imageZ,a=Z.imageX+o,f=Z.imageY+u;return new Z.Utils.Point(a,f)}function xi(e,t,n){var r=Z.imageX-e,i=Z.imageY-t,s=r*n,o=i*n,u=Ht+s,a=jt+o;return new Z.Utils.Point(u,a)}function Ti(){return Z.imageW/Z.imageH>kt/Lt?kt/Z.imageW:Lt/Z.imageH}function Ni(e,t){var n=t*(rt[e]/Z.imageW);return n}function Ci(e,t){var n=t/(rt[e]/Z.imageW);return n}function ki(e,t,n){if(Z.constrainPan){n===null&&(n=Z.imageZ);var r=new wi(e,t,-(kt/2),kt/2,-(Lt/2),Lt/2,n),i=r.left,s=r.right,o=r.top,u=r.bottom;Z.imageW*n>kt?i<0?e=kt/2/n:s>Z.imageW&&(e=Z.imageW-kt/2/n):e=Z.imageW/2,Z.imageH*n>Lt?o<0?t=Lt/2/n:u>Z.imageH&&(t=Z.imageH-Lt/2/n):t=Z.imageH/2}return new Z.Utils.Point(e,t)}function Li(t,n){if(Z.constrainPan){var r=e.getZoom(),i=Z.imageX,s=Z.imageY,o=new wi(i,s,-(kt/2),kt/2,-(Lt/2),Lt/2,r),u=o.left,a=o.right,f=o.top,l=o.bottom;Z.imageW*r>kt?u<0?t+=u*r:a>Z.imageW&&(t-=(Z.imageW-a)*r):t+=(i-Z.imageW/2)*r,Z.imageH*r>Lt?f<0?n+=f*r:l>Z.imageH&&(n-=(Z.imageH-l)*r):n+=(s-Z.imageH/2)*r}return new Z.Utils.Point(t,n)}function Ai(t,n){if(Z.constrainPan){var r=e.getZoom(),i=Z.imageX-(t-Ht)/r,s=Z.imageY-(n-jt)/r,o=new wi(i,s,-(kt/2),kt/2,-(Lt/2),Lt/2,r),u=o.left,a=o.right,f=o.top,l=o.bottom;Z.imageW*r>kt?u<0?t+=u*r:a>Z.imageW&&(t-=(Z.imageW-a)*r):t+=(i-Z.imageW/2)*r,Z.imageH*r>Lt?f<0?n+=f*r:l>Z.imageH&&(n-=(Z.imageH-l)*r):n+=(s-Z.imageH/2)*r}return new Z.Utils.Point(t,n)}function Oi(e){return e>Z.maxZ?e=Z.maxZ:eh.left&&bh.top&&w4e3){var x=v+100,T=m+100;if(Er.bounds.left&&or.bounds.top&&ue.bounds.left&&re.bounds.top&&ie.bounds.left&&r-Fne.bounds.top&&i-Fner?er:this.currentZ,this.displayOffsetL=(Z.imageW*this.currentZ-_.width)/2,this.displayOffsetT=(Z.imageH*this.currentZ-_.height)/2,this.imageOffsetL=(Z.imageW/2-Z.imageX)*this.currentZ,this.imageOffsetT=(Z.imageH/2-Z.imageY)*this.currentZ}function Yi(e,t){var n=t.constrainedScale*(e.xScale/100/(e.zoom/100)),r=Math.round(Wn*n),i=rVn?Vn:r,s=$n*n,o=sKn?Kn:s,u=Z.Utils.z248("div","captionTextBox","inline-block","absolute","hidden","auto","auto","1px","1px","solid","1px","white","0px",o+"px","nowrap"),a=document.createTextNode(unescape(e.caption));return u.appendChild(a),Z.Utils.z401(a,"black","verdana",i+"px","none","normal","normal","normal","normal","1em","center","none"),Z.Utils.addEventListener(u,"contextmenu",Z.Utils.preventDefault),Z.Utils.z260(a),u}function Zi(t,n,r,i){var s=parseFloat(t.style.padding),o=parseFloat(Z.Utils.getElementStyleProperty(t,"width"));if(isNaN(o)){var u=parseFloat(Z.Utils.z285("z56")),a=parseFloat(t.style.fontSize)/u;o=Math.round(parseFloat(t.firstChild.length*a))}var f=e.getZoom(),l=20*f,c,h;switch(n){case"1":c=-o-s,h=-l-s;break;case"2":c=(r-o)/2-s,h=-l-s;break;case"3":c=r+s,h=-l-s;break;case"4":c=-o-s,h=(i-l)/2;break;case"5":c=(r-o)/2-s,h=(i-l)/2;break;case"6":c=r+s,h=(i-l)/2;break;case"7":c=-o-s,h=i+s;break;case"8":c=(r-o)/2-s,h=i+s;break;case"9":c=r+s,h=i+s}return new Z.Utils.Point(c,h)}function es(e,t){var n=parseInt(Z.Utils.z285("z69"),10),r=rs(Gn,n,kt,Lt),i=Gn=="0"?"hidden":"visible",s=document.getElementById("hotspotList");s&&Z.ViewerDisplay.removeChild(s),Qn=new Z.Utils.z253("hotspotList",e,t,n,r.x,r.y,i,ws),P=Qn,H=P.style,Z.ViewerDisplay.appendChild(Qn)}function ts(e,t){var n=document.getElementById("hotspotList");n!=null&&(n.options[n.options.length]=new Option(e,t))}function ns(e,t){var n=e.childNodes[0];if(n&&n.style){n.style.visibility="visible";var r=t?"visible":"hidden",i=t?"":"#ffffff",s=t?1:.01;if(Z.browser!=Z.browsers.IE)n.style.visibility=r;else{n.style.backgroundColor=i,Z.Utils.z398(n,s);var o=e.childNodes[0].childNodes[1];o&&o.style&&(o.style.visibility=r)}var u=Ln.indexOfObjectValue("internalID",e.internalID);u!=-1&&(Ln[u].visibility=t)}}function rs(e,t,n,r){var i,s,o=25;switch(e){case"0":i=0,s=0;break;case"1":i=o,s=o;break;case"2":i=n-t-o,s=20;break;case"3":i=n-t-o,toolbar!=null?s=r-o:s=r-o;break;case"4":i=o,toolbar!=null?s=r-o:s=r-o;break;default:i=n-t,s=o}return new Z.Utils.Point(i,s)}function is(e){return Z.Utils.isStrVal(e.media)||Z.Utils.isStrVal(e.caption)}function ss(e){var t="[Hotspot ";return t+="id:"+e.id+", ",t+="internalID:"+e.internalID.toString()+", ",t+="name:"+e.name+", ",t+="mediaType:"+e.mediaType+", ",t+="media:"+e.media+", ",t+="x:"+e.x.toString()+", ",t+="y:"+e.y.toString()+", ",t+="zoom:"+e.zoom.toString()+", ",t+="xScale:"+e.xScale.toString()+", ",t+="yScale:"+e.yScale.toString()+", ",t+="url:"+e.url+", ",t+="urlTarget:"+e.urlTarget+", ",t+="rollover:"+e.rollover+", ",t+="caption:"+e.caption+", ",t+="tooltip:"+e.tooltip,t+="]",t}function os(e){var t,n,r=Z.imageW/2,i=Z.imageH/2,s="",o=Z.Utils.z241(s),u=o.getElementsByTagName("ZAS")[0],a=o.createElement("LABELSETUP");a.setAttribute("PANELPOSITION","2"),a.setAttribute("INITIALVISIBILITY","1"),a.setAttribute("NOTEVISIBILITY","1"),a.setAttribute("MINSCALE","1"),a.setAttribute("MAXSCALE","1"),u.appendChild(a);var f=e.getElementsByTagName("LABELSETUP")[0];t=f.getAttribute("PANELPOSITION"),Z.Utils.isStrVal(t)&&a.setAttribute("PANELPOSITION",t);var l=f.getAttribute("INITIALVISIBILITY");if(Z.Utils.isStrVal(l)){var c=Z.Utils.z285("z70");c?initVis=l!="0"&&l!="hide"?"1":"0":initVis=l!="1"&&l!="show"?"0":"1",a.setAttribute("INITIALVISIBILITY",initVis)}var l=f.getAttribute("NOTEVISIBILITY");if(Z.Utils.isStrVal(l)){var c=Z.Utils.z285("DEFAULT_ANNOTATIONNOTEVISIBILITY");c?initVis=l!="0"&&l!="hide"?"1":"0":initVis=l!="1"&&l!="show"?"0":"1",a.setAttribute("NOTEVISIBILITY",initVis)}t=f.getAttribute("MINSCALE"),Z.Utils.isStrVal(t)&&!isNaN(parseFloat(t))&&parseFloat(t)>0&&a.setAttribute("MINSCALE",t),t=f.getAttribute("MAXSCALE"),Z.Utils.isStrVal(t)&&!isNaN(parseFloat(t))&&parseFloat(t)>0&&a.setAttribute("MAXSCALE",t);var h=e.getElementsByTagName("POI");for(var p=0,d=h.length;pr&&(i=1),i}function fs(){var e=9,t=9,n=51,r=12,i=25,s=40,o=20,u=5,a=parseInt(Z.Utils.z285("z29"),10),f=parseInt(Z.Utils.z285("z27"),10);or||(f-=131);var l=parseInt(Z.Utils.z285("z19"),10),c=parseInt(Z.Utils.z285("z23"),10),h=parseInt(Z.Utils.z285("z21"),10),p=ls(rr,a,f,kt,Lt),d=rr=="0"?"hidden":"visible",v=document.getElementById("poiList");v&&Z.AnnotationPanelDisplay.removeChild(v);var m=document.getElementById("labelList");m&&Z.AnnotationPanelDisplay.removeChild(m);var g=document.getElementById("noteList");g&&Z.AnnotationPanelDisplay.removeChild(g),Z.AnnotationPanelDisplay||(Z.AnnotationPanelDisplay=Z.Utils.z248("div","AnnotationPanelDisplay","inline-block","absolute","hidden",a+"px",f+"px",p.x+"px",p.y+"px","solid","1px","transparent none","0px","0px","normal","default"),B=Z.AnnotationPanelDisplay,F=B.style);var y=parseFloat(Z.Utils.z285("z24")),b=Z.Utils.z285("z25"),w=Z.Utils.z285("z25NOALPHA"),E=Z.Utils.z248("div","annotationPanelBackground","inline-block","absolute","hidden",a+"px",f+"px","0px","0px","none","0px",b,"0px","0px","normal");Z.Utils.z398(E,y,w);var S=parseInt(Z.Utils.z285("z28"),10),x=Z.Utils.z248("div","labelPOITextBox","inline-block","absolute","hidden",s+"px",o+"px",e+"px",r+u+"px","none","0px","transparent none","0px","0px","nowrap"),T=document.createTextNode(Z.Utils.z285("z199"));x.appendChild(T),Z.Utils.z401(T,"black","verdana",S+"px","none","normal","normal","normal","normal","1em","left","none");var N=Z.Utils.z248("div","labelLabelTextBox","inline-block","absolute","hidden",s+"px",o+"px",e+"px",r+i+u+"px","none","0px","transparent none","0px","0px","nowrap"),C=document.createTextNode(Z.Utils.z285("z197"));N.appendChild(C),Z.Utils.z401(C,"black","verdana",S+"px","none","normal","normal","normal","normal","1em","left","none");var k=Z.Utils.z248("div","labelNoteTextBox","inline-block","absolute","hidden",s+"px",o+"px",e+"px",r+i*2+u+"px","none","0px","transparent none","0px","0px","nowrap"),L=document.createTextNode(Z.Utils.z285("z198"));k.appendChild(L),Z.Utils.z401(L,"black","verdana",S+"px","none","normal","normal","normal","normal","1em","left","none");var A=Z.Utils.z285("z9"),O=[{text:A,value:"0"}];ir=new Z.Utils.z253("poiList","",O,l,n,r,d,Es),ur=new Z.Utils.z253("labelList","",O,l,n,r+i,d,Ss);if(or){sr=new Z.Utils.z253("noteList","",O,l,n,r+i*2,d,xs);var M=Z.Utils.z285("z10"),_=parseInt(Z.Utils.z285("z22"),10),D=parseInt(Z.Utils.z285("z20"),10),P=Z.Utils.z254("noteTextArea",M,c+"px",h+"px",t+"px",r+i*3+3+"px",_+"px","solid","1px","auto",!0,"verdana",D+"px","none")}Z.AnnotationPanelDisplay.appendChild(E),Z.AnnotationPanelDisplay.appendChild(x),Z.AnnotationPanelDisplay.appendChild(N),Z.AnnotationPanelDisplay.appendChild(ir),Z.AnnotationPanelDisplay.appendChild(ur),sr&&(Z.AnnotationPanelDisplay.appendChild(k),Z.AnnotationPanelDisplay.appendChild(sr),Z.AnnotationPanelDisplay.appendChild(P)),Z.ViewerDisplay.appendChild(Z.AnnotationPanelDisplay),Z.Utils.z428(ir,lr),Es()}function ls(e,t,n,r,i){var s,o,u=15;switch(e){case"0":s=0,o=0;break;case"1":s=u,o=u;break;case"2":s=r-t-u,o=u;break;case"3":s=r-t-u,toolbar!=null?o=i-n-u:o=i-u;break;case"4":s=u,toolbar!=null?o=i-n-u:o=i-u;break;default:s=r-t-u,o=u}return new Z.Utils.Point(s,o)}function cs(e,t,n){cr.push({text:e,value:t,poiID:n}),hr.push({text:e,value:t,poiID:n});var r=document.getElementById("labelList");Z.Utils.z428(r,hr),r.selectedIndex=r.length-1}function hs(e){var t=document.getElementById("labelList");if(t!=null){var n=cr.indexOfObjectValue("value",e);n!=-1&&cr.splice(n,1);var n=hr.indexOfObjectValue("value",e);if(n!=-1){hr.splice(n,1),Z.Utils.z428(t,hr);var r=t.length;r!=0&&(t.selectedIndex=n>r-1?r-1:n)}}}function ps(e){var e=Z.Utils.event(e);if(e){var t=Z.Utils.target(e);Z.browser!=Z.browsers.IE&&t&&Z.Utils.isStrVal(t.id)?ns(t,!0):Z.browser==Z.browsers.IE&&(t.parentNode.parentNode&&t.parentNode.parentNode.id.indexOf("hot")!=-1?ns(t.parentNode.parentNode,!0):t.parentNode.parentNode.parentNode&&t.parentNode.parentNode.parentNode.id.indexOf("hot")!=-1&&ns(t.parentNode.parentNode.parentNode,!0))}}function ds(e){var e=Z.Utils.event(e);if(e){var t=Z.Utils.target(e),n=Z.Utils.relatedTarget(e);if(Z.browser!=Z.browsers.IE&&n&&Z.Utils.isStrVal(n.id)||Z.browser==Z.browsers.IE&&t.parentNode.parentNode.parentNode&&Z.Utils.isStrVal(t.parentNode.parentNode.parentNode.id))t.parentNode.parentNode&&t.parentNode.parentNode.id.indexOf("hot")!=-1?ns(t.parentNode.parentNode,!1):t.parentNode.parentNode.parentNode&&t.parentNode.parentNode.parentNode.id.indexOf("hot")!=-1&&ns(t.parentNode.parentNode.parentNode,!1)}}function vs(e){}function ms(e){}function gs(e){}function ys(e){}function bs(e){}function ws(t){var n="0",t=Z.Utils.event(t);if(t)var r=Z.Utils.target(t),n=r.options[r.selectedIndex].value;if(Z.Utils.isStrVal(n)){var i=Ln.indexOfObjectValue("id",n);i!=-1&&e.zoomAndPanToView(Ln[i].x,Ln[i].y,Ln[i].zoom/100)}}function Es(t){var n="0",t=Z.Utils.event(t);if(t){var r=Z.Utils.target(t);n=r.options[r.selectedIndex].value}if(Z.Utils.isStrVal(n)){var i=lr.indexOfObjectValue("value",n);if(i!=-1){var s=Z.imageW/2,o=Z.imageH/2,u;u=lr[i].x;var a=u=="center"?s:parseFloat(u);u=lr[i].y;var f=u=="center"?o:parseFloat(u);u=lr[i].zoom;var l=u=="-1"?Z.fitZ:parseFloat(u);br?e.zoomAndPanToView(a,f,l/100):(br=!0,Wi())}}hr=Ts(cr,n),Z.Utils.z428(ur,hr),sr&&(dr=Ts(pr,n),Z.Utils.z428(sr,dr),xs()),Z.editMode&&(On=parseInt(ur.options[ur.selectedIndex].value))}function Ss(t){var t=Z.Utils.event(t),n=Z.Utils.target(t),r=n.options[n.selectedIndex].value;if(r!==null){On=parseInt(r),Dn=!0;var i=Ln.indexOfObjectValue("internalID",On);if(i!=-1){var s=Z.imageW/2,o=Z.imageH/2,u;u=Ln[i].x;var a=u=="center"?s:parseFloat(u);u=Ln[i].y;var f=u=="center"?o:parseFloat(u);u=Ln[i].zoom;var l=u=="-1"?Z.fitZ:parseFloat(u);Z.z375?Wi():e.zoomAndPanToView(a,f,l/100)}}}function xs(e){var t=document.getElementById("noteTextArea");t.value="";var n="0",e=Z.Utils.event(e);if(e){var r=Z.Utils.target(e);n=r.options[r.selectedIndex].value}else dr.length>0&&(n=dr[0].value);if(Z.Utils.isStrVal(n)){var i=dr.indexOfObjectValue("value",n);i!=-1&&(t.value=dr[i].noteText)}}function Ts(e,t){var n=[];for(var r=0,i=e.length;rt.bounds.left&&i-Fnt.bounds.top&&s-Fn2&&Ds(On)))}}function Ms(e,t,n){var r=!1,i=!1;if(e===null){var s=Qi("label"),o=Qi("labelExternal"),u="",a=Z.Utils.z241(u),f=a.getElementsByTagName("LABEL"),l=new qi(f[0]);poiCurrentID=ir.options[ir.selectedIndex].value,l.poiInternalID=poiCurrentID,l.saved=!1,Ln.push(l);var c=ir.options[ir.selectedIndex].value;On=s,cs(l.name,On,c),i=!0,r=!0}else{var h=Ln.indexOfObjectValue("internalID",e);if(h!=-1){var p=Ln[h].polygonPts;p.push({x:n.x,y:n.y}),Ln[h].polygonPts=p,Ln[h].saved=!1}}var d=(n.x-Z.imageX)*Z.imageZ,v=(n.y-Z.imageY)*Z.imageZ;Cs(d,v,r),Dn=!1,i?Wi():t&&Ls()}function _s(e,t){var n=null,r=(zn+1)/Z.imageZ;for(var i=0,s=Ln.length;i",o=Z.Utils.z241(s),u=o.getElementsByTagName("ZAS")[0],a=o.createElement("LABELSETUP");a.setAttribute("PANELPOSITION","2"),a.setAttribute("INITIALVISIBILITY","1"),a.setAttribute("MINSCALE","1"),a.setAttribute("MAXSCALE","1");var f=e.getElementsByTagName("LABELSETUP")[0];t=f.getAttribute("PANELPOSITION"),Z.Utils.isStrVal(t)&&a.setAttribute("PANELPOSITION",t),t=f.getAttribute("INITIALVISIBILITY"),Z.Utils.isStrVal(t)&&a.setAttribute("INITIALVISIBILITY",t),t=f.getAttribute("MINSCALE"),Z.Utils.isStrVal(t)&&!isNaN(parseFloat(t))&&parseFloat(t)>0&&a.setAttribute("MINSCALE",t),t=f.getAttribute("MAXSCALE"),Z.Utils.isStrVal(t)&&!isNaN(parseFloat(t))&&parseFloat(t)>0&&a.setAttribute("MAXSCALE",t),u.appendChild(a);var l=e.getElementsByTagName("POI");for(var c=0,h=l.length;c0){var S=o.createElement("LABELS");p.appendChild(S);for(var x=0,T=Ln.length;x1&&Z.Toolbar.show(!0),Z.NavigatorDisplay&&Z.navigatorVisible>1&&Z.Navigator.setVisibility(!0),Wt=null}function $s(t){var n=window.setTimeout(function(){e.z448()},1);if(Z.Utils.z324(t))return;zt=!0;var r=Z.Utils.getMousePosition(t);Xt=new Z.Utils.Point(r.x,r.y),d.mouseXPrior=r.x,d.mouseYPrior=r.y;if(Z.z375&&On!==null){var i=e.z281(t,Xt,J,G);Pn=_s(t,i)}return Z.Utils.addEventListener(document,"mousemove",Js),Z.Utils.addEventListener(d,"mouseup",Ks),Z.Utils.addEventListener(document,"mouseup",Ks),!1}function Js(t){var t=Z.Utils.event(t),n=Z.Utils.getMousePosition(t);Vt=new Z.Utils.Point(n.x,n.y);var r=e.z281(t,Vt,J,G);if(Z.z375&&Pn!==null&&zt)As(On,Pn,r);else if(Z.z375&&!Dn&&(!zt||zt&&Pn!==null)){var i=(r.x-Z.imageX)*Z.imageZ,s=(r.y-Z.imageY)*Z.imageZ;ks(i,s)}else{if(!Z.mousePan)return;var o=n.x-d.mouseXPrior,u=n.y-d.mouseYPrior;if(!isNaN(o)&&!isNaN(u)){var a=parseFloat(v.left)+o,f=parseFloat(v.top)+u,l=Ai(a,f);v.left=l.x+"px",v.top=l.y+"px",d.mouseXPrior=n.x,d.mouseYPrior=n.y;if(Z.Navigator){var c=e.z217(l);Z.Navigator.z417(c)}}}return!1}function Ks(t){zt=!1,document.mousemove=null,document.mouseup=null,Z.Utils.removeEventListener(document,"mousemove",Js),Z.Utils.removeEventListener(d,"mouseup",Ks),Z.Utils.removeEventListener(document,"mouseup",Ks);var t=Z.Utils.event(t),n=Z.Utils.getMousePosition(t),r;Wt?r=Wt:r=new Z.Utils.Point(n.x,n.y);var i=Z.Utils.calculatePointsDistance(Xt.x,Xt.y,r.x,r.y,2);if(i<4){var s=e.z281(t,r,J,G);if(Z.clickZoom&&!Z.z375)var o=window.setTimeout(function(){e.zoomAndPanToView(s.x,s.y,s.z)},1);else Z.clickPan&&!Z.z375?e.zoomAndPanToView(s.x,s.y,Z.imageZ):Z.z375&&(Os(t,s),Dn||Z.Utils.addEventListener(document,"mousemove",Js))}else{if(Z.z375&&(Hn||Pn===null&&!Dn)){Pn=null,Hn=!1;var u=new Gi,a=Ln.indexOfObjectValue("internalID",On);if(a!=-1){var f=Z.Utils.getCenterOfPolygonPoints(Ln[a].polygonPts);Ln[a].x=f.x,Ln[a].y=f.y,ui(W),$i(Ln[a],u),Dn||Z.Utils.addEventListener(document,"mousemove",Js)}}Vt=null,Z.mousePan&&e.updateView()}Wt&&(Z.ToolbarDisplay&&Z.toolbarVisible>1&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&Z.navigatorVisible>1&&Z.Navigator.setVisibility(!1))}function Qs(e){var t=Z.Utils.z353(Z.Utils.target(e)),n=Z.Utils.z353(Z.Utils.relatedTarget(Z.Utils.event(e)));if(!t||!n)if(!zt)Z.ToolbarDisplay&&Z.toolbarVisible>1&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&Z.navigatorVisible>1&&Z.Navigator.setVisibility(!1);else{var r=Z.Utils.getMousePosition(e);Wt=new Z.Utils.Point(r.x,r.y)}}function Gs(t){e.z448();var t=Z.Utils.event(t),n=Z.Utils.getFirstTouch(t);if(n&&!$t){Kt=!1;var r=n.target,i=new Z.Utils.Point(n.pageX,n.pageY);Xt=new Z.Utils.Point(i.x,i.y),d.mouseXPrior=i.x,d.mouseYPrior=i.y;if(Z.z375){zt=!0;if(On!==null){var s=e.z281(t,Xt,J,G);Pn=_s(t,s)}}}}function Ys(t){var t=Z.Utils.event(t);t.preventDefault();var n=Z.Utils.getFirstTouch(t),r=new Z.Utils.Point(n.pageX,n.pageY);Vt=new Z.Utils.Point(r.x,r.y);var i=e.z281(t,Vt,J,G);if(Z.z375&&Pn!==null&&zt)As(On,Pn,i);else{if(!Z.mousePan)return;if(n&&!$t&&!Kt){var s=n.target,o=r.x-d.mouseXPrior,u=r.y-d.mouseYPrior;if(!isNaN(o)&&!isNaN(u)){var a=parseFloat(v.left)+o,f=parseFloat(v.top)+u,l=Ai(a,f);v.left=l.x+"px",v.top=l.y+"px",d.mouseXPrior=r.x,d.mouseYPrior=r.y;if(Z.Navigator){var c=e.z217(l);Z.Navigator.z417(c)}}}}return!1}function Zs(t){var t=Z.Utils.event(t);if(!$t&&!Kt){zt=!1,typeof Vt!="undefined"&&Vt!==null?dragPtEnd=Vt:dragPtEnd=Xt;var n=Z.Utils.calculatePointsDistance(Xt.x,Xt.y,dragPtEnd.x,dragPtEnd.y,2);if(n<4){var r=e.z281(t,dragPtEnd,J,G);Z.clickZoom&&!Z.z375?e.zoomAndPanToView(r.x,r.y,r.z):Z.clickPan&&!Z.z375?e.zoomAndPanToView(r.x,r.y,Z.imageZ):Z.z375&&Os(t,r)}else{if(Z.z375&&(Hn||Pn===null&&!Dn)){Pn=null,Hn=!1;var i=new Gi,s=Ln.indexOfObjectValue("internalID",On);if(s!=-1){var o=Z.Utils.getCenterOfPolygonPoints(Ln[s].polygonPts);Ln[s].x=o.x,Ln[s].y=o.y,ui(W),$i(Ln[s],i),Dn||Z.Utils.addEventListener(document,"mousemove",Js)}}Z.mousePan&&e.updateView()}Vt=null}}function eo(t){var t=Z.Utils.event(t);if(!$t&&!Kt){zt=!1;var n=!1;typeof Vt!="undefined"&&Vt!==null?dragPtEnd=Vt:dragPtEnd=Xt;var r=Z.Utils.calculatePointsDistance(Xt.x,Xt.y,dragPtEnd.x,dragPtEnd.y,2);if(r<4){var i=e.z281(t,dragPtEnd,J,G);Z.clickZoom&&!Z.z375?e.zoomAndPanToView(i.x,i.y,i.z):Z.clickPan&&!Z.z375?e.zoomAndPanToView(i.x,i.y,Z.imageZ):Z.z375&&Os(t,i)}else{if(Z.z375&&(Hn||Pn===null&&!Dn)){Pn=null,Hn=!1;var s=new Gi,o=Ln.indexOfObjectValue("internalID",On);if(o!=-1){var u=Z.Utils.getCenterOfPolygonPoints(Ln[o].polygonPts);Ln[o].x=u.x,Ln[o].y=u.y,ui(W),$i(Ln[o],s),Dn||Z.Utils.addEventListener(document,"mousemove",Js)}}Z.mousePan&&e.updateView()}Vt=null}}function to(t){e.z448();var t=Z.Utils.event(t);no(t),$t||($t=window.setInterval(io,Qt))}function no(e){var e=Z.Utils.event(e);e.preventDefault(),Jt=Math.round(e.scale*100)/100}function ro(t){$t&&(window.clearInterval($t),Kt=!0,$t=null),Z.mousePan&&e.updateView()}function io(e){if(!Z.mousePan)return;var t=so(J,Y,Jt),n=Oi(t);t!=Z.imageZ&&Rs(n)}function so(e,t,n){var r=t*n,i=Ni(e,r);return i}function oo(t){Z.fullPage&&(Z.ToolbarDisplay&&Z.toolbarVisible>1&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&Z.navigatorVisible>1&&Z.Navigator.setVisibility(!1),e.toggleFullPageView(!1),e.toggleFullPageView(!0),Z.ToolbarDisplay&&Z.toolbarVisible>1&&Z.Toolbar.show(!0),Z.NavigatorDisplay&&Z.navigatorVisible>1&&Z.Navigator.setVisibility(!0))}function uo(t){if(!Z.keys)return;t.altKey||qs();var t=Z.Utils.event(t);switch(t.keyCode){case 90:e.zoom("out");break;case 17:e.zoom("out");break;case 65:e.zoom("in");break;case 16:e.zoom("in");break;case 37:e.pan("left");break;case 38:e.pan("up");break;case 40:e.pan("down");break;case 39:e.pan("right");break;case 27:Z.fullPage?e.toggleFullPageView(!1):e.reset()}}function ao(t){if(!Z.keys)return;var t=Z.Utils.event(t),n=t.keyCode;n==90||n==17||n==65||n==16?e.zoom("stop"):n==37||n==39?e.pan("horizontalStop"):(n==38||n==40)&&e.pan("verticalStop")}var e=this,t=!1,n=-1,r=0,i=0,s=256,o=0,u=256,a=parseInt(Z.Utils.z285("DEFAULT_TILESIZE"),10),f=parseFloat(Z.Utils.z285("z116")),l=f/2,c=parseInt(Z.Utils.z285("z117"),10),h=Z.toolbarVisible==1?Z.toolbarH:0,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,F,I,q,R,U,z,W,X,V;Cr();var $=1,J=0,K=0,Q=!1,G,Y,et,tt=[],nt=[],rt=[],it=[],st=[],ot=[],ut=[],at=[],ft=[],lt=[],ct=[],ht=[],pt=[],dt=[],vt=[],mt=[],gt=[],yt=[],bt=0,wt=new Z.NetConnector,Et=parseInt(Z.Utils.z285("z40"),10),St=parseInt(Z.Utils.z285("z39"),10),xt=parseInt(Z.Utils.z285("z38"),10),Tt=parseInt(Z.Utils.z285("z37"),10),Nt=parseInt(Z.Utils.z285("z36"),10),Ct=parseFloat(Z.Utils.z285("z95"),10),kt,Lt,At,Ot,Mt,_t,Dt,Pt,Ht,Bt,jt,Ft,It,qt,Rt,Ut;kt=Z.viewerW,Lt=Z.viewerH,At=Ot=0,Lt-=h,Z.toolbarPosition==0&&(Ot+=h);var zt=!1,Wt=null,Xt,Vt,$t=null,Jt=null,Kt=!1,Qt=parseInt(Z.Utils.z285("z63"),10),Gt=parseFloat(Z.Utils.z285("z134"))*Z.zoomSpeed;Z.mobileDevice&&(Gt/=2);var Yt=Math.round(parseFloat(Z.Utils.z285("z97"))*Z.panSpeed),Zt=0,en=0,tn=0,nn=0,rn=0,sn=parseInt(Z.Utils.z285("z135"),10),on,un,an,fn=parseFloat(Z.Utils.z285("z54"))*Z.fadeInSpeed,ln=null,cn=parseFloat(Z.Utils.z285("z137")),hn=parseFloat(Z.Utils.z285("z136"));Z.mobileDevice&&(hn/=2);var pn=null,dn=0,vn,mn,gn,yn,bn,wn,En,Sn,xn;if(Z.Utils.isStrVal(Z.watermarkPath))var Tn,Nn,Cn=[],kn=[];if(Z.Utils.isStrVal(Z.hotspotPath)||Z.Utils.isStrVal(Z.annotationPath)){var Ln=[],An=[],On=null,Mn=null,_n=!1,Dn=!0,Pn=null,Hn=!1,Bn=new Z.NetConnector,jn=Z.Utils.z285("z105"),Fn=parseInt(Z.Utils.z285("DEFAULT_POLYGONVIEWINCREMENT"),10),In=Z.Utils.z285("z45"),qn=Z.Utils.z285("z47"),Rn=Z.Utils.z285("z55"),Un=Z.Utils.z285("z115"),zn=parseInt(Z.Utils.z285("z46"),10),Wn=parseInt(Z.Utils.z285("z64"),10),Xn=parseInt(Z.Utils.z285("z82"),10),Vn=parseInt(Z.Utils.z285("z80"),10),$n=parseInt(Z.Utils.z285("z65"),10),Jn=parseInt(Z.Utils.z285("DEFAULT_MINHOTSPOTCAPTIONPADDING"),10),Kn=parseInt(Z.Utils.z285("DEFAULT_MAXHOTSPOTCAPTIONPADDING"),10);Z.mobileDevice&&(zn*=2);if(Z.Utils.isStrVal(Z.hotspotPath))var Qn,Gn,Yn,Zn,er,tr=[];else if(Z.Utils.isStrVal(Z.annotationPath))var nr,rr,ir,sr,or,ur,ar,fr,lr=[],cr=[],hr=[],pr=[],dr=[],vr=[],mr=[],gr=[],yr=[],br=!1}kr(kt,Lt,At,Ot);if(Z.imageW!==null&&Z.imageH!==null&&Z.sourceMagnification!==null){Z.tileSize!==null&&(a=Z.tileSize);if(typeof e.z284=="undefined")var wr=window.setTimeout(function(){xr(Z.imageW,Z.imageH,a,null,null,null,null,Z.sourceMagnification,Z.focal,Z.quality)},100);else xr(Z.imageW,Z.imageH,a,null,null,null,null,Z.sourceMagnification,Z.focal,Z.quality)}else if(Z.imageProperties!=null){var Er=Z.Utils.z241(Z.imageProperties);Ar(Er)}else{var Sr=new Z.NetConnector;Lr(Sr)}this.loadImageProperties=function(e){Lr(e)},this.z366=function(e){Ar(e)},this.z284=function(){return Br()},this.getW=function(){return Mt},this.getH=function(){return _t},this.z286=function(){return $},this.z294=function(){return a},this.z287=function(){return J},this.getTierScale=function(){return G},this.getX=function(){var t=parseFloat(v.left)-Ht,n=e.getZoom(),r=Z.imageX-t/n;return r},this.getY=function(){var t=parseFloat(v.top)-jt,n=e.getZoom(),r=Z.imageY-t/n;return r},this.getZoom=function(){var e=Ni(J,G);return e},this.z293=function(){return f},this.z292=function(){return l},this.z296=function(){return c},this.z291=function(){return rt.join(",")},this.z288=function(){return it.join(", ")},this.z290=function(){return ut.join(", ")},this.z295=function(){var e=ft.join(", ")==""?"Current view loading complete":ft.join(", ");return e},this.setSizeAndPosition=function(e,t,n,r){kr(e,t,n,r)},this.setHotspotPath=function(e){_&&(Z.hotspotPath=Z.Utils.z392(e))},this.updateView=function(n){if(typeof n!="undefined"&&n===!0||G!=Y||Z.imageZ!=rn||parseFloat(v.left)!=Ht||parseFloat(v.top)!=jt){Rr(n),rn=e.getZoom();var r=!1;n||G!=Y||Z.imageZ!=rn||!t?(Ur(),zr(),Xr(g,K,tt,"simple",!1,"2. Updating view: changing tier - backfill"),!n&&c>0&&(r=!0)):Z.debug==2&&Z.Utils.trace("2. Updating view: no change to tier."),Wr(),Xr(E,J,lt,"centerOut",r,"3. Updating view: prior to loading of any new tiles"),$r(ft,Qr,"centerOut","display"),ji(),Wi(),Mi(),_i()}},this.z279=function(e,t,n,r){var i;if(Z.tileSource=="ZoomifyImageFolder"){var s=n*st[e]+t;for(var o=0;o",v=Z.Utils.z241(d),m=v.getElementsByTagName("HOTSPOT"),g=new qi(m[0]);g.internalID=Qi("hotspot");var y=An.indexOfObjectValueSubstring("src",g.media),r=An[y];if(y!=-1){var b=new Image;b.src=g.media;var w=b.width,E=b.height;b=null,g.image=r.cloneNode(!1),g.iW=w,g.iH=E;var S=new Gi;$i(g,S)}else{var x=(new Date).getTime();Ui(g.media,x)}Ln.push(g),ts(g.name,g.internalID)},this.modifyHotspot=function(){},this.setHotspotsVisibility=function(e){D.visibility=e?"visible":"hidden"},this.setHotspotsVisibilityByFilter=function(e,t,n){if(Ln.length>0)if(_&&_.childNodes.length>0){for(var r=0,i=Ln.length;r0)if(_&&_.childNodes.length>0){var n=Ln.indexOfObjectValue("id",e);if(n!=-1){var r=Ln[n].id,i=document.getElementById("hot"+r);i!=null&&ns(i,t)}}else var s=window.setTimeout(function(){setHotspotVisibilityByID(e,t)},100)},this.z364=function(e){nr=os(e);var t,n=-1,r=nr.getElementsByTagName("LABELSETUP")[0];rr=r.getAttribute("PANELPOSITION"),Yn=r.getAttribute("INITIALVISIBILITY")!="0",or=r.getAttribute("NOTEVISIBILITY")!="0",Zn=parseFloat(r.getAttribute("MINSCALE")),er=parseFloat(r.getAttribute("MAXSCALE")),lr=[],pr=[],dr=[],cr=[],hr=[],An=[];var i=[],s=!1,o=nr.getElementsByTagName("POI");for(var u=0,a=o.length;u0?On=parseInt(ur.options[ur.selectedIndex].value):On=null,Mn=null,Pn=null,Wi())},this.cancelLabelEdits=function(){Z.Utils.z405(Z.Utils.z285("z2")),Ln=Z.Utils.clone("hotspots",vr,Ln),cr=Z.Utils.clone("labels",gr,cr);var e=ir.options[ir.selectedIndex].value;hr=Ts(cr,e),Z.Utils.z428(ur,hr),On=parseInt(ur.options[ur.selectedIndex].value),Wi(),this.togglePolygonEditing(!1)},this.saveAnnotations=function(){nr=Ps(nr);if(Z.Utils.isStrVal(Z.saveHandlerPath))if(Z.saveHandlerPath.indexOf(Z.Utils.z285("z4"))!=-1)Z.Utils.z405(Z.Utils.z285("z5"));else{var e=new Z.NetConnector;e.postXML(Z.saveHandlerPath,nr)}else Z.Utils.z405(Z.Utils.z285("z171"));this.togglePolygonEditing(!1)},this.setAllHotspotsSaved=function(){for(var e=0,t=Ln.length;e1&&(n/=100),Hs(e,t,n)},this.zoom=function(t){switch(t){case"out":tn>=0&&(tn-=Gt);break;case"in":tn<=0&&(tn+=Gt);break;case"stop":tn=0}Z.z454=tn==0?"stop":tn>0?"in":"out",tn!=0?on||((tn<0&&Z.imageZ>Z.minZ||tn>0&&Z.imageZ=0&&(en-=Yt);break;case"right":Zt>=0&&(Zt-=Yt);break;case"horizontalStop":Zt=0;break;case"verticalStop":en=0;break;case"stop":Zt=0,en=0}Z.z362=Zt==0?"stop":Zt>0?"left":"right",Z.z363=en==0?"stop":en>0?"up":"down",un=Z.imageX*Ni(J,1),an=Z.imageY*Ni(J,1),Zt!=0||en!=0?on||(e.z427(!1),Z.useCanvas||ui(A),on=window.setTimeout(Bs,sn)):(Is(),e.updateView(),e.z427(!0))},this.zoomAndPanToView=function(t,n,r,i,s){e.z448();if(typeof i=="undefined"||i===null)i=cn;if(typeof s=="undefined"||s===null)s=hn;e.z427(!1),Z.useCanvas||ui(A),t==null&&(t=Z.initialX),n==null&&(n=Z.initialY),r==null?r=Z.initialZ:r>1&&r<2&&r%1!=0?r=1:r>1?r/=100:r>.99&&r<1&&r*100%1!=0&&(r=1);var o=ki(t,n,r);t=o.x,n=o.y,r=Oi(r),dn=0,Fs(t,n,r,i,s)},this.z448=function(t){Is(),qs(),t||e.updateView()},this.z394=function(e){var t=Rs(e);t&&(ji(),Wi(),_i())},this.reset=function(){e.zoomAndPanToView(Z.initialX,Z.initialY,Z.initialZ)},this.toggleFullPageViewExternal=function(){xn=!0,e.toggleFullPageView()},this.toggleFullPageView=function(t){e.z448(),Z.fullPage=t?t:!Z.fullPage;var n=document.body,r=n.style,i=document.documentElement.style,s=Z.ViewerDisplay.style,o=null,u=null;if(Z.fullPage){vn=r.width,mn=r.height,gn=r.overflow,yn=i.overflow,bn=Z.Utils.isStrVal(s.backgroundColor)&&s.backgroundColor!="transparent"?s.backgroundColor:Z.Utils.isStrVal(r.backgroundColor)&&r.backgroundColor!="transparent"?r.backgroundColor:Z.Utils.z285("z59"),wn=s.position,En=s.zIndex;var a;Z.mobileDevice?(a=Z.Utils.getWindowSize(),r.width=a.x,r.height=a.y):(r.width="100%",r.height="100%"),r.overflow="hidden",i.overflow="hidden",s.backgroundColor=bn,s.position="fixed",s.zIndex="99999999",a=Z.Utils.getWindowSize(),o=a.x,u=a.y}else{r.width=vn,r.height=mn,r.overflow=gn,i.overflow=yn,s.backgroundColor=bn,s.position="relative",s.zIndex=En;var f=Z.Utils.getElementStyle(Z.pageContainer);o=parseFloat(f.width),u=parseFloat(f.height),isNaN(o)&&(o=Z.ViewerDisplay.clientWidth),isNaN(u)&&(u=Z.ViewerDisplay.clientHeight),xn=!1}Z.viewerW=o,Z.viewerH=u,kr(o,u),Us(xn);if(Z.ToolbarDisplay&&Z.Toolbar.z284()){Z.toolbarCurrentW=Z.toolbarW==-1?o:Z.toolbarW;var l=Z.toolbarPosition==1?Z.viewerH-Z.toolbarH:0;Z.Toolbar.setSizeAndPosition(Z.toolbarCurrentW,null,null,l)}Z.NavigatorDisplay&&Z.Navigator.z284()&&Z.Navigator.setSizeAndPosition(Z.navigatorW,Z.navigatorH,Z.navigatorL-1,Z.navigatorT-1),Hr(),Z.imageZ=Oi(Z.imageZ);var c=parseFloat(v.left),h=parseFloat(v.top),p=Ai(c,h);v.left=p.x+"px",v.top=p.y+"px",e.updateView(!0)},this.z424=function(){var e=Z.ViewerDisplay.firstChild.childNodes[0].style;e.display=e.display=="none"?"inline-block":"none"},this.z426=function(){var e=Z.ViewerDisplay.firstChild.childNodes[1].style;e.display=e.display=="none"?"inline-block":"none"},this.z427=function(e){if(O){var t=e?e:O.display!="inline-block";O.display=t?"inline-block":"none"}},this.z425=function(){Z.constrainPan=!Z.constrainPan;if(Z.constrainPan){var t=parseFloat(S.left),n=parseFloat(S.top),r=Ai(t,n);v.left=r.x+"px",v.top=r.y+"px",e.updateView()}},this.z281=function(e,t,n,r){var i=parseFloat(Z.Utils.z285("z43")),s=Ei(t.x,t.y),o=Si(s.x,s.y),u=Ni(n,r);return e.altKey?(r>1+i?u=Ni(n,1):n>0&&(u=Ni(n-1,1)),u-Z.fitZ0?Z.toolbarCurrentW:0:Z.toolbarCurrentW=e;if(typeof t=="undefined"||t===null)t=Z.toolbarVisible>0?i:0;if(typeof n=="undefined"||n===null)n=0;if(typeof r=="undefined"||r===null)r=Z.toolbarPosition==1?Z.viewerH-i:0;var s=Z.ToolbarDisplay.style;s.width=e+"px",s.height=t+"px",s.left=n+"px",s.top=r+"px",T(e,t)}function T(e,t){var n=e,r=t,i=toolbarSkinSizes[2],s=toolbarSkinSizes[3],o=toolbarSkinSizes[4],u=toolbarSkinSizes[5],a=toolbarSkinSizes[6],f=toolbarSkinSizes[7],l=toolbarSkinSizes[8],c=toolbarSkinSizes[9],h=toolbarSkinSizes[10],p=toolbarSkinSizes[11],d=toolbarSkinSizes[12],v=toolbarSkinSizes[13],b=toolbarSkinSizes[14],w=toolbarSkinSizes[15],E=0,S=(r-s)/2+1,x=(r-u)/2,T=(r-f)/2,N=T*1.3,C=T+4,k=T+2,L=Z.logoVisible==1?0:l/2,A=Z.logoVisible==1?0:l/2,O=l-(a-o),M=Z.fullPageVisible?8:7,_=20,D=M*l+2*O;Z.sliderVisible&&(D+=v),m=g=y=!1;var P=Z.logoVisible==1?i+2:0,H=Z.toolbarVisible!=0&&Z.toolbarVisible!=1?l:0,B=P+H,j=B+_+D+_+b;j>n&&(m=!0,j-v>n&&(g=!0,j-v-b>n&&(y=!0,B=0),b=0),D-=v);var F=B+(n-b-B-D)/2,I=document.getElementById("background");I.style.width=n+"px",I.firstChild.style.width=n+"px",I.style.height=r+"px",I.firstChild.style.height=r+"px";var q=document.getElementById("buttonContainer");q.style.width=D+_*2+"px",q.style.height=r+"px",q.style.left=F-_+"px";var R=document.getElementById("buttonBackground");R.style.width=n+"px",Z.Utils.z301(R,parseFloat(q.style.width),parseFloat(q.style.height)),R.style.left="0px";var U=document.getElementById("toolbarLogo");if(U){var z=U.style;if(z)if(!y){z.display="inline-block",Z.Utils.z301(U,i,s),z.left=E+"px",z.top=S+"px",E+=i+2;var W=document.getElementById("logoDivider");if(W){Z.Utils.z301(W,o,u);var X=W.style;X.left=E+"px",X.top=x+"px"}}else z.display="none"}if(Z.toolbarVisible!=0&&Z.toolbarVisible!=1){var V=document.getElementById("buttonMinimize"),$=document.getElementById("buttonExpand");if(V&&$){var J=V.style,K=$.style;J&&K&&(y?(J.display="none",K.display="none"):(J.display="inline-block",K.display="inline-block",Z.Utils.z213(V,a,f),Z.Utils.z213($,a,f),J.left=E+L+"px",J.top=N+"px",K.left=E+A+"px",K.top=N+"px"))}}E=_;var Q=document.getElementById("buttonZoomOut");Z.Utils.z213(Q,a,f);var G=Q.style;G.left=E+"px",G.top=T+"px",E+=l;var Y=document.getElementById("trackSlider"),et=document.getElementById("buttonSlider");if(Y&&et){var tt=Y.style,nt=et.style;tt&&nt&&(m?(tt.display="none",nt.display="none"):(tt.display="inline-block",nt.display="inline-block",Z.Utils.z301(Y,p,d),tt.left=E-2+"px",tt.top=C+"px",Z.Utils.z213(et,c,h),nt.left=parseFloat(tt.left)+"px",nt.top=k+"px",E+=v))}var rt=document.getElementById("buttonZoomIn");Z.Utils.z213(rt,a,f);var it=rt.style;it.left=E+"px",it.top=T+"px",E+=l+1;var st=document.getElementById("panDivider");Z.Utils.z301(st,o,u);var ot=st.style;ot.left=E+"px",ot.top=x+"px",E+=O;var ut=document.getElementById("buttonPanLeft");Z.Utils.z213(ut,a,f);var at=ut.style;at.left=E+"px",at.top=T+"px",E+=l;var ft=document.getElementById("buttonPanUp");Z.Utils.z213(ft,a,f);var lt=ft.style;lt.left=E+"px",lt.top=T+"px",E+=l;var ct=document.getElementById("buttonPanDown");Z.Utils.z213(ct,a,f);var ht=ct.style;ht.left=E+"px",ht.top=T+"px",E+=l;var pt=document.getElementById("buttonPanRight");Z.Utils.z213(pt,a,f);var dt=pt.style;dt.left=E+"px",dt.top=T+"px",E+=l;var vt=document.getElementById("buttonReset");Z.Utils.z213(vt,a,f);var mt=vt.style;mt.left=E+"px",mt.top=T+"px",E+=l+1;var gt=document.getElementById("fullPageDivider");if(gt){Z.Utils.z301(gt,o,u);var yt=gt.style;yt.left=E+"px",yt.top=x+"px",E+=O;var bt=document.getElementById("buttonFullPage");Z.Utils.z213(bt,a,f);var wt=bt.style;wt.left=E+"px",wt.top=T+"px"}var Et=document.getElementById("buttonEditMode");if(Et){E+=l+10,Z.Utils.z213(Et,a,f);var St=Et.style;St.left=E+"px",St.top=T+"px"}var xt=document.getElementById("buttonEditCancel");if(xt){Z.Utils.z213(xt,a,f);var Tt=xt.style;Tt.left=E+"px",Tt.top=T+"px",Tt.visibility="hidden"}var Nt=document.getElementById("buttonEditDelete");if(Nt){E+=l+1,Z.Utils.z213(Nt,a,f);var Ct=Nt.style;Ct.left=E+"px",Ct.top=T+"px",Ct.visibility="hidden"}var kt=document.getElementById("buttonEditSave");if(kt){E+=l+1,Z.Utils.z213(kt,a,f);var Lt=kt.style;Lt.left=E+"px",Lt.top=T+"px",Lt.visibility="hidden"}var At=document.getElementById("progressTextBox");if(At){var Ot=At.style;Ot&&(g?Ot.display="none":(Ot.display="inline-block",Ot.width=b+"px",Ot.height=w+"px",Ot.left=n-parseFloat(q.style.left)-parseFloat(Ot.width)+"px",Ot.top=(r-parseFloat(Ot.height))/2+"px"))}}function N(e){Z.toolbarVisible<4&&!Z.mobileDevice?C(e):k(!e)}function C(e){s&&(e?s.display="inline-block":s.display="none")}function k(e){if(s){var t=document.getElementById("buttonContainer"),n=document.getElementById("background"),r=document.getElementById("buttonMinimize"),i=document.getElementById("buttonExpand"),o=document.getElementById("logoDivider"),u=0;y||(u=parseFloat(i.style.left)+parseFloat(i.style.width)+4);var a=Z.toolbarCurrentW;e?(t.style.display="none",y||(o&&(o.style.display="none"),r.style.display="none",i.style.display="inline-block"),s.width=u+"px",n.style.width=u+"px"):(t.style.display="inline-block",y||(o&&(o.style.display="inline-block"),r.style.display="inline-block",i.style.display="none"),s.width=a+"px",n.style.width=a+"px")}}function L(e){if(Z.sliderVisible){o||(o=document.getElementById("trackSlider")),u||(u=o.style),a||(a=document.getElementById("buttonSlider")),f||(f=a.style);if(u&&f){var t=Z.maxZ-Z.minZ,n=(e-Z.minZ)/t;trackL=parseFloat(u.left),trackR=parseFloat(u.left)+parseFloat(u.width)-parseFloat(f.width);var r=trackR-trackL,i=n*r+trackL;f.left=i+"px"}}}function A(t){o||(o=document.getElementById("trackSlider")),u||(u=o.style);if(o&&u){var n,r=Z.Utils.getElementPosition(o);Z.mobileDevice?n=Z.Utils.getMousePosition(t).x-r.x:n=t.clientX-r.x;var i=D(n,0,parseFloat(u.width));iZ.maxZ-.1&&(i=Z.maxZ),e.z394(i),e.updateView()}}function O(e){h=!0,a||(a=document.getElementById("buttonSlider"));if(a){var t=Z.Utils.getMousePosition(e);a.mouseXPrior=t.x,a.mouseYPrior=t.y}}function M(t){o||(o=document.getElementById("trackSlider")),u||(u=o.style),a||(a=document.getElementById("buttonSlider")),f||(f=a.style);if(u&&a&&f){trackL=parseFloat(u.left),trackR=parseFloat(u.left)+parseFloat(u.width)-parseFloat(f.width);var n=parseFloat(f.left)+(d.x-a.mouseXPrior);ntrackR?n=trackR:a.mouseXPrior=d.x,f.left=n+"px";var r=D(n,trackL,trackR);e.z394(r)}}function _(){h=!1,e.updateView()}function D(e,t,n){var r=n-t,i=(e-t)/r,s=Z.maxZ-Z.minZ,o=Z.minZ+s*i;return o}function P(e){var e=Z.Utils.event(e),t=Z.Utils.relatedTarget(e);if(!h&&t){var n=t.parentNode;B(n)}}function H(e){Z.mobileDevice&&e.preventDefault();var e=Z.Utils.event(e),t=Z.Utils.target(e),n=Z.Utils.relatedTarget(e);if(t){var r=t.parentNode;r&&(targetParentID=r.id)}if(n){var i=n.parentNode;i&&(relatedTargetParentID=i.id)}if(!h||e.type=="mouseup"||e.type=="touchend"||e.type=="touchcancel")I(),t&&!Z.Utils.z324(e)&&(targetParentID&&targetParentID!="trackSlider"&&e.type!="mousemove"&&(q(e),R(e)),U(e))}function B(t){e&&e.z448(),t&&Z.Utils.isStrVal(t.id)&&(t.id.indexOf("button")!=-1?(j(t),F(t,null)):t.id.indexOf("background")!=-1&&I())}function j(e){Z.Utils.removeEventListener(e,"mousedown",H),Z.Utils.removeEventListener(e,"mouseup",H),Z.Utils.removeEventListener(e,"mouseout",H),Z.Utils.addEventListener(e,"mouseover",H)}function F(e,t){var n=document.getElementById(e._imgUpID),r=document.getElementById(e._imgOverID),i=document.getElementById(e._imgDownID);n&&(n.style.visibility=t!==null?t:"visible"),r&&(r.style.visibility="hidden"),i&&(i.style.visibility="hidden")}function I(){var e=Z.ToolbarDisplay.childNodes,t=null;for(var n=0,r=e.length;n1?(t=e,t/=a):(e=t,e*=a)}s.width=e+"px",s.height=t+"px",s.left=n-1+"px",s.top=r-1+"px",O(e,t)}}function O(e,t){u||(u=Z.NavigatorDisplay.firstChild.style),f||(f=Z.NavigatorDisplay.childNodes[1].style),l||(l=Z.NavigatorDisplay.childNodes[1].firstChild),u&&f&&l&&(u.width=e+"px",u.height=t+"px",M(e,t,l.width,l.height),f.width=l.width+"px",f.height=l.height+"px",f.left=(e-parseFloat(f.width))/2+"px",f.top=(t-parseFloat(f.height))/2+"px",D())}function M(e,t,n,r){l||(l=Z.NavigatorDisplay.childNodes[1].firstChild);if(l){var i=n/r,s=e/n,o=t/r,u=0,a=0;s<=o?(n=e,r=e/i,a=(t-r*(e/n))/2):o'}r=Z.Utils.z241(s),i(r)}else Z.tileSource=="ImageServer"}}}function i(e){if(e&&e.documentElement){var t=e.documentElement.tagName;t=="COPYRIGHT"?s("copyright",e):t=="IMAGE_PROPERTIES"||t=="PFFHEADER"?s("image",e):t=="PFFOFFSET"?s("offset",e):t=="SKINDATA"?s("skin",e):t=="DATA"?s("hotspots",e):t=="ZAS"?s("annotations",e):Z.Utils.z405(Z.Utils.z285("z170"))}else Z.Utils.z405(Z.Utils.z285("z167"))}function s(e,t){if(e=="copyright"){var n=t.documentElement.getAttribute("STATEMENTTEXT"),r=t.documentElement.getAttribute("DECLINEDTEXT");Z.Utils.isStrVal(n)?Z.Utils.z403(n,r):Z.Utils.z405(Z.Utils.z285("z147"))}else e=="image"?(Z.tileSource=="ZoomifyImageFolder"||Z.tileSource=="ZoomifyImageFile"||Z.tileSource=="ImageServer")&&Z.Viewport&&Z.Viewport.z366(t):e=="offset"?Z.Viewport&&Z.Viewport.z367(t):e=="skin"?Z.Toolbar&&Z.Toolbar.z369(t):e=="hotspots"?Z.Viewport&&Z.Viewport.z365(t):e=="annotations"&&Z.Viewport&&Z.Viewport.z364(t)}function o(t,n,r){e--;if(typeof t=="function")try{t(r)}catch(i){Z.Utils.z405(i.name+Z.Utils.z285("z140")+n+" "+i.message)}}function u(e,n,r){function o(t){i.onload=null,i.onabort=null,i.onerror=null,s&&window.clearTimeout(s),window.setTimeout(function(){n(e,t?i:null)},1)}var i=null,s=null;this.start=function(){i=new Image;var n=function(){o(!0)},u=function(){o(!1)},a=function(){Z.Utils.z405(Z.Utils.z285("z145")+e),o(!1),Z.debug==2&&Z.Utils.trace("Image request for "+r+" timeout: "+e)};i.onload=n,i.onabort=u,i.onerror=u,s=window.setTimeout(a,t),i.src=e}}var e=0,t=parseFloat(Z.Utils.z285("z72"));this.loadXML=function(e){n(e,r,null)},this.postXML=function(e,t){n(e,r,t)},this.loadImage=function(t,n,r){if(e>=parseInt(Z.Utils.z285("z73"),10))return!1;var i=Z.Utils.createCallback(null,o,n),s=new u(t,i,r);return e++,s.start(),!0}},Z.Utils={z258:function(){Z.z361=null,Z.imagePath=null,Z.skinPath=null,Z.skinMode=null,Z.parameters=null,Z.browsers=null,Z.browser=null,Z.browserVersion=null,Z.z223=null,Z.cssTransformsSupported=null,Z.cssTransformProperty=null,Z.cssTransformNoUnits=null,Z.alphaSupported=null,Z.renderQuality=null,Z.mobileDevice=null,Z.initialX=null,Z.initialY=null,Z.initialZ=null,Z.minZ=null,Z.maxZ=null,Z.zoomSpeed=null,Z.panSpeed=null,Z.fadeInSpeed=null,Z.toolbarVisible=null,Z.toolbarW=null,Z.toolbarH=null,Z.toolbarPosition=null,Z.navigatorVisible=null,Z.navigatorW=null,Z.navigatorH=null,Z.navigatorL=null,Z.navigatorT=null,Z.navigatorFit=null,Z.clickZoom=null,Z.clickPan=null,Z.mousePan=null,Z.keys=null,Z.constrainPan=null,Z.tooltipsVisible=null,Z.watermarkPath=null,Z.z245=null,Z.hotspotPath=null,Z.hotspotListTitle=null,Z.annotationPath=null,Z.saveHandlerPath=null,Z.z380=!1,Z.sliderVisible=null,Z.fullPageVisible=null,Z.fullPageInitial=null,Z.progressVisible=null,Z.logoVisible=null,Z.logoCustomPath=null,Z.canvas=null,Z.debug=null,Z.imageProperties=null,Z.serverIP=null,Z.serverPort=null,Z.tileHandlerPath=null,Z.tileHandlerPathFull=null,Z.sourceMagnification=null,Z.tileSize=null,Z.tileSource=null,Z.focal=null,Z.quality=null,Z.editMode=!1,Z.z375=!1,Z.Viewer=null,Z.ViewerDisplay=null,Z.Viewport=null,Z.Toolbar=null,Z.ToolbarDisplay=null,Z.TooltipDisplay=null,Z.Navigator=null,Z.NavigatorDisplay=null,Z.MessageDisplay=null,Z.CopyrightDisplay=null,Z.AnnotationPanelDisplay=null,Z.imageW=null,Z.imageH=null,Z.imageX=0,Z.imageY=0,Z.imageZ=0,Z.fitZ=null,Z.z454="stop",Z.z362="stop",Z.z363="stop",Z.fullPage=!1,Z.useCanvas=!0,Z.TraceDisplay=null,Z.traces=null},z275:function(){var e=this.z384("imageCopyright");e?Z.Viewer.z229():this.z332()},z332:function(){var e=new Z.NetConnector;e.loadXML(Z.z245)},z403:function(e,t){var n=this.z285("z51"),r=this.z285("z49");Z.CopyrightDisplay=this.z248("div","CopyrightDisplay","inline-block","absolute","hidden",Z.viewerW-2+"px",Z.viewerH-2+"px","0px","0px","solid","1px",n,"0px","0px","normal"),Z.ViewerDisplay.appendChild(Z.CopyrightDisplay);var i=440,s=200,o=parseFloat(Z.CopyrightDisplay.style.width)/2-i/2,u=parseFloat(Z.CopyrightDisplay.style.height)/2-s/2,a=this.z248("div","textBox","inline-block","absolute","hidden",i+"px",s+"px",o+"px",u+"px","none","0px","transparent none","0px","0px","normal");a.id="textBox",Z.CopyrightDisplay.appendChild(a);var f=document.createTextNode(e);a.appendChild(this.z247(f)),this.z401(f,"black","verdana","16px","none","normal","normal","normal","normal","1em","justify","none");var l=document.createTextNode(t);a.appendChild(l);var c=80,h=20,p=30,d=20,v=o+i/2-(c*2+p)/2,m=u+s+d,g=this.z285("z48"),y=new Z.Utils.Button("buttonAgree",g,null,null,null,null,c+"px",h+"px",v+"px",m+"px","mousedown",this.z243,"z175","solid","1px",r,"0px","0px");Z.CopyrightDisplay.appendChild(y.elmt),v+=c+p,g=this.z285("z50");var b=new Z.Utils.Button("buttonExit",g,null,null,null,null,c+"px",h+"px",v+"px",m+"px","mousedown",this.z244,"z176","solid","1px",r,"0px","0px");Z.CopyrightDisplay.appendChild(b.elmt)},hideCopyright:function(){var e=document.getElementById("textBox"),t=e.childNodes[1].nodeValue;e.firstChild.firstChild.firstChild.firstChild.nodeValue=t;var n=document.getElementById("buttonAgree");this.removeEventListener(n,"mousedown",this.z243),Z.CopyrightDisplay.removeChild(n);var r=document.getElementById("buttonExit");this.removeEventListener(r,"mousedown",this.z244),Z.CopyrightDisplay.removeChild(r)},z243:function(e){Z.ViewerDisplay.removeChild(Z.CopyrightDisplay),document.cookie="imageCopyright=confirmed",Z.Viewer.z229()},z244:function(e){Z.Utils.hideCopyright();return},Button:function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b){var w=Z.Utils.z248("span",e,"inline-block","absolute","hidden",o,u,a,f,p,d,v,m,g,y,b);if(!Z.Utils.isStrVal(t)){n=Z.Utils.z392(n);var E=Z.Utils.z250(n+"/"+r),S=Z.Utils.z250(n+"/"+i),x=Z.Utils.z250(n+"/"+s);E.id=w.id+"-imgUp",S.id=w.id+"-imgOver",x.id=w.id+"-imgDown",w._imgUpID=E.id,w._imgOverID=S.id,w._imgDownID=x.id;var T=E.style,N=S.style,C=x.style;T.position=N.position=C.position="absolute",T.width=N.width=N.width=o,T.height=N.height=N.height=u,T.top=N.top=C.top="0px",T.left=N.left=C.left="0px",Z.browser==Z.browsers.FIREFOX&&Z.browserVersion<3&&(T.top=N.top=C.top=""),N.visibility="hidden",C.visibility="hidden",w.appendChild(E),w.appendChild(S),w.appendChild(x),Z.Utils.addEventListener(E,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(S,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(x,"contextmenu",Z.Utils.preventDefault)}else{var k=document.createTextNode(t);w.appendChild(Z.Utils.z247(k)),Z.Utils.z401(k,"black","verdana","13px","none","normal","normal","normal","normal","1em","center","none"),Z.Utils.z260(k),Z.Utils.addEventListener(w,"contextmenu",Z.Utils.preventDefault)}Z.tooltipsVisible&&Z.Utils.isStrVal(h)&&(w.title=Z.Utils.z285(h)),Z.mobileDevice?Z.Utils.addEventListener(w,"touchstart",c):(Z.Utils.addEventListener(w,"mousedown",Z.Utils.preventDefault),Z.Utils.addEventListener(w,"mouseover",Z.Utils.stopPropagation),Z.Utils.addEventListener(w,"mouseout",Z.Utils.stopPropagation),Z.Utils.addEventListener(w,l,c)),this.elmt=w},z213:function(e,t,n){var r=e.style;r.width=t+"px",r.height=n+"px";var i=document.getElementById(e._imgUpID),s=document.getElementById(e._imgOverID),o=document.getElementById(e._imgDownID);if(i&&s&&o){var u=i.style,a=s.style,f=o.style;u.width=t+"px",u.height=n+"px",a.width=t+"px",a.height=n+"px",f.width=t+"px",f.height=n+"px"}},Graphic:function(e,t,n,r,i,s,o){t=Z.Utils.z392(t);var u=n?t+"/"+n:t,a=Z.Utils.z250(u),f=a.style;f.width=r,f.height=i;var n=Z.Utils.z248("span",e,"inline-block","absolute","hidden",r,i,s,o,"none","0px","transparent none","0px","0px","normal");n.appendChild(a),this.elmt=n,Z.mobileDevice?Z.Utils.addEventListener(a,"touchstart",Z.Utils.preventDefault):Z.Utils.addEventListener(a,"mousedown",Z.Utils.preventDefault),Z.Utils.addEventListener(a,"contextmenu",Z.Utils.preventDefault)},z301:function(e,t,n){var r=e.style;r.width=t+"px",r.height=n+"px";var i=e.firstChild,s=i.style;s.width=t+"px",s.height=n+"px"},z202:function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){t?t<0&&(t=Math.max(0,this.length+t)):t=0;for(var n=t,r=this.length;n=this.length||t&&t<=0)return[];e<0&&(Math.abs(e)>this.length?e=0:e=this.length+e);if(!t||t+e>this.length)t=this.length-e;var n=[];for(var r=e;rthis.length)t=this.length;if(e==t)return[];var n=[];for(var r=e;r2)for(var r=2,i=arguments.length;r=0;o--){var u=r[o],a=s._allListeners[u];if(a.eventName==t&&a.handler==n)return o}return-1},this._removeAllListeners=function(){var e=this;for(id in e._allListeners){var t=e._allListeners[id];t.target.detachEvent("on"+t.eventName,t.handler2),delete e._allListeners[id]}},this._listenerCounter=0)},z259:function(){Z.browsers={UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5};var e=Z.browsers.UNKNOWN,t=0,n=navigator.appName,r=navigator.appVersion,i=!1,s=!1,o=navigator.userAgent.toLowerCase();if(n!="Microsoft Internet Explorer"||!window.attachEvent||!window.ActiveXObject)if(n!="Netscape"||!window.addEventListener)n=="Opera"&&!!window.opera&&!!window.attachEvent&&(e=Z.browsers.OPERA,t=parseFloat(r));else{var a=o.indexOf("firefox"),f=o.indexOf("safari"),l=o.indexOf("chrome");if(a>=0)e=Z.browsers.FIREFOX,t=parseFloat(o.substring(a+8));else if(f>=0){var c=o.substring(0,f).lastIndexOf("/");e=l>=0?Z.browsers.CHROME:Z.browsers.SAFARI,t=parseFloat(o.substring(c+1,f))}var h=new Image;h.style.getPropertyValue&&(s=h.style.getPropertyValue("image-rendering"))}else{var u=o.indexOf("msie");e=Z.browsers.IE,t=parseFloat(o.substring(u+5,o.indexOf(";",u))),i=typeof document.documentMode!="undefined"}var p=document.documentElement||{},d=p.style||{},v=!1,m=["transform","WebkitTransform","MozTransform"],g,y;while(g=m.shift())if(typeof d[g]!="undefined"){v=!0,y=/webkit/i.test(g);break}var b=document.createElement("canvas").getContext&&document.createElement("canvas").getContext("2d"),w=!(e==Z.browsers.SAFARI&&t<4||e==Z.browsers.CHROME&&t<2),E=b&&w,S=!(e==Z.browsers.CHROME&&t<2),x=i||s?"high":null,T=o.indexOf("android")>-1||o.indexOf("iphone")>-1||o.indexOf("ipad")>-1||o.indexOf("ipod")>-1;Z.browser=e,Z.browserVersion=t,Z.z223=E,Z.useCanvas=Z.z223,Z.cssTransformsSupported=v,Z.cssTransformProperty=g,Z.cssTransformNoUnits=y,Z.alphaSupported=S,Z.renderQuality=x,Z.mobileDevice=T},isStrVal:function(e){return e!=null&&e!=""&&e!="null"},z282:function(){var e=new Date,t=(e.getUTCMonth()+1<10?"0":"")+(e.getUTCMonth()+1),n=(e.getUTCDate()<10?"0":"")+e.getUTCDate(),r=(e.getUTCHours()<10?"0":"")+e.getUTCHours(),i=(e.getUTCMinutes()<10?"0":"")+e.getUTCMinutes(),s=(e.getUTCSeconds()<10?"0":"")+e.getUTCSeconds();return e.getUTCFullYear()+t+n+r+i+s},getElementPosition:function(e){var t=0,n=0,r=this.getElementStyle(e).position=="fixed",i=this.getOffsetParent(e,r);while(i){t+=e.offsetLeft,n+=e.offsetTop;if(r){var s=this.getPageScroll();t+=s.x,n+=s.y}e=i,r=this.getElementStyle(e).position=="fixed",i=this.getOffsetParent(e,r)}return new this.Point(t,n)},getOffsetParent:function(e,t){return t&&e!=document.body?document.body:e.offsetParent},getElementSize:function(e){return new this.Point(e.clientWidth,e.clientHeight)},getElementStyle:function(e){if(e.currentStyle)return e.currentStyle;if(window.getComputedStyle)return window.getComputedStyle(e,"");this.z405(this.z285("z162"))},getElementStyleProperty:function(e,t){if(e.currentStyle)return e.currentStyle[t];if(window.getComputedStyle)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t);this.z405(this.z285("z162"))},getEventTargetCoords:function(e){return getElementPosition(Z.Utils.target(e))},getFirstTouch:function(e){var t=null,n=e.touches,r=e.changedTouches;return n!==undefined?t=n[0]:r!==undefined&&(t=r[0]),t},getMousePosition:function(e){var t=0,n=0;return e.type=="DOMMouseScroll"&&browser==Browser.FIREFOX&&browserVersion<3?(t=e.screenX,n=e.screenY):typeof e.pageX=="number"?(t=e.pageX,n=e.pageY):typeof e.clientX=="number"?(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop):this.z405(this.z285("z163")),new this.Point(t,n)},getMouseScroll:function(e){var t=0;return typeof e.wheelDelta=="number"?t=e.wheelDelta:typeof e.detail=="number"?t=e.detail*-1:this.z405(this.z285("z164")),t?t/Math.abs(t):0},getPageScroll:function(){var e=0,t=0,n=document.documentElement||{},r=document.body||{};if(typeof window.pageXOffset=="number")e=window.pageXOffset,t=window.pageYOffset;else if(r.scrollLeft||r.scrollTop)e=r.scrollLeft,t=r.scrollTop;else if(n.scrollLeft||n.scrollTop)e=n.scrollLeft,t=n.scrollTop;return new this.Point(e,t)},getWindowSize:function(){var e=0,t=0,n=document.documentElement||{},r=document.body||{};return typeof window.innerWidth=="number"?(e=window.innerWidth,t=window.innerHeight):n.clientWidth||n.clientHeight?(e=n.clientWidth,t=n.clientHeight):r.clientWidth||r.clientHeight?(e=r.clientWidth,t=r.clientHeight):this.z405(this.z285("z165")),new this.Point(e,t)},z353:function(e){var t=!1,n=e;while(t==0){if(!n)break;n.id?n.id=="ViewerDisplay"?t=!0:n=n.parentNode:n=n.parentNode}return t},z384:function(e){var t=e+"=",n=document.cookie.split(";");for(var r=0;r0){var m=d.substring(0,v),g=d.substring(v+1);if(this.isStrVal(g))switch(m){case"zInitialX":isNaN(parseFloat(g))||(Z.initialX=parseFloat(g));break;case"zInitialY":isNaN(parseFloat(g))||(Z.initialY=parseFloat(g));break;case"zInitialZoom":isNaN(parseFloat(g))||(Z.initialZ=parseFloat(g),Z.initialZ&&(Z.initialZ/=100));break;case"zMinZoom":!isNaN(parseFloat(g))&&parseFloat(g)>.01&&(Z.minZ=parseFloat(g),Z.minZ&&(Z.minZ/=100));break;case"zMaxZoom":isNaN(parseFloat(g))||(Z.maxZ=parseFloat(g),Z.maxZ&&(Z.maxZ/=100));break;case"zNavigatorVisible":Z.navigatorVisible=parseInt(g,10);break;case"zToolbarVisible":Z.toolbarVisible=parseInt(g,10);break;case"zLogoVisible":g=="0"&&(Z.logoVisible=!1);break;case"zSliderVisible":g=="0"&&(Z.sliderVisible=!1);break;case"zFullPageVisible":g=="0"&&(Z.fullPageVisible=!1);break;case"zFullPageInitial":g=="1"&&(Z.fullPageInitial=!0);break;case"zProgressVisible":g=="0"&&(Z.progressVisible=!1);break;case"zTooltipsVisible":g=="0"&&(Z.tooltipsVisible=!1);break;case"zSkinPath":Z.skinPath=g;break;default:if(t==n)alert(r+" "+m);else switch(m){case"zZoomSpeed":Z.zoomSpeed=parseInt(g,10);break;case"zPanSpeed":Z.panSpeed=parseInt(g,10);break;case"zFadeInSpeed":Z.fadeInSpeed=parseInt(g,10);break;case"zToolbarPosition":Z.toolbarPosition=parseInt(g,10);break;case"zNavigatorWidth":isNaN(parseFloat(g))||(Z.navigatorW=parseFloat(g));break;case"zNavigatorHeight":isNaN(parseFloat(g))||(Z.navigatorH=parseFloat(g));break;case"zNavigatorLeft":isNaN(parseFloat(g))||(Z.navigatorL=parseFloat(g));break;case"zNavigatorTop":isNaN(parseFloat(g))||(Z.navigatorT=parseFloat(g));break;case"zNavigatorFit":isNaN(parseFloat(g))||(Z.navigatorFit=parseInt(g,10));break;case"zClickZoom":g=="0"&&(Z.clickZoom=!1);break;case"zClickPan":g=="0"&&(Z.clickPan=!1);break;case"zMousePan":g=="0"&&(Z.mousePan=!1);break;case"zKeys":g=="0"&&(Z.keys=!1);break;case"zConstrainPan":g=="0"&&(Z.constrainPan=!1);break;case"zWatermarkPath":Z.watermarkPath=g;break;case"zCopyrightPath":Z.z245=g;break;case"zHotspotPath":Z.hotspotPath=g;break;case"zHotspotListTitle":Z.hotspotListTitle=g;break;case"zAnnotationPath":Z.annotationPath=g;break;case"zLogoCustomPath":Z.logoCustomPath=g;break;case"zCanvas":g=="0"&&(Z.canvas=!1);if(!Z.z223||!Z.canvas)Z.useCanvas=!1;break;case"zDebug":Z.debug=parseInt(g,10);break;case"zImageProperties":Z.imageProperties=g;break;case"zServerIP":Z.serverIP=g;break;case"zServerPort":Z.serverPort=g;break;case"zTileHandlerPath":Z.tileHandlerPath=g;break;case"zEditMode":Z.editMode=g;break;case"zSaveHandlerPath":Z.saveHandlerPath=g;break;case"zImageW":Z.imageW=parseInt(g,10);break;case"zImageH":Z.imageH=parseInt(g,10);break;case"zTileSize":Z.tileSize=parseInt(g,10);break;case"zMagnification":Z.sourceMagnification=parseInt(g,10);break;case"zFocal":Z.focal=parseInt(g,10);break;case"zQuality":Z.quality=parseInt(g,10)}}}}if(!Z.Utils.isStrVal(Z.tileHandlerPath))Z.tileSource="ZoomifyImageFolder";else if(Z.imagePath.toLowerCase().indexOf(".pff")!=-1)if(u){Z.tileSource="ZoomifyImageFile";var y=Z.tileHandlerPath;Z.tileHandlerPathFull=y}else alert(o);else if(Z.Utils.isStrVal(Z.tileHandlerPath))if(u){Z.tileSource="ImageServer";var y=Z.tileHandlerPath;Z.tileHandlerPathFull=y}else alert(o);if(Z.Utils.isStrVal(Z.annotationPath)||Z.Utils.isStrVal(Z.saveHandlerPath))if(c){if(Z.Utils.isStrVal(Z.saveHandlerPath)){var b=Z.saveHandlerPath;Z.saveHandlerPath=b}}else Z.annotationPath="",alert(l)},z391:function(e){for(var t=1;t=(elmt2=t[o]);o++)if(elmt2==i){s=!0;break}s&&n.push(e[r])}return n},subtract:function(e,t){for(var n=0;n=(elmt2=t[s]);s++)if(elmt2==r){i=!0;break}i&&e.splice(n--,1)}return e},clone:function(e,t,n){n=[];switch(e){case"hotspots":for(var r=0,i=t.length;rr&&(r=e[s].x),e[s].yi&&(i=e[s].y);var u=r-t,a=i-n;return new Z.Utils.Point(u,a)},getCenterOfPolygonPoints:function(e){var t=e[0].x,n=e[0].y,r=e[0].x,i=e[0].y;for(var s=1,o=e.length;s'),n.push('
'),n.push('
'),t.innerHTML=n.join(""),t=t.firstChild;var r=t,i=t.getElementsByTagName("div");while(i.length>0)r=i[0],i=r.getElementsByTagName("div");return r.appendChild(e),t},z250:function(e){var t=this.z248("img"),n=null;return Z.browser==Z.browsers.IE&&Z.browserVersion<7?(n=this.z248("span",null,"inline-block"),t.onload=function(){n.style.width=n.style.width||t.width+"px",n.style.height=n.style.height||t.height+"px",t.onload=null,t=null},n.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+e+"', sizingMethod='scale')"):(n=t,n.src=e),n},z254:function(e,t,n,r,i,s,o,u,a,f,l,c,h,p){var d=Z.Utils.z248("div","textBoxFor"+e,"inline-block","absolute","hidden",n,r,i,s,u,a,"white","0px",o,"normal"),v=document.createElement("textarea");d.appendChild(v);var m=v,g=m.style;return m.id=e,m.value=t,m.readOnly=l,m.overflowY=f,g.width="100%",g.height="100%",g.margin="0",g.border="0",g.fontFamily=c,g.fontSize=h,g.resize=p,d},z253:function(e,t,n,r,i,s,o,u){sList=document.createElement("select"),sList.id=e,Z.Utils.isStrVal(t)&&(sList.options[0]=new Option(t,null));for(var a=0,f=n.length;a