/* Zoomify Image Viewer, version on line 26 below. Copyright Zoomify, Inc., 1999-2015. All rights reserved. You may use this file on private and public websites, for personal and commercial purposes, with or without modifications, so long as this notice is included. Redistribution via other means is not permitted without prior permission. Additional terms apply. For complete license terms please see the Zoomify License Agreement in this product and on the Zoomify website at www.zoomify.com. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ (function(){(function(){return this}).call().Z={}})();Z.version="3.01 Express"; Z.showImage=function(a,b,c){Z.showImage.done?(Z.Utils.declareGlobals(),Z.pageContainerID=a,Z.imagePath="undefined"!==typeof b&&null!==b?Z.Utils.stringRemoveTrailingSlashCharacters(b):null,"undefined"!==typeof c&&(Z.parameters=Z.Utils.parseParameters(c)),Z.initialize()):(Z.showImage.done=!0,Z.Utils.addCrossBrowserMethods(),Z.Utils.addCrossBrowserEvents(),Z.Utils.declareGlobals(),Z.pageContainerID=a,Z.setCallback=function(a,b){var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackEvent",a, null,"callbackFunction",b);-1==c&&(c=Z.callbacks.length);Z.callbacks[c]={callbackEvent:a,callbackFunction:b}},Z.clearCallback=function(a,b){var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackEvent",a,null,"callbackFunction",b);-1!=c&&(Z.callbacks=Z.Utils.arraySplice(Z.callbacks,c,1))},Z.imagePath="undefined"!==typeof b&&null!==b?Z.Utils.stringRemoveTrailingSlashCharacters(b):null,"undefined"!==typeof c&&("string"===typeof c?(a=unescape(c),a=Z.Utils.stringUnescapeAmpersandCharacters(a), Z.parameters=Z.Utils.parseParameters(a)):Z.parameters=Z.Utils.parseParameters(c)),"complete"!=document.readyState?(Z.Utils.addEventListener(document,"DOMContentLoaded",Z.initialize),Z.Utils.addEventListener(window,"load",Z.initialize)):Z.initialize())}; Z.initialize=function(){Z.Utils.removeEventListener(document,"DOMContentLoaded",Z.initialize);Z.Utils.removeEventListener(window,"load",Z.initialize);Z.Utils.detectBrowserFeatures();Z.Utils.setParameters(Z.parameters);Z.Viewer=new Z.ZoomifyImageViewer;Z.Viewer.configureViewer()}; Z.ZoomifyImageViewer=function(){function a(){document.getElementsByTagName("body")?document.getElementsByTagName("body")[0].onorientationchange=b:window.setTimeout(a,100)}function b(a){!Z.interactivityOff&&Z.fullView&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&1fc?(pa=la(Ba,Z.initialZ),J&&ha.scale(pa,pa)):ha=Ta=J=null;Ua=la(ia,Z.initialZ);ib=R=la(I,Z.initialZ);if(Z.useCanvas)try{ka.scale(R,R)}catch(g){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE")),console.log("In function initializeViewportContinue scaling canvas: "+ g)}"unconverted"!=Z.tileSource&&m.z619();Nb(Z.initialX,Z.initialY,Z.initialZ,Z.initialR,null,!0);Z.initialFullPage&&m.toggleFullViewMode(!0);Z.Utils.addEventListener(O,"mousedown",S);Z.Utils.addEventListener(O,"mousemove",Z.Utils.preventDefault);Z.Utils.addEventListener(O,"touchstart",S);Z.Utils.addEventListener(O,"touchmove",S);Z.Utils.addEventListener(O,"touchend",S);Z.Utils.addEventListener(O,"touchcancel",S);Z.Utils.addEventListener(O,"gesturestart",S);Z.Utils.addEventListener(O,"gesturechange", S);Z.Utils.addEventListener(O,"gestureend",S);Z.Utils.addEventListener(V,"contextmenu",Z.Utils.preventDefault);Z.Utils.addEventListener(ba,"contextmenu",Z.Utils.preventDefault);m.setStatus("initialized",!0);m.syncViewportRelated()}function g(a,b,l,f,c,d,h,e,k,t,B){m.setStatus("initialized",!1);Ob=Pb=0;"undefined"!==typeof qa&&Z.Utils.arrayClear(qa);"undefined"!==typeof ra&&Z.Utils.arrayClear(ra);"undefined"!==typeof jb&&Z.Utils.arrayClear(jb);"undefined"!==typeof kb&&Z.Utils.arrayClear(kb);"undefined"!== typeof W&&Z.Utils.arrayClear(W);"undefined"!==typeof va&&Z.Utils.arrayClear(va);"undefined"!==typeof Xa&&Z.Utils.arrayClear(Xa);"undefined"!==typeof lb&&Z.Utils.arrayClear(lb);"undefined"!==typeof Ya&&Z.Utils.arrayClear(Ya);"undefined"!==typeof Ja&&Z.Utils.arrayClear(Ja);"undefined"!==typeof Za&&Z.Utils.arrayClear(Za);"undefined"!==typeof mb&&Z.Utils.arrayClear(mb);"undefined"!==typeof ma&&Z.Utils.arrayClear(ma);"undefined"!==typeof Ka&&Z.Utils.arrayClear(Ka);"undefined"!==typeof Qa&&Z.Utils.arrayClear(Qa); J&&Z.Utils.clearDisplay(J);V&&Z.Utils.clearDisplay(V);ba&&Z.Utils.clearDisplay(ba);La&&Z.Utils.clearDisplay(La);Z.imageW=a;Z.imageH=b;Z.imageCenterX=Z.imageW/2;Z.imageCenterY=Z.imageH/2;Vb=c;ya=l;za=f;D();Z.Utils.setParameters(Z.parameters);q();v();m.validateXYZDefaults();ua>fc?(pa=la(Ba,Z.initialZ),ha.restore(),ha.scale(pa,pa)):J=Ta=ha=null;Ua=la(ia,Z.initialZ);ib=R=la(I,Z.initialZ);Z.useCanvas&&(ka.restore(),ka.scale(R,R));"unconverted"!=Z.tileSource&&m.z619();m.setSizeAndPosition(Q,N,ec,Mb);Nb(Z.initialX, Z.initialY,Z.initialZ,Z.initialR,null,!0);m.setStatus("initialized",!0);Z.Navigator&&0a&&(da=a);ea>a&&(ea=a);da>b&&(da=b);ea>c&&(ea=c);daya||b>za;)a/=2,b/=2,ua++;for(var a=Z.imageW,b=Z.imageH,l=0,f=ua-1;0<=f;f--)wa[f]=a,Ca[f]=b,na[f]=Math.ceil(wa[f]/ya),Da[f]=Math.ceil(Ca[f]/za),Ea[f]=na[f]*Da[f],a/=2,b/=2,l+=Ea[f];if(l!=Vb&&("ZoomifyImageFolder"==Z.tileSource||"ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)){wa=[];Ca=[];na=[];Da=[];ua=1;a=Z.imageW;b=Z.imageH;for(l=2;a>ya||b>za;)a=Math.floor(Z.imageW/l),b=Math.floor(Z.imageH/l),l*=2,a%2&&a++,b%2&&b++,ua++;a=Z.imageW;b=Z.imageH;l=2;tileCounter= 0;for(f=ua-1;0<=f;f--)na[f]=Math.floor(a/ya),a%ya&&na[f]++,Da[f]=Math.floor(b/za),b%za&&Da[f]++,Ea[f]=na[f]*Da[f],tileCounter+=Ea[f],wa[f]=a,Ca[f]=b,a=Math.floor(Z.imageW/l),b=Math.floor(Z.imageH/l),l*=2,a%2&&a++,b%2&&b++;a=tileCounter;a!=Vb&&Z.Utils.showMessage(Z.Utils.getResource("z254"))}}}function T(a,b){for(var l=na[a]-1,f=Da[a]-1,c=0;c<=l;c++)for(var d=0;d<=f;d++)b[b.length]=a+"-"+c+"-"+d}function aa(a){if(a){a=m.z542(ia);Z.Utils.arrayClear(ra);Z.Utils.arrayClear(jb);b=a.l;for(l=a.r;b<=l;b++)for(f= a.t,c=a.b;f<=c;f++)d=ia+"-"+b+"-"+f,jb[jb.length]=d,ra[ra.length]=d;ga(ra,oa,"simple","image-backfill")}else{Z.Utils.arrayClear(kb);Z.Utils.arrayClear(lb);Z.Utils.arrayClear(Ya);Z.Utils.arrayClear(W);a=m.z542();for(var b=a.l,l=a.r;b<=l;b++)for(var f=a.t,c=a.b;f<=c;f++){var d=I+"-"+b+"-"+f;kb[kb.length]=d;W[W.length]=d}if(m.getStatus("initialized")&&0=a.l&&f.c<=a.r&&f.r>=a.t&&f.r<=a.b&&(Ya[Ya.length]=f.name,lb[lb.length]= f,c=Z.Utils.arrayIndexOf(W,f.name),-1!=c&&(W=Z.Utils.arraySplice(W,c,1)));b=0;for(l=va.length;b=a.l&&f.c<=a.r&&f.r>=a.t&&f.r<=a.b&&(c=Z.Utils.arrayIndexOf(Ya,f.name),-1==c&&(Ya[Ya.length]=f.name,lb[lb.length]=f),f=Z.Utils.arrayIndexOf(W,f.name),-1!=f&&(W=Z.Utils.arraySplice(W,f,1)));if(0!=Ob){b=0;for(l=Ja.length;b=c.l&&k.c<=c.r&&k.r>=c.t&&k.r<=c.b)&&(d[d.length]=l[h])}if(0=l.l&&d.c<=l.r&&d.r>=l.t&&d.r<=l.b)&&P(La,a,d)}}function r(a){Aa=null;Aa=new Image;Aa.onload=E;Aa.onerror=H;Aa.src=a}function E(){if("undefined"!== typeof Aa){var a=Z.Utils.createContainerElement("div","testImageContainer","inline-block","absolute","hidden",Q+"px",N+"px","0px","0px","none","0px","transparent none","0px","0px","normal",null,!0);a.appendChild(Aa);a.removeChild(Aa);var a=null,a=Aa.width,b=Aa.height;m.setStatus("displayLoaded",!0);m.setStatus("displayDrawn",!0);0!=a&&0!=b?e(a,b,a,b,null,null,null,null,null,null,null):window.setTimeout(function(){E()},100)}else window.setTimeout(function(){E()},100)}function H(){Z.Utils.showMessage(Z.Utils.getResource("ERROR_UNCONVERTEDIMAGEPATHINVALID"))} function ga(a,b,l,f){var c="undefined"!==typeof f&&null!==f?"-"+f:"";if(0k&&(k=g.c),g.rB&&(B=g.r)))}a=e+(k-e)/2;f=t+(B-t)/2;for(l=0;lEa[a]?8*(Ea[a]-f):Gc;this.chunkStart=Ab[a]+l*Gc;this.chunkEnd=this.chunkStart+f;this.offsetStartInChunk=b-this.chunkStart;this.chunkID=a.toString()+"-"+l.toString()}function t(a,b,l){l=b+l*na[a];b=4*l+rb[a];l=Math.floor(l/ub);var f=l*ub,f=f+ub>Ea[a]?4*(Ea[a]-f):Hc;this.chunkStart=rb[a]+l*Hc;this.chunkEnd= this.chunkStart+f;this.bcStartInChunk=b-this.chunkStart;this.chunkID=a.toString()+"-"+l.toString()}function M(a,b){for(var l=0,f=ma.length;lBb&&va.length>Bb;)Xa=Z.Utils.arraySplice(Xa,0,1),va=Z.Utils.arraySplice(va,0,1);Pb=0}m.traceDebugValues("onTileLoad",a.name,a.loadTime);m.updateProgress(Pb,Ob)}kc==lc+Cb&&m.setStatus("displayLoaded", !0)}else"undefined"!==typeof b&&null!==b||console.log(Z.Utils.getResource("z280")+a.name+".jpg")}function oa(a,b){if(a&&b){a.image=b;var l=a.name;qa[qa.length]=a;var f=Z.Utils.arrayIndexOf(ra,l);-1!=f&&(ra=Z.Utils.arraySplice(ra,f,1));if("ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)l=Z.Utils.arrayIndexOf(Qa,l),-1!=l&&(Qa=Z.Utils.arraySplice(Qa,l,1));a.alpha=1;a.t==ia&&P(V,ia,a);m.traceDebugValues("onTileBackfillPrecache",a.name);Lc==mc&&m.setStatus("precacheLoaded",!0);m.traceDebugValues("z599", a.name);nc<=0+oc&&m.setStatus("backfillLoaded",!0);a.t==I&&xa(a,b)}else if("undefined"===typeof b||null===b)Z.mobileDevice?console.log(Z.Utils.getResource("z280")+a.name+".jpg"):Z.Utils.showMessage(Z.Utils.getResource("z280")+a.name+".jpg")}function F(a){for(var b=a=0,l=Ja.length;bf.alpha+pc?f.alpha+=pc:(f.alpha=1,a++),P(ba,I,f),a>=l&&(window.clearInterval(Yb),Yb=null,b=l)):(Ja=Z.Utils.arraySplice(Ja,b,1),Za=Z.Utils.arraySplice(Za,b,1),f=Z.Utils.arrayIndexOf(W, f.name),-1!=f&&(W=Z.Utils.arraySplice(W,f,1)),l--)}}function P(a,b,l){if("z647"!=l.url.substr(0,8)&&0!=l.image.width&&0!=l.image.height){var f=l.x,c=l.y;b=u(b,1);pa=la(Ba,m.getZoom());var d=8l.alpha&&"transitionCanvas"!=a.id&&-1==a.id.indexOf("oversizeDisplay")&&(b.globalAlpha=l.alpha),b.drawImage(l.image,f,c),Z.alphaSupported&& 1>l.alpha&&"transitionCanvas"!=a.id&&"oversizeDisplay"!=a.id&&(b.globalAlpha=1)):(a==ba?(f-=Z.imageX*b-$a/R,c-=Z.imageY*b-ab/R,b=R):b=Ua,l.elmt||(l.elmt=Z.Utils.createContainerElement("img"),l.elmt.onmousedown=Z.Utils.preventDefault,Z.Utils.addEventListener(l.elmt,"contextmenu",Z.Utils.preventDefault),l.elmt.src=l.url,l.style=l.elmt.style,l.style.position="absolute",Z.Utils.renderQuality(l,Z.renderQuality),Z.cssTransformsSupported&&(l.style[Z.cssTransformProperty+"Origin"]="0px 0px")),l.elmt.parentNode!= a&&a.appendChild(l.elmt),d=l.style,d.display="none",Z.cssTransformsSupported?d[Z.cssTransformProperty]=["matrix(",(l.image.width/l.elmt.width*b).toFixed(8),",0,0,",(l.image.height/l.elmt.height*b).toFixed(8),",",(f*b).toFixed(8),Z.cssTransformNoUnits?",":"px,",(c*b).toFixed(8),Z.cssTransformNoUnits?")":"px)"].join(""):(d.width=l.image.width*b+"px",d.height=l.image.height*b+"px",d.left=f*b+"px",d.top=c*b+"px"),d.display="inline-block",Z.Utils.setOpacity(l,l.alpha));a==ba?(m.traceDebugValues("z507", l.name),kc==Zb&&m.setStatus("displayDrawn",!0)):(m.traceDebugValues("displayBackfillTile",l.name),nc<=qc&&m.setStatus("backfillDrawn",!0))}}function p(a,b){var c=u(b,1),f=Math.floor(a.l*c/ya),d=Math.floor(a.r*c/ya),h=Math.floor(a.t*c/za),c=Math.floor(a.b*c/za);0>f&&(f=0);d>na[b]-1&&(d=na[b]-1);0>h&&(h=0);c>Da[b]-1&&(c=Da[b]-1);this.l=f;this.r=d;this.t=h;this.b=c}function X(a,b,c,f,d,h,e){this.l=a+c/e;this.r=a+f/e;this.t=b+d/e;this.b=b+h/e}function Sa(a,b){var c=a-Z.Utils.getElementPosition(Z.ViewerDisplay).x, f=b-Z.Utils.getElementPosition(Z.ViewerDisplay).y;return new Z.Utils.Point(c,f)}function bb(a,b,c,f){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof f||null===f)f=Z.imageR;0>f&&(f+=360);var d=parseFloat(w.left)+$a,h=parseFloat(w.top)+ab;a-=d;b-=h;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,f),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(Z.imageX+a/c,Z.imageY+b/c)}function nb(a,b,c,f){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"=== typeof f||null===f)f=Z.imageR;0>f&&(f+=360);a=(Z.imageX-a)*c;b=(Z.imageY-b)*c;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-f),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(sa+a,ta+b)}function u(a,b){return wa[a]/Z.imageW*b}function la(a,b){return b/(wa[a]/Z.imageW)}function Fa(a,b,c,f,d){if(Z.constrainPan){f=Math.round(f);var h=a,e=b;c="undefined"!==typeof c&&null!==c?c:Z.imageZ;f="undefined"!==typeof f&&null!==f?f:Z.imageR;0>f&&(f+=360);var k=Z.Utils.getDisplayPositionRotated(w, f),t=Z.imageW,B=Z.imageH,m=Q,g=N,r=Math.round(t*c),ca=Math.round(B*c);if("container"==d){var M=c,p=f;if("undefined"===typeof M||null===M)M=Z.imageZ;if("undefined"===typeof p||null===p)p=Z.imageR;0>p&&(p+=360);a=(sa-a)/M;b=(ta-b)/M;var n,Ma;switch(p){case 0:n=Z.imageX+a;Ma=Z.imageY+b;break;case 90:n=Z.imageX+b;Ma=Z.imageY-a;break;case 180:n=Z.imageX-a;Ma=Z.imageY-b;break;case 270:n=Z.imageX-b,Ma=Z.imageY+a}b=new Z.Utils.Point(n,Ma);a=b.x;b=b.y}p=Z.constrainPanStrict?0:m/2/c;Ma=Z.constrainPanStrict? 0:g/2/c;n=(m+k.y)/2/c-p;p=t-(m+k.y)/2/c+p;M=(g+k.x)/2/c-Ma;k=B-(g+k.x)/2/c+Ma;a=(0==f||180==f)&&r>m||(90==f||270==f)&&r>g||!Z.constrainPanStrict?a<=n?n:a>=p?p:a:t/2;b=(0==f||180==f)&&ca>g||(90==f||270==f)&&ca>m||!Z.constrainPanStrict?b<=M?M:b>=k?k:b:B/2;if("container"==d){var q;d=c;c=f;if("undefined"===typeof d||null===d)d=Z.imageZ;if("undefined"===typeof c||null===c)c=Z.imageR;0>c&&(c+=360);var u;switch(c){case 0:q=a-Z.imageX;u=b-Z.imageY;break;case 90:q=Z.imageY-b;u=a-Z.imageX;break;case 180:q= Z.imageX-a;u=Z.imageY-b;break;case 270:q=b-Z.imageY,u=Z.imageX-a}q=new Z.Utils.Point(sa-q*d,ta-u*d);a=q.x;b=q.y}a==h&&b==e||Z.Utils.validateCallback("panConstrained")}return new Z.Utils.Point(a,b)}function Va(a){a>Z.maxZ?(a=Z.maxZ,Z.Utils.validateCallback("zoomConstrainedMax")):a=ac;if(2==Z.debug||3==Z.debug)Z.Utils.trace("View validation-time elapsed: "+Db),0=f?f+=360:360<=f&&(f-=360);a=Fa(a,b,c,f,"image");Z.imageX=rc=a.x;Z.imageY=sc=a.y;Z.imageZ=c;f!=Z.imageR&&Z.Utils.rotateElement(w,f);Z.imageR=f;m.updateView(!0);"function"===typeof d&&d()}function tc(){if(ob&&(0!=Ga||0!=Ha||0!=Na)){var a=Ga,b=Ha,c=Na,f=m.getZoom();0!=c&&(f=u(I,R*(1+c)),f=Va(f),f!=Z.imageZ&& K(f));if(0!=a||0!=b)a=parseFloat(w.left)+a,b=parseFloat(w.top)+b,f=Fa(a,b,f,Z.imageR,"container"),w.left=Math.round(f.x)+"px",w.top=Math.round(f.y)+"px",b=f.x-sa,f=f.y-ta,J&&fa&&(Z.mobileDevice||Math.abs(b)>Q/2||Math.abs(f)>N/2)&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display");m.syncViewportRelated();Nc++;ob=window.setTimeout(tc,uc)}}function Oc(a,b,c,f,d,h,e){Sb++;var k=d/h,t=Sb*k,B=Z.Utils.easing(Z.imageX,a,t,d),g=Z.Utils.easing(Z.imageY,b,t,d),r=Z.Utils.easing(Z.imageZ,c,t,d),t=Z.Utils.easing(Z.imageR, f,t,d),g=nb(B,g,r),B=g.x,g=g.y,ca=!1,p=syncOversize=!1;if(parseFloat(w.left)!=B||parseFloat(w.top)!=g)w.left=B+"px",w.top=g+"px",p=!0,J&&fa&&(syncOversize=!0);r!=Z.imageZ&&(K(r,!1),ca=p=!0,J&&fa&&(ha.restore(),ha.save(),ha.scale(pa,pa),syncOversize=!0));t!=Z.imageR&&(Z.Utils.rotateElement(w,t),J&&fa&&(ha.rotate((t-Z.imageR)*Math.PI/180),syncOversize=!0),Z.imageR=t,p=!0);syncOversize&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display");m.syncViewportRelated(!1,!1,!1,!1,!1);0==Sb%2&&m.syncViewportRelated(!1, !1,ca,p,ca);r=Z.tour&&Z.tourStop&&0==Math.round(Z.imageR%90);SbZ.scaleThreshold||h>Z.scaleThreshold))ha.restore(),ha.save(),ha.scale(pa,pa),ha.rotate(Z.imageR*Math.PI/180),C(J,Ba,qa,"simple",!1,"Updating backfill oversize display");Ua=c=la(ia,a);d=c/tierBackfillScalePrior;c=cb*d;d*=db;h=Oa+(cb-c)/2;f=Pa+(db-d)/2;L.width=c+"px";L.height=d+"px";L.left=h+"px"; L.top=f+"px"}else J&&Z.Utils.clearDisplay(J),d=cb*c,h=db*c,e=Oa+Z.imageX*(1-c)*Z.imageZ,k=Pa+Z.imageY*(1-c)*Z.imageZ,L.width=d+"px",L.height=h+"px",L.left=e+"px",L.top=k+"px";else C(ba,I,va,"centerOut",!1,"Scaling: non-canvas zoom"),fa?(c=Pc,cb=da*c,db=ea*c,Oa=-(da/c),Pa=-(ea/c),vc=$a*c,wc=ab*c,V.width=cb,V.height=db,L.width=V.width+"px",L.height=V.height+"px"):(c=Ca[ia],V.width=wa[ia],V.height=c,c=Z.imageY*a,Oa=$a-Z.imageX*a,Pa=ab-c),L.left=Oa+"px",L.top=Pa+"px",C(V,ia,qa,"simple",!1,"Scaling: non-canvas zoom - backfill"); c=!0}return c}function S(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c=Z.Utils.isRightMouseButton(a),f=a.altKey;if("mouseover"!=b&&"mouseout"!=b&&Z.interactivityOff||"mousedown"==b&&(Z.interactivityOff||Z.coordinatesVisible&&f)||c)Z.tourStop=!0;else{if("mousedown"==b||"touchstart"==b||Z.tourPlaying&&Z.tourStop)m.zoomAndPanAllStop(),Z.interactivityOff=!1;Z.touchSupport&&!Z.clickZoomAndPanBlock&&"touchmove"!=b&&"gesturechange"!=b&&a.preventDefault();if("mousedown"==b)window.setTimeout(function(){m.zoomAndPanAllStop(!1, !0)},1);else if("touchstart"==b||"gesturestart"==b)touch=Z.Utils.getFirstTouch(a),m.zoomAndPanAllStop(!1,!0);switch(b){case "mouseover":Z.fullView||"TEXTAREA"==document.activeElement.tagName||Z.Viewer.initializeViewerKeyDefaultListeners(!0);break;case "mousedown":!Z.fullView&&document.activeElement&&document.activeElement.blur();Z.Viewer.initializeViewerKeyEventListeners(!0);Z.Utils.addEventListener(document,"mousemove",S);Z.Utils.addEventListener(document,"mouseup",S);break;case "mouseup":Z.Utils.removeEventListener(document, "mousemove",S),Z.Utils.removeEventListener(document,"mouseup",S)}dd(a);if("mousedown"==b||"mousemove"==b)return!1}}}function dd(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c,f;if("touchstart"==b||"touchmove"==b||"touchend"==b||"touchcancel"==b)c=Z.Utils.getFirstTouch(a),"undefined"!==typeof c&&(f=new Z.Utils.Point(c.pageX,c.pageY));else{Z.Utils.target(a);Z.Utils.relatedTarget(a);var d=Z.Utils.isRightMouseButton(a),h=a.altKey;"resize"!=b&&(f=Z.Utils.getMousePosition(a));Z.smoothPan&&(Fb=f)}"DOMMouseScroll"== b&&(b="mousewheel");var e=m.getZoom();"undefined"!==typeof f&&null!==f&&m.getClickCoordsInImage(a,e,f);switch(b){case "mousedown":Z.mouseIsDown=!0;Ia=new Z.Utils.Point(f.x,f.y);O.mouseXPrior=f.x;O.mouseYPrior=f.y;Z.smoothPan&&!h&&Z.mousePan&&1O.mouseXPrior?Z.Viewer.viewportNext():f.xQ/2||Math.abs(a)>N/2)&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display"), Z.Navigator&&(f=m.calculateCurrentCenterCoordinates(h,Z.imageZ,Z.imageR),Z.Navigator.z658(f)))));break;case "mouseup":Z.mouseIsDown=!1;document.mousemove=null;document.mouseup=null;Z.mouseOutDownPoint?(f=Z.mouseOutDownPoint,m.getClickCoordsInImage(a,e,Z.mouseOutDownPoint)):f=new Z.Utils.Point(f.x,f.y);f=Z.Utils.calculatePointsDistance(Ia.x,Ia.y,f.x,f.y);if(4>f||!h&&("freehand"==Z.labelMode||"rectangle"==Z.labelMode)){if(null===Z.editMode&&"measure"==Z.labelMode||"view"!=Z.labelMode&&("addLabel"== Z.editing||"editLabel"==Z.editing))h&&!d||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||(Z.Utils.addEventListener(document,"mousemove",S),G?(clearTimeout(G),G=null,Z.Utils.removeEventListener(document,"mousemove",S)):(G=setTimeout(function(a){G=null},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"mousemove",S)));else if(null===Z.editing||"view"==Z.labelMode){if(Z.clickZoom||Z.clickPan){f= G&&Z.doubleClickZoom?!0:!1;var k=m.getClickZoomCoords3D(a,Ia,I,R,f)}Z.clickZoom?Z.doubleClickZoom?G?(clearTimeout(G),G=null,m.zoomAndPanToView(k.x,k.y,k.z)):G=setTimeout(function(a){G=null;m.zoomAndPanToView(k.x,k.y,k.z)},Z.doubleClickDelay):window.setTimeout(function(){m.zoomAndPanToView(k.x,k.y,k.z)},1):Z.clickPan&&m.zoomAndPanToView(k.x,k.y,Z.imageZ)}Z.mousePan&&!Z.smoothPan&&m.updateView()}Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&1< Z.navigatorVisible&&Z.Navigator.setVisibility(!1));break;case "touchstart":c&&!pb&&(Z.mouseIsDown=!0,Ub=!1,Ia=new Z.Utils.Point(f.x,f.y),O.mouseXPrior=f.x,O.mouseYPrior=f.y,h||"view"==Z.labelMode||"addLabel"!=Z.editing&&"editLabel"!=Z.editing&&(null!==Z.editMode||"measure"!=Z.labelMode)||Z.Utils.hideMessage());break;case "touchmove":!c||pb||Ub||(xb=new Z.Utils.Point(f.x,f.y),G&&(clearTimeout(G),G=null),!h&&Z.mousePan&&(fb?Fb=f:(d=f.x-O.mouseXPrior,a=f.y-O.mouseYPrior,isNaN(d)||isNaN(a)||(d=parseFloat(w.left)+ d,a=parseFloat(w.top)+a,h=Fa(d,a,Z.imageZ,Z.imageR,"container"),w.left=h.x+"px",w.top=h.y+"px",O.mouseXPrior=f.x,O.mouseYPrior=f.y,d=h.x-sa,a=h.y-ta,J&&fa&&(Z.mobileDevice||Math.abs(d)>Q/2||Math.abs(a)>N/2)&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display"),Z.Navigator&&(f=m.calculateCurrentCenterCoordinates(h,Z.imageZ,Z.imageR),Z.Navigator.z658(f))))));break;case "touchend":if(!pb&&!Ub){Z.mouseIsDown=!1;document.mousemove=null;document.mouseup=null;Z.mouseOutDownPoint?(f=Z.mouseOutDownPoint, m.getClickCoordsInImage(a,e,Z.mouseOutDownPoint)):f="undefined"!==typeof f&&null!==f?new Z.Utils.Point(f.x,f.y):"undefined"!==typeof xb&&null!==xb?xb:Ia;f=Z.Utils.calculatePointsDistance(Ia.x,Ia.y,f.x,f.y);if(4>f||!h&&("rectangle"==Z.labelMode||"freehand"==Z.labelMode))if(null===Z.editMode&&"measure"==Z.labelMode||"view"!=Z.labelMode&&("addLabel"==Z.editing||"editLabel"==Z.editing))h||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||(Z.Utils.addEventListener(document, "touchmove",S),G?(clearTimeout(G),G=null,Z.Utils.removeEventListener(document,"touchmove",S)):(G=setTimeout(function(a){G=null},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"touchmove",S)));else if(null===Z.editing||"view"==Z.labelMode)Z.clickZoom?(f=G&&Z.doubleClickZoom?!0:!1,k=m.getClickZoomCoords3D(a,Ia,I,R,f),Z.doubleClickZoom?G?(clearTimeout(G),G=null,m.zoomAndPanToView(k.x,k.y,k.z)):G=setTimeout(function(a){G=null;m.zoomAndPanToView(k.x, k.y,k.z)},Z.doubleClickDelay):window.setTimeout(function(){m.zoomAndPanToView(k.x,k.y,k.z)},1)):Z.clickPan&&m.zoomAndPanToView(k.x,k.y,Z.imageZ);Z.mousePan&&!fb&&m.updateView();Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&1f||!h&&("rectangle"==Z.labelMode||"freehand"==Z.labelMode))if(null===Z.editMode&&"measure"==Z.labelMode||"view"!=Z.labelMode&&("addLabel"==Z.editing||"editLabel"==Z.editing))"addLabel"!=Z.editing||h||"text"!=Z.labelMode&&"icon"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||m.saveEditsLabel(!0,!1,!1), h||"freehand"!=Z.labelMode&&"rectangle"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||(Z.Utils.addEventListener(document,"touchmove",S),G?(clearTimeout(G),G=null,Z.Utils.removeEventListener(document,"touchmove",S)):(G=setTimeout(function(a){G=null},Z.doubleClickDelay),"polygon"!=Z.labelMode&&"measure"!=Z.labelMode&&Z.Utils.removeEventListener(document,"touchmove",S)));else{if(null===Z.editing||"view"==Z.labelMode)Z.clickZoom?(f=G&&Z.doubleClickZoom?!0:!1,k=m.getClickZoomCoords3D(a, Ia,I,R,f),Z.doubleClickZoom?G?(clearTimeout(G),G=null,m.zoomAndPanToView(k.x,k.y,k.z)):G=setTimeout(function(a){G=null;m.zoomAndPanToView(k.x,k.y,k.z)},Z.doubleClickDelay):window.setTimeout(function(){m.zoomAndPanToView(k.x,k.y,k.z)},1)):Z.clickPan&&m.zoomAndPanToView(k.x,k.y,Z.imageZ)}else Z.mousePan&&!fb&&m.updateView();Z.mouseOutDownPoint&&(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&1Math.abs(yb)&&(gb=yb),Math.abs(hb)>Math.abs(zb)&&(hb=zb));b+=gb;c+=hb;f=Fa(b,c,Z.imageZ,Z.imageR,"container");w.left=f.x+"px";w.top=f.y+"px";gb-=b-f.x;hb-=c-f.y;c=f.x-sa;b=f.y-ta;J&&fa&&(Wa||Z.mobileDevice||Math.abs(c)>Q/2||Math.abs(b)>N/2)&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display"); Wa&&0==Math.round(gb*a)/a&&0==Math.round(hb*a)/a&&(Wa=!1);Z.Navigator&&(a=m.calculateCurrentCenterCoordinates(f,Z.imageZ,Z.imageR),Z.Navigator.z658(a))}}else if(Z.mouseIsDown||null!==Wa||0==gb||0==hb)eb(!0),m.updateView();else if(f=Fa(b+yb,c+zb,Z.imageZ,Z.imageR,"container"),yb=f.x-b,zb=f.y-c,0!=yb||0!=zb)zc=Fb.x+yb,Ac=Fb.y+zb,Wa=!0}}function fd(a){a=Z.Utils.event(a);a.preventDefault();yc=Math.round(100*a.scale)/100}function gd(a){if(Z.mousePan){a=u(I,ib*yc);var b=Va(a);a!=Z.imageZ&&m.z633(b)}}var rc= null,sc=null,Gb=0;"undefined"!==typeof a&&null!==a&&(Gb=a);var qb;qb="undefined"!==typeof b&&null!==b?b:Z.imagePath;var m=this,Hb=[],ub=parseInt(Z.Utils.getResource("z90"),10),Gc=8*ub,Hc=4*ub,Vb=0,ya=parseInt(Z.Utils.getResource("z221"),10),za=parseInt(Z.Utils.getResource("z219"),10),Bc=parseFloat(Z.Utils.getResource("z218")),jd=Bc/2,Bb=parseInt(Z.Utils.getResource("z220"),10),Qc=1==Z.toolbarVisible?Z.toolbarH:0,Qb,J,Ta,ha,sb,O,w,gc,V,L,tb,hc,ba,ja,ka,ic,La,Ib,Jb;q(Gb);var Aa,ua=1,I=0,ia=0,fa=!1, Ba=0,jc=!1,R,ib,Ua,pa,wa=[],Ca=[],na=[],Da=[],Ea=[],Ab=[];tierTileOffsetsCount=[];tierTileOffsetChunks=[];tierTileOffsetLast=[];var rb=[];tierTileByteCountsCount=[];tierTileByteCountChunks=[];tierTileByteCountLast=[];var jb=[],qa=[],ra=[],Ja=[],Za=[],Pb=0,Ob=0,Lc=0,mc=0,nc=0,oc=0,qc=0,Rc,kc=0,lc=0,ac=0,Cb=0,Zb=0,Eb=0,Db=0,$b=0,kb=[],W=[],va=[],Xa=[],lb=[],Ya=[],Kb=null,bc=0,cd=parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYLIMIT"),10),Mc=parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYDELAY"), 10),Ka=[],ma=[],mb=[],Qa=[],bd=new Z.NetConnector,fc=parseInt(Z.Utils.getResource("z81"),10),kd=parseInt(Z.Utils.getResource("z78"),10),Sc=parseInt(Z.Utils.getResource("z80"),10),Rb=parseInt(Z.Utils.getResource("z77"),10),Ba=Rb,Tc=parseInt(Z.Utils.getResource("z79"),10),Xb=parseInt(Z.Utils.getResource("z76"),10),Wb=parseInt(Z.Utils.getResource("z75"),10),Ic=null,Jc=null,Kc=null,ld=parseFloat(Z.Utils.getResource("z173UNCONVERTED"),10),md=null!==Z.panBuffer?Z.panBuffer:parseFloat(Z.Utils.getResource("z173"), 10),Fc="unconverted"!=Z.tileSource?md:ld,Pc=parseFloat(Z.Utils.getResource("z74"),10),ad=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXBROWSER"),10),$c=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXFIREFOX"),10),Zc=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXIMAGESET"),10),Q,N,ec,Mb,da,ea,$a,ab,sa,ta,cb,db,vc,wc,Oa,Pa;Q=Z.viewerW;N=Z.viewerH;ec=Mb=0;N-=Qc;0==Z.toolbarPosition&&(Mb+=Qc);var G=null,Ia,xb,pb=null,yc=null,Ub=!1,hd=parseInt(Z.Utils.getResource("z122"),10),dc=Math.round(parseFloat(Z.Utils.getResource("z176"))* Z.panSpeed),Ga=0,Ha=0,gb=0,hb=0,yb=0,zb=0,Wa=null,zc=null,Ac=null,fb=null,xc=null,Tb=null,Fb=null,Lb=parseFloat(Z.Utils.getResource("z242"))*Z.zoomSpeed;Z.mobileDevice&&(Lb/=2);var Na=0,ob=null,Nc=0,uc=parseInt(Z.Utils.getResource("z238"),10),pc=parseFloat(Z.Utils.getResource("z112"))*Z.fadeInSpeed,Yb=null,nd=parseFloat(Z.Utils.getResource("z239")),Cc=parseFloat(Z.Utils.getResource("z240"));Z.mobileDevice&&(Cc/=2);var wb=null,Sb=0;if(!Z.fullScreenVisible&&!Z.fullPageVisible)var Dc,Uc,Vc,Wc,Xc,Ec, Yc;if(null!==Z.imagePath&&"null"!=Z.imagePath){if(1==Z.localUse&&"ZoomifyImageFile"==Z.tileSource){Z.Utils.showMessage(Z.Utils.getResource("z290"),!0);return}1==Z.localUse&&(Z.browser==Z.browsers.CHROME||Z.browser==Z.browsers.OPERA||Z.browser==Z.browsers.IE&&11==Z.browserVersion||Z.browser==Z.browsers.SAFARI&&7<=Z.browserVersion)&&Z.Utils.showMessage(Z.Utils.getResource("z288"),!0);if(null!==Z.imageW&&null!==Z.imageH&&null!==Z.sourceMagnification)"undefined"!==typeof m.getStatus?e(Z.imageW,Z.imageH, ya,za,null,null,null,null,Z.sourceMagnification,Z.focal,Z.quality):window.setTimeout(function(){e(Z.imageW,Z.imageH,ya,za,null,null,null,null,Z.sourceMagnification,Z.focal,Z.quality)},100);else if(null!==Z.imageProperties){var od=Z.Utils.xmlConvertTextToDoc(Z.imageProperties);y(od)}else if("unconverted"==Z.tileSource)r(qb);else if(-1==Z.imagePath.indexOf("zSlidePath")&&-1==Z.imagePath.indexOf("zAnimationPath")){var pd=new Z.NetConnector;x(qb,pd,Gb)}}this.setSizeAndPosition=function(a,b,c,d){A(a,b, c,d)};this.syncViewportResize=function(a,b,c,d,h,k,e){m.setSizeAndPosition(Z.viewerW,Z.viewerH,0,0);m.resizeViewport(a,b,c,d)};this.resizeViewport=function(a,b,c,d){m.validateXYZDefaults();m.setView(a,b,c,d)};this.loadImageProperties=function(a,b,c){x(a,b,c)};this.parseZIFHeader=function(a){n();if(73==a[0]&&73==a[1]&&43==a[2]&&0==a[3]&&8==a[4]&&0==a[5]&&0==a[6]&&0==a[7]&&16==a[8]&&0==a[9]&&0==a[10]&&0==a[11]&&0==a[12]&&0==a[13]&&0==a[14]&&0==a[15]){for(var b=Z.Utils.longValue(a,8),c=Z.Utils.longValue(a, b),d=1,h=null,k=null,t=null,B=null,r=null,ca=null,ca=2;0!=b;){for(h=0;hZ.maxZ&&(Z.fitZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fitZ=1));1Z.maxZ&&(Z.fillZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fillZ=1));null===Z.minZ||-1==Z.minZ?Z.minZ=Z.fitZ:0==Z.minZ&&(Z.minZ=Z.fillZ);if(null===Z.maxZ||-1==Z.maxZ)Z.maxZ= 1;null===Z.initialZ||-1==Z.initialZ?Z.initialZ=a:0==Z.initialZ&&(Z.initialZ=b);Z.initialZZ.maxZ&&(Z.initialZ=Z.maxZ)};this.getViewW=function(){return Q};this.getViewH=function(){return N};this.getDisplayW=function(){return da};this.getDisplayH=function(){return ea};this.getImagePath=function(){return qb};this.setImagePath=function(a){qb=a};this.getViewportID=function(){return Gb};this.getTierCount=function(){return ua};this.getTileW=function(){return ya};this.getTileH= function(){return za};this.getTierCurrent=function(){return I};this.getTierBackfill=function(){return ia};this.getTierBackfillDynamic=function(){return fa};this.getTierBackfillOversize=function(){return Ba};this.getTierScale=function(){return R};this.getX=function(){var a=parseFloat(w.left)-sa,b=m.getZoom();return rc-a/b};this.getY=function(){var a=parseFloat(w.top)-ta,b=m.getZoom();return sc-a/b};this.getZoom=function(){return u(I,R)};this.getRotation=function(){return Z.imageR};this.getTiersScaleUpMax= function(){return Bc};this.getTiersScaleDownMax=function(){return jd};this.getTilesCacheMax=function(){return Bb};this.getTierWs=function(){return wa.join(",")};this.getTierHs=function(){return Ca.join(", ")};this.getTierTileCounts=function(){return Ea.join(", ")};this.getTilesToLoad=function(){return Pb};this.getTilesLoadingNames=function(){return""==W.join(", ")?"Current view loading complete":W.join(", ")};this.getTilesToDraw=function(){return Eb};this.getConstrainPan=function(a){return Z.constrainPan}; this.setConstrainPan=function(a){Z.constrainPan=0!=a;Z.constrainPanStrict=2==a?!0:!1;Z.constrainPan&&m.toggleConstrainPan(!0)};this.getSmoothPan=function(){return Z.smoothPan};this.setSmoothPan=function(a){Z.smoothPan=a};this.getSmoothPanEasing=function(){return Z.smoothPanEasing};this.setSmoothPanEasing=function(a){Z.smoothPanEasing=a};this.getSmoothPanGlide=function(){return Z.smoothPanGlide};this.setSmoothPanGlide=function(a){Z.smoothPanGlide=a};this.setVisibility=function(a){a=a?"inline-block": "none";Qb&&!Ta&&(Ta=Qb.style);Ta&&(Ta.display=a);sb&&!w&&(w=sb.style);w&&(w.display=a)};this.z619=function(b){b||(T(Wb,ra),Ic=!0);(!Z.imageSet||a==Z.imageSetStart||b)&&ua>Tc&&(T(Xb,ra),Jc=!0,ua>Sc&&(T(Rb,ra),Kc=!0),m.setStatus("backfillPrecached",!0));ra.sort();ra=Z.Utils.arrayUnique(ra);jb=ra.slice(0);m.traceDebugValues("tilesBackfillToPrecache",null,jb.length);ga(ra,oa,"simple","image-backfill")};this.updateView=function(b){if("undefined"===typeof a||null===a)a=0;var c=Z.mouseIsDown||Z.buttonIsDown|| Z.keyIsDown||Z.mouseWheelIsDown,d=R!=ib||m.getZoom()!=Z.imageZ||Z.imageZ!=Z.priorZ,f=parseFloat(w.left)!=sa||parseFloat(w.top)!=ta||m.getX()!=Z.imageX||m.getY()!=Z.imageY,h=Z.fullViewPrior;if(d||f||h||"undefined"!==typeof b&&b&&(!c||Z.animation)){if(!Z.imageSet||!Z.Viewer.getStatus("ready")||a>Z.viewportCurrentID-1&&aZ.maxZ&&(Z.imageZ=Z.maxZ);h=Bc;for(c=ua;h/2>=Z.imageZ;)c--,h/=2;c=0>c-1?0:c-1;h=la(c,Z.imageZ);if(c!=I||h!=R)Z.useCanvas&&(ka.restore(),ka.save(),ka.scale(h,h)),I!=c&&(jc=!0),I=c,R=h;ib=R;if("unconverted"!=Z.tileSource){fa=!1;I>fc?(ia=I-kd,fa=!0):ia=I>Sc?Rb:I>Tc?Xb:Wb;tierBackfillScalePrior=Ua=la(ia,Z.imageZ);var c=wa[ia],h=Ca[ia],t=Z.imageX*Z.imageZ,B=Z.imageY*Z.imageZ;fa?(c=Pc,cb=da*c,db=ea*c,Oa=-(da/c),Pa=-(ea/c),vc=$a*c,wc=ab*c,V.width=cb,V.height=db,L.width=V.width+"px",L.height= V.height+"px",L.left=Oa+"px",L.top=Pa+"px",Z.useCanvas&&(J&&(pa=la(Ba,Z.imageZ),ha.restore(),ha.save(),ha.scale(pa,pa),0!=Z.imageR&&ha.rotate(Z.imageR*Math.PI/180)),tb.restore(),tb.translate(vc,wc),tb.save(),tb.scale(Ua,Ua))):(cb=c*Ua,db=h*Ua,Oa=$a-t,Pa=ab-B,V.width=c,V.height=h,Z.useCanvas&&(L.width=cb+"px",L.height=db+"px"),L.left=Oa+"px",L.top=Pa+"px");C(V,ia,qa,"simple",!1,"2. Updating view: changing tier - backfill")}!b&&0Z.browserVersion||0==Bb)a=Z.Utils.cacheProofPath(a);h=a}return h};this.getClickCoordsInImage=function(a,b,c){a=Z.Utils.event(a);var d=null;if(a){var h=a.type;if("undefined"===typeof c||null===c)"touchstart"==h||"touchend"==h||"touchcancel"==h?(touch=Z.Utils.getFirstTouch(a), "undefined"!==typeof touch&&(target=touch.target,c=new Z.Utils.Point(touch.pageX,touch.pageY))):(target=Z.Utils.target(a),relatedTarget=Z.Utils.relatedTarget(a),c=Z.Utils.getMousePosition(a));"undefined"!==typeof c&&null!==c&&(a=Sa(c.x,c.y),d=bb(a.x,a.y,b))}return d};this.getClickZoomCoords3D=function(a,b,c,d,h){var k=parseFloat(Z.Utils.getResource("z93TIERSKIPTHRESHOLD"));b=Sa(b.x,b.y);b=bb(b.x,b.y,Z.imageZ);var e=u(c,d);a=a.altKey;h?a?e=Z.fitZ:(h=la(c,Z.fitZ),d-h1+k?e=u(c,1):0c&&(c+=360);if("undefined"===typeof b||null===b)b=m.getZoom();var d=(a.x-sa)/b;a=(a.y-ta)/b;var h,k;switch(c){case 0:h=Z.imageX-d;k=Z.imageY-a;break;case 90:h=Z.imageX-a;k= Z.imageY+d;break;case 180:h=Z.imageX+d;k=Z.imageY+a;break;case 270:h=Z.imageX+a,k=Z.imageY-d}return new Z.Utils.Point(h,k)};this.z542=function(a,b){if("undefined"===typeof a||null===a)a=I;if("undefined"===typeof b||null===b)b=!1;return new p(m.z541(b),a)};this.z541=function(a){var b=parseFloat(w.left)-sa,c=parseFloat(w.top)-ta;if(Z.useCanvas)var d=parseFloat(w.width)/O.width,b=b/d,c=c/d;d=m.getZoom();0!=b&&(b/=d);0!=c&&(c/=d);var b=Z.imageX-b,c=Z.imageY-c,h,k,e;a?(a=-(Q/2),h=Q/2,k=-(N/2),e=N/2):(a= -(da/2),h=da/2,k=-(ea/2),e=ea/2);return new X(b,c,a,h,k,e,d)};this.HotspotsAllBoundingBoxInPixels=function(){for(var a=new HotspotContext,b=Z.imageCenterX,c=Z.imageCenterX,d=Z.imageCenterY,h=Z.imageCenterY,k=0,e=hotspots.length;kc&&(c=m);rh&&(h=t)}a=parseInt(Z.Utils.getResource("DEFAULT_SAVEIMAGELABELMARGIN"),10);b-=a;d-=a;c+=a;h+=a;this.l=b;this.r=c;this.t=d;this.b= h;this.x=b+(c-b)/2;this.y=d+(h-d)/2};this.z468=function(a){var b=Z.imageW/Z.imageH>Q/N?Q/Z.imageW:N/Z.imageH;if(90==a||270==a)b=Z.imageW/Z.imageH>Q/N?Q/Z.imageH:N/Z.imageW;return b};this.calculateZoomToFill=function(a){var b=Z.imageW/Z.imageH>Q/N?N/Z.imageH:Q/Z.imageW;if(90==a||270==a)b=Z.imageW/Z.imageH>Q/N?N/Z.imageW:Q/Z.imageH;return b};this.calculateZoomForResize=function(a,b,c,d,h){var k=a,e=Z.imageW*a,t=Z.imageH*a;b=d/b;c=h/c;ed&&t<=h?k=a*b:e<=d&& t>h?k=a*c:e>d&&t>h&&(d=1,1<=b&&1<=c?d=b>c?b:c:1>=b&&1>=c&&(d=bZ.maxZ&&(k=Z.maxZ);return k};this.z482=function(a,b){return u(a,b)};this.syncViewportToNavigator=function(a){var b=Z.imageR;0>b&&(b+=360);var c=Fa(a.x,a.y,Z.imageZ,b,"image");a=Z.imageY;var d=c.y,c=dX=Z.imageX-c.x;a=dY=a-d;0!=b&&(90==b?(c=-dY,a=dX):180==b?(c=-dX,a=-dY):270==b&&(c=dY,a=-dX));b=c*Z.imageZ;a*=Z.imageZ;d=a+ta;w.left=b+sa+"px";w.top=d+"px";J&&fa&&(Z.mobileDevice||Math.abs(b)>Q/2||Math.abs(a)> N/2)&&C(J,Ba,qa,"simple",!1,"Updating backfill oversize display")};this.getStatus=function(a){a=Z.Utils.arrayIndexOfObjectValue(Hb,"state",a);return-1==a?!1:Hb[a].status};this.setStatus=function(a,b){var c=!1,d=Z.Utils.arrayIndexOfObjectValue(Hb,"state",a);-1==d?(c=b,Hb[Hb.length]={state:a,status:b}):(!Hb[d].status&&b&&(c=!0),Hb[d].status=b);c&&(Z.Utils.validateCallback(a+"Viewport"),Z.Viewer.validateViewerStatus(a))};this.traceDebugValues=function(a,b,c,d){c="undefined"!==typeof c&&null!==c?c:null; b=null!==b?b:"";switch(a){case "tilesToDisplay":kc=c;Zb=Cb=ac=lc=0;Eb=c;Db=0;tilesTimeStart=(new Date).getTime();$b=0;window.clearTimeout(Kb);Kb=null;Kb=window.setTimeout(Ma,Mc);break;case "tilesInCache":lc=c;break;case "z581-image-display":ac+=1;break;case "onTileLoad":Cb+=1;Db=((new Date).getTime()-c)/1E3;$b=Cb/Db;break;case "z507":a=Z.Utils.arrayIndexOf(kb,b);-1!=a&&(kb.splice(a,1),Zb+=1,--Eb);break;case "tilesBackfillToPrecache":Lc=c;break;case "onTileBackfillPrecache":mc+=1;break;case "tilesBackfillToDisplay":Rc= nc=c;break;case "z599":oc+=1;break;case "displayBackfillTile":a=Z.Utils.arrayIndexOf(jb,b),-1!=a&&(jb.splice(a,1),qc+=1,--Rc)}};this.updateProgress=function(a,b){var c=Z,d;0==a&&0==b?(Z.Utils.validateCallback("loadingTilesComplete"),Z.Utils.validateCallback("loadingTilesCompleteGetLabelIDs"),d=void 0):(d=Math.round(100-b/a*100),d=Math.round(d/10));c.updateViewPercent=d;Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&Z.Toolbar.updateProgress(a,b)};this.setDrawingColor=function(a,b){var c=Z.annotationFileShared? "0":Gb.toString(),d;switch(a){case "buttonColor0"+c:d="#FFFFFF";break;case "buttonColor1"+c:d="#FFFF00";break;case "buttonColor2"+c:d="#00FFFF";break;case "buttonColor3"+c:d="#800080";break;case "buttonColor4"+c:d="#008000";break;case "buttonColor5"+c:d="#FF0000";break;case "buttonColor6"+c:d="#0000FF";break;case "buttonColor7"+c:d="#000000"}captionTextColor=ctrlPtStrokeColor=lineStrokeColor=d;c="#FFFFFF"==d?"#000000":"#FFFFFF";b||null===hotspotCurrentID||1!=Z.editMode||"addLabel"!=Z.editing&&"editLabel"!= Z.editing||(m.modifyHotspot(hotspotCurrentID,"textColor",d,!0,!0),m.modifyHotspot(hotspotCurrentID,"backColor",c,!0,!0),m.modifyHotspot(hotspotCurrentID,"lineColor",d,!1,!0))};this.setView=function(a,b,c,d,h,k){Nb(a,b,c,d,h,k)};this.zoom=function(a){if("stop"!=a||"stop"!=Z.zooming){switch(a){case "out":0<=Na&&(Na-=Lb);break;case "in":0>=Na&&(Na+=Lb);break;case "stop":Na=0}Z.zooming=0==Na?"stop":0=Ga&&(Ga+=dc);break;case "up":0>=Ha&&(Ha+=dc);break;case "down":0<=Ha&&(Ha-=dc);break;case "right":0<=Ga&&(Ga-=dc);break;case "horizontalStop":Ga=0;break;case "verticalStop":Ha=0;break;case "stop":Ha=Ga=0}Z.panningX=0==Ga?"stop":0c&&0!=c%1?c=1:1c&&0!=100*c%1&&(c=1);b=Fa(a,b,c,d,"image");a=b.x;b=b.y;c=Va(c);if(Math.round(a)!=Math.round(Z.imageX)||Math.round(b)!=Math.round(Z.imageY)||Math.round(1E5*c)!=Math.round(1E5*Z.imageZ)||Math.round(d)!=Math.round(Z.imageR))Z.interactivityOff=!0,Sb=0,Oc(a,b,c,d,h,k,e)}};this.zoomAndPanAllStop= function(a,b){Z.interactivityOff||(wb&&wb&&(window.clearTimeout(wb),wb=null),Z.tourPlaying&&b&&(m.tourStop(),a=!1),Z.slideshowPlaying&&b&&(m.slideshowStop(),a=!1),Z.smoothPan&&null!==fb&&(Z.mouseIsDown||eb(!0),a=!0),a||m.updateView())};this.syncViewportRelated=function(a,b,c,d,h,k){if("undefined"==typeof c||c)Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&(a=m.getZoom(),Z.Toolbar.syncSliderToViewportZoom(a)),Z.Utils.validateCallback("viewZoomingGetCurrentZoom");("undefined"==typeof d||d)&&Z.Navigator&& Z.Navigator.getInitialized()&&Z.Navigator.syncToViewport()};this.z633=function(a,b){K(a,b)&&m.syncViewportRelated()};this.reset=function(a){a?m.zoomAndPanToView(Z.priorX,Z.priorY,Z.priorZ,Z.priorR):m.zoomAndPanToView(Z.initialX,Z.initialY,Z.initialZ,Z.initialR);cc(!0)};this.toggleConstrainPan=function(a){Z.constrainPan="undefined"!==typeof a&&null!==a?a:!Z.constrainPan;if(Z.constrainPan){a=parseFloat(ja.left);var b=parseFloat(ja.top);a=Fa(a,b,Z.imageZ,Z.imageR,"container");w.left=a.x+"px";w.top=a.y+ "px";m.updateView()}};this.toggleSmoothPan=function(){eb();Z.smoothPan=!Z.smoothPan};this.toggleBackfill=function(){var a=document.getElementById("viewportBackfillDisplay"+Gb.toString());a&&(a=a.style,a.display="none"==a.display?"inline-block":"none")};this.toggleDisplay=function(){var a=document.getElementById("viewportDisplay"+Gb.toString());a&&(ja=a.style,ja.display="none"==ja.display?"inline-block":"none")};this.toggleFullViewMode=function(a,b){Z.ToolbarDisplay&&Z.Toolbar.show(!1);var c=null, d=null;Z.fullViewPrior=Z.fullView;Z.fullView="undefined"!==typeof a&&null!==a?a:!Z.fullView;var h=document.body.style,k=document.documentElement.style,e=Z.ViewerDisplay.style,d=Z.Utils.getElementStyle(Z.pageContainer);Z.fullView?(Uc=h.width,Vc=h.height,Wc=h.overflow,Xc=k.overflow,Ec=Z.Utils.stringValidate(d.backgroundColor)&&"transparent"!=d.backgroundColor?d.backgroundColor:Z.Utils.stringValidate(h.backgroundColor)&&"transparent"!=h.backgroundColor?h.backgroundColor:Z.Utils.getResource("z120"),Yc= e.zIndex,Z.fullScreenSupported&&!Z.fullPageVisible?(Dc=!0,Z.Utils.fullScreenView(Z.ViewerDisplay,!0),d=Z.Utils.getScreenSize()):(d=Z.Utils.getWindowSize(),Z.mobileDevice?(h.width=d.x,h.height=d.y):(h.width="100%",h.height="100%")),c=d.x,d=d.y,h.overflow="hidden",k.overflow="hidden",e.backgroundColor=Ec,e.position="fixed",e.zIndex="99999999"):(h.overflow=Wc,k.overflow=Xc,e.backgroundColor=Ec,e.position="relative",e.zIndex=Yc,Z.fullScreenSupported&&!Z.fullPageVisible&&Z.Utils.fullScreenView(Z.ViewerDisplay, !1,b),h.width=Uc,h.height=Vc,c=parseFloat(d.width),d=parseFloat(d.height),isNaN(c)&&(c=Z.ViewerDisplay.clientWidth),isNaN(d)&&(d=Z.ViewerDisplay.clientHeight));Z.autoResize||(Z.initialFullPage&&m.setSizeAndPosition(c,d),h=Z.viewportCurrent.calculateZoomForResize(Z.viewportCurrent.getZoom(),Z.viewerW,Z.viewerH,c,d),Z.Viewer.resizeViewer(c,d,h));c=Z.fullView;h=document.getElementById("buttonFullView");k=document.getElementById("buttonFullViewExit");h&&k&&(h.style.display=c?"none":"inline-block",k.style.display= c?"inline-block":"none");Z.fullViewPrior=!1};this.fullScreenEscapeHandler=function(a){Dc?Dc=!1:m.toggleFullViewMode(!1,!0)};this.mouseWheelHandler=function(a){Z.mouseWheelIsDown=!0;Z.mouseWheelCompleteTimer&&window.clearTimeout(Z.mouseWheelCompleteTimer);Z.mouseWheelCompleteTimer=window.setTimeout(Z.Viewer.z586,Z.mouseWheelCompleteDuration);if("zoom"==Z.sliderFocus){var b=m.z482(I,R*(1+(0a?"out":"stop",m.z633(constrainedZ))}}}; Z.ZoomifyToolbar=function(a){function b(){var a=parseFloat(Z.Utils.getResource("UI_TOOLBARINTERNALBACKGROUNDALPHA")),b=Z.Utils.getResource("UI_TOOLBARINTERNALBACKGROUNDCOLOR"),c=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONUPCOLOR"),d=Z.viewerW/2-50,e=Z.viewerH-25-10,g=Math.round(25),n=Math.round(25/1.5),H=(100-3*g)/4,v=(25-n)/2;Z.ToolbarDisplay=Z.Utils.createContainerElement("div","ToolbarDisplay","inline-block","absolute","visible","100px","25px",d+"px",e+"px","none","0px","transparent none","0px", "0px","normal");tbS=Z.ToolbarDisplay.style;d=Z.Utils.createContainerElement("div","toolbarBackgroundInternal","inline-block","absolute","visible","100px","25px","0px","0px","solid","1px",b,"0px","0px","normal");Z.Utils.setOpacity(d,a,b);Z.ToolbarDisplay.appendChild(d);a=Z.Utils.createContainerElement("div","buttonZoomInInternal","inline-block","absolute","visible",g+"px",n+"px",H+1+"px",v+1+"px","none","0px",c,"0px","0px","normal");Z.Utils.setOpacity(a,.4,b);d=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONZOOMINTEXT"); d=document.createTextNode(d);a.appendChild(d);Z.ToolbarDisplay.appendChild(a);C=a.style;Z.Utils.setTextNodeStyle(d,"black","verdana","15px","none","normal","normal","normal","bold","1em","center","none");Z.Utils.disableTextInteraction(d);d=Z.Utils.createContainerElement("div","buttonResetInternal","inline-block","absolute","visible",g+"px",n+"px",2*H+g+1+"px",v+1+"px","none","0px",c,"0px","0px","normal");Z.Utils.setOpacity(d,.4,b);e=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONRESETTEXT");e=document.createTextNode(e); d.appendChild(e);Z.ToolbarDisplay.appendChild(d);U=d.style;Z.Utils.setTextNodeStyle(e,"blue","verdana","15px","none","normal","normal","normal","bold","1em","center","none");Z.Utils.disableTextInteraction(e);c=Z.Utils.createContainerElement("div","buttonZoomOutInternal","inline-block","absolute","visible",g+"px",n+"px",3*H+2*g+1+"px",v+1+"px","none","0px",c,"0px","0px","normal");Z.Utils.setOpacity(c,.4,b);b=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONZOOMOUTTEXT");b=document.createTextNode(b); c.appendChild(b);Z.ToolbarDisplay.appendChild(c);r=c.style;Z.Utils.setTextNodeStyle(b,"black","verdana","15px","none","normal","normal","normal","bold","1em","center","none");Z.Utils.disableTextInteraction(b);Z.Utils.addEventListener(a,"mouseover",q);Z.Utils.addEventListener(a,"mousedown",q);Z.Utils.addEventListener(a,"mouseup",q);Z.Utils.addEventListener(a,"mouseout",q);Z.Utils.addEventListener(d,"mouseover",q);Z.Utils.addEventListener(d,"mousedown",q);Z.Utils.addEventListener(d,"mouseup",q);Z.Utils.addEventListener(d, "mouseout",q);Z.Utils.addEventListener(c,"mouseover",q);Z.Utils.addEventListener(c,"mousedown",q);Z.Utils.addEventListener(c,"mouseup",q);Z.Utils.addEventListener(c,"mouseout",q);b=parseInt(Z.Utils.getResource("z230"),10);tbS.zIndex=(b+1).toString();Z.ViewerDisplay.appendChild(Z.ToolbarDisplay);Z.Utils.addEventListener(Z.ToolbarDisplay,"mouseover",Z.Utils.stopPropagation);T||(T=!0,Z.Utils.validateCallback("toolbarInitialized"),Z.Viewer.validateViewerReady("toolbarInitialized"))}function c(){window.clearInterval(progressInterval); progressInterval=null;var a=document.getElementById("progressTextBoxCenteredDiv");a&&(a=a.firstChild)&&(a.nodeValue="")}function d(a){tbS&&(tbS.display=a?"inline-block":"none")}function e(a){Z.ToolbarMinimized=a;if(tbS){var b=document.getElementById("buttonContainer"),c=document.getElementById("toolbarBackground"),d=document.getElementById("buttonMinimize"),e=document.getElementById("buttonExpand"),g=document.getElementById("logoDivider"),r=0;e&&!overrideLogo&&(r=parseFloat(e.style.left)+parseFloat(e.style.width)+ 4);var n=Z.toolbarCurrentW;a?(b&&(b.style.display="none"),d&&e&&!overrideLogo&&(g&&(g.style.display="none"),d.style.display="none",e.style.display="inline-block"),tbS.width=r+"px",c&&(c.style.width=r+"px")):(b&&(b.style.display="inline-block"),d&&e&&!overrideLogo&&(g&&(g.style.display="inline-block"),d.style.display="inline-block",e.style.display="none"),tbS.width=n+"px",c&&(c.style.width=n+"px"))}}function g(a){"undefined"!==typeof btsZ&&(buttonSliderZoomDown=!0,a=Z.Utils.getMousePosition(a),btsZ.mouseXPrior= a.x,btsZ.mouseYPrior=a.y)}function n(){if("undefined"!==typeof trszS&&"undefined"!==typeof btsZ&&"undefined"!==typeof btszS){var b=parseFloat(trszS.left),c=parseFloat(trszS.left)+parseFloat(trszS.width)-parseFloat(btszS.width),d=parseFloat(btszS.left)+(sliderIntervalMousePtZoom.x-btsZ.mouseXPrior);dc?d=c:btsZ.mouseXPrior=sliderIntervalMousePtZoom.x;btszS.left=d+"px";b=Z.minZ+(d-b)/(c-b)*(Z.maxZ-Z.minZ);c=b-a.getZoom();Z.zooming=0c?"out":"stop";a.z633(b)}}function q(b){if(b=Z.Utils.event(b)){var c= b.type,d=Z.Utils.target(b);if(d){C.background=ga;U.background=ga;r.background=ga;var e=d.id;b=b.altKey;switch(c){case "mouseover":d.style.background=E;break;case "mousedown":d.style.background=H;"buttonZoomInInternal"==e?b||a.zoom("in"):"buttonZoomOutInternal"==e&&(b||a.zoom("out"));break;case "mouseup":d.style.background=E,a.zoom("stop"),"buttonResetInternal"==e&&a.reset(b)}}}}function v(b){if(b=Z.Utils.event(b)){var c=b.type,d=Z.Utils.target(b);if(d){var e=d.parentNode;if(e){var r=e;tbID=e.id}}d= Z.Utils.relatedTarget(b)}"mousedown"==c&&a&&"buttonAudioOn"!=tbID&&"buttonAudioMuted"!=tbID&&a.zoomAndPanAllStop(!1,!0);if((!Z.interactivityOff||"mousedown"!=c&&"mouseup"!=c||"buttonRotateClockwise"==tbID||"buttonRotateCounterwise"==tbID)&&(!d||"[object HTMLSelectElement]"!=d&&"[object HTMLOptionElement]"!=d)&&!Z.Utils.isRightMouseButton(b)){Z.touchSupport&&b.preventDefault();if(tbID&&-1!=tbID.indexOf("viewportContainer")||buttonSliderZoomDown||buttonSliderImageSetDown)buttonSliderZoomDown?e=document.getElementById("buttonSliderZoom"): buttonSliderImageSetDown&&(e=document.getElementById("buttonSliderImageSet")),e&&(tbID=e.id);var d=e,q=c;if(-1!=d.id.indexOf("button")&&-1==d.id.indexOf("buttonContainer")){var H=d.firstChild,ga=d.childNodes[1],E=d.childNodes[2];if(H&&ga&&E)if(H=H.style,ga=ga.style,E=E.style,H.visibility=ga.visibility=E.visibility="hidden","mouseover"==q&&"buttonSliderZoom"==d.id&&buttonSliderZoomDown)E.visibility="visible";else if("mouseover"==q&&"buttonSliderImageSet"==d.id&&buttonSliderImageSetDown)E.visibility= "visible";else if("mouseover"==q||"mouseup"==q)ga.visibility="visible";else if("mousedown"==q||"mousemove"==q||"touchstart"==q||"MSPointerDown"==q)E.visibility="visible";else if("mouseout"==q||"touchend"==q||"touchcancel"==q||"MSPointerUp"==q)H.visibility="visible"}if(tbID&&"buttonBackground"!=tbID&&c)switch(c){case "mouseover":if("trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID)if(Z.Utils.removeEventListener(e.childNodes[0],"mouseover",v),Z.Utils.addEventListener(e.childNodes[1],"mousedown", v),Z.Utils.addEventListener(e.childNodes[1],"mouseout",v),buttonSliderZoomDown&&r&&Z.Utils.addEventListener(r.childNodes[0],"mouseup",v),buttonSliderImageSetDown&&r&&Z.Utils.addEventListener(r.childNodes[0],"mouseup",v),"buttonZoomIn"==tbID||"buttonSliderZoom"==tbID||"buttonZoomOut"==tbID)Z.sliderFocus="zoom";else{if("buttonImageSetPrior"==tbID||"buttonSliderImageSet"==tbID||"buttonImageSetNext"==tbID)Z.sliderFocus="imageSet"}else Z.Utils.addEventListener(e.childNodes[0],"mouseout",v),Z.sliderFocus= "trackSliderImageSet"==tbID?"imageSet":"zoom";break;case "mousedown":Z.buttonIsDown=!0;!Z.fullView&&document.activeElement&&document.activeElement.blur();"trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID&&(Z.Utils.removeEventListener(e.childNodes[1],"mousedown",v),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",v),Z.Utils.addEventListener(e.childNodes[2],"mouseup",v),Z.Utils.addEventListener(e.childNodes[2],"mouseout",v),"buttonSliderZoom"==tbID&&(g(b),x(b),Z.Utils.addEventListener(document, "mousemove",x),sliderIntervalZoom||(sliderIntervalZoom=window.setInterval(n,SLIDERTESTDURATION_ZOOM)),Z.Utils.addEventListener(document,"mouseup",v)),"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z650ImageSet(b),Z.Utils.addEventListener(document,"mousemove",z650ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet,SLIDERTESTDURATION_IMAGESET)),Z.Utils.addEventListener(document,"mouseup",v)));a&&A(b,tbID);break;case "mouseup":Z.buttonIsDown=!1;Z.Utils.removeEventListener(e.childNodes[2], "mouseup",v);Z.Utils.removeEventListener(e.childNodes[2],"mouseout",v);Z.Utils.addEventListener(e.childNodes[1],"mousedown",v);Z.Utils.addEventListener(e.childNodes[1],"mouseout",v);buttonSliderZoomDown&&r&&Z.Utils.removeEventListener(r.childNodes[0],"mouseup",v);buttonSliderImageSetDown&&r&&Z.Utils.removeEventListener(r.childNodes[0],"mouseup",v);a&&A(b,tbID);break;case "mouseout":if("trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID){if(Z.Utils.removeEventListener(e.childNodes[1],"mousedown", v),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",v),Z.Utils.addEventListener(e.childNodes[0],"mouseover",v),a&&A(b,tbID),"buttonImageSetPrior"==tbID||"buttonSliderImageSet"==tbID||"trackSliderImageSet"==tbID||"buttonImageSetNext"==tbID||"buttonZoomIn"==tbID||"buttonSliderZoom"==tbID||"buttonZoomOut"==tbID)Z.sliderFocus=2==Z.mouseWheel?"imageSet":"zoom"}else Z.Utils.removeEventListener(e.childNodes[0],"mouseout",v),Z.sliderFocus=2==Z.mouseWheel?"imageSet":"zoom";break;case "touchstart":"buttonSliderZoom"== tbID&&(g(b),y(b),Z.Utils.addEventListener(document,"touchmove",y),sliderIntervalZoom||(sliderIntervalZoom=window.setInterval(n,SLIDERTESTDURATION_ZOOM)));"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z654ImageSet(b),Z.Utils.addEventListener(document,"touchmove",z654ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet,SLIDERTESTDURATION_IMAGESET)));Z.Utils.addEventListener(e,"touchend",v);Z.Utils.addEventListener(e,"touchcancel",v);a&&A(b,tbID);break;case "touchend":Z.Utils.addEventListener(e, "touchstart",v);a&&A(b,tbID);break;case "touchcancel":Z.Utils.addEventListener(e,"touchstart",v);a&&A(b,tbID);break;case "MSPointerDown":"buttonSliderZoom"==tbID&&(g(b),y(b),Z.Utils.addEventListener(document,"MSPointerMove",y),sliderIntervalZoom||(sliderIntervalZoom=window.setInterval(n,SLIDERTESTDURATION_ZOOM)));"buttonSliderImageSet"==tbID&&(z652ImageSet(b),z654ImageSet(b),Z.Utils.addEventListener(document,"MSPointerMove",z654ImageSet),sliderIntervalImageSet||(sliderIntervalImageSet=window.setInterval(sliderSlideImageSet, SLIDERTESTDURATION_IMAGESET)));Z.Utils.addEventListener(e,"MSPointerUp",v);a&&A(b,tbID);break;case "MSPointerUp":Z.Utils.addEventListener(e,"MSPointerDown",v),a&&A(b,tbID)}}}function A(b,c){var d=b.type,e=Z.annotationFileShared?"0":aa;if("mousedown"==d||"touchstart"==d){var g=b.altKey,d=document.activeElement.id;!Z.Utils.stringValidate(d)||d!="poiNameTextElement"+aa&&d!="labelNameTextElement"+aa&&"captionTextElement"!=d&&"commentTextElement"!=d&&"tooltipTextElement"!=d&&"clickURLTextElement"!=d&& d!="noteNameTextElement"+aa&&d!="noteTextElement"+aa||document.getElementById(d).blur();switch(c){case "buttonMinimize":D.minimize(!0);Z.Navigator&&Z.Navigator.setVisibility(!1);break;case "buttonExpand":D.minimize(!1);Z.Navigator&&Z.Navigator.setVisibility(!0);break;case "buttonZoomOut":g||a.zoom("out");break;case "trackSliderZoom":"undefined"!==typeof trsZ&&"undefined"!==typeof trszS&&(g=Z.Utils.getElementPosition(trsZ),g=Z.Utils.getMousePosition(b).x-g.x,d=parseFloat(trszS.width),g=Z.minZ+(g-0)/ (d-0)*(Z.maxZ-Z.minZ),gZ.maxZ-.1&&(g=Z.maxZ),d=g-a.getZoom(),Z.zooming=0d?"out":"stop",a.z633(g),Z.zooming="stop",a.updateView());break;case "buttonZoomIn":g||a.zoom("in");break;case "buttonPanLeft":a.pan("left");break;case "buttonPanUp":a.pan("up");break;case "buttonPanDown":a.pan("down");break;case "buttonPanRight":a.pan("right");break;case "buttonReset":a.reset(g);break;case "buttonHelp":Z.Utils.showHelp(Z.Utils.getResource("z32"))}}else if("mouseup"==d||"touchend"== d||"touchcancel"==d)if("buttonSliderZoom"==c||buttonSliderZoomDown){sliderIntervalZoom&&(window.clearInterval(sliderIntervalZoom),sliderIntervalZoom=null);buttonSliderZoomDown&&(Z.Utils.removeEventListener(document,"mousemove",x),Z.Utils.removeEventListener(document,"mouseup",v),Z.Utils.removeEventListener(document,"touchmove",y));buttonSliderImageSetDown&&(Z.Utils.removeEventListener(document,"mousemove",z650ImageSet),Z.Utils.removeEventListener(document,"mouseup",v),Z.Utils.removeEventListener(document, "touchmove",z654ImageSet));g=Z.ToolbarDisplay.childNodes;d=0;for(e=g.length;dZ.toolbarVisible&&!Z.mobileDevice||8==Z.toolbarVisible||Z.toolbarInternal?d(a):e(!a)};this.setVisibility=function(a){d(a)};this.minimize=function(a){e(a)};this.showProgress=function(){var a=document.getElementById("progressTextBox");a&&(a=a.style)&&(a.display="inline-block")};this.hideProgress=function(){var a=document.getElementById("progressTextBox");a&&(a=a.style)&&(a.display="none")};this.updateProgress=function(a,b){if(Z.progressVisible){progressInterval&& window.clearInterval(progressInterval);var d,e=document.getElementById("progressTextBoxCenteredDiv");e&&(e=e.firstChild)&&(0==a||0==b?(e.nodeValue="llllllllll",progressInterval=window.setInterval(c,parseInt(Z.Utils.getResource("z182")),10)):(d=Math.round(100-b/a*100),d=Math.round(d/10),e.nodeValue=Z.Utils.stringMultiply("l",d)))}};this.parseSkinXML=function(a){Z.skinMode=a.getElementsByTagName("SETUP")[0].attributes.getNamedItem("SKINMODE").nodeValue;var b,c;1==Z.skinMode||0==Z.skinMode&&!Z.mobileDevice? (b=a.getElementsByTagName("SETUP")[0].attributes.getNamedItem("FOLDERSTANDARD").nodeValue,c="SIZESSTANDARD"):(b=a.getElementsByTagName("SETUP")[0].attributes.getNamedItem("FOLDERLARGE").nodeValue,c="SIZESLARGE");var d=a.getElementsByTagName("SETUP")[0].attributes.getNamedItem("PROGRESSCOLOR");"undefined"!==typeof d&&null!==d&&(progressTextColor=a.getElementsByTagName("SETUP")[0].attributes.getNamedItem("PROGRESSCOLOR").nodeValue);d=[];d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("TOOLBARW").nodeValue); d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("TOOLBARH").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("LOGOW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("LOGOH").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("DIVIDERW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("DIVIDERH").nodeValue);d[d.length]= parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("BUTTONW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("BUTTONH").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("BUTTONSPAN").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("SLIDERBUTTONW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("SLIDERBUTTONH").nodeValue);d[d.length]= parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("SLIDERTRACKW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("SLIDERTRACKH").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("SLIDERSPAN").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("PROGRESSW").nodeValue);d[d.length]=parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("PROGRESSH").nodeValue);d[d.length]= parseFloat(a.getElementsByTagName(c)[0].attributes.getNamedItem("PROGRESSFONTSIZE").nodeValue);var e,g,r;c="edit"==Z.editMode?161:"markup"==Z.editMode?152:Z.imageFiltersVisible?100:Z.screensaver||Z.tourPath||Z.slidePath||Z.imageSetPath?77:Z.rotationVisible?58:Z.measureVisible?51:0a&&(overrideSliderZoom=!0,eb-A>a&&(overrideProgress=!0,eb-A-c>a&&(overrideLogo=!0,eb-A-c-Y>a&&(overrideReset=!0,eb-A-c-Y-aa>a&& (overridePan=!0,K-=S),K-=aa)),c=0),K-=A);S=(a-K)/2-20+3;if(Y=document.getElementById("toolbarBackground"))Y.style.width=a+"px",Y.style.height=b+"px",Y.firstChild.style.width=a+"px",Y.firstChild.style.height=b+"px";if(Y=document.getElementById("buttonContainer"))Y.style.width=K+40+"px",Y.style.height=b+"px",Y.style.left=S+"px";if(K=document.getElementById("buttonBackground"))K.style.width=a+"px",Z.Utils.graphicSize(K,parseFloat(Y.style.width),parseFloat(Y.style.height)),K.style.left="0px";if(K=document.getElementById("toolbarLogo"))if(S= K.style)if(overrideLogo)S.display="none";else if(S.display="inline-block",Z.Utils.graphicSize(K,e,g),S.left=u+"px",S.top=C+"px",u+=e+2,e=document.getElementById("logoDivider"))Z.Utils.graphicSize(e,r,n),e=e.style,e.left=u+"px",e.top=x+"px";0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&(e=document.getElementById("buttonMinimize"),g=document.getElementById("buttonExpand"),e&&g&&(C=e.style,K=g.style,C&&K&&(overrideLogo?(C.display="none",K.display="none"):(C.display="inline-block",K.display="inline-block", Z.Utils.buttonSize(e,q,H),Z.Utils.buttonSize(g,q,H),C.left=u+Nb+"px",C.top=B+"px",K.left=u+U+"px",K.top=B+"px"))));u=20;if(B=document.getElementById("buttonZoomOut"))Z.Utils.buttonSize(B,q,H),B=B.style,B.left=u+"px",B.top=D+"px",u+=E;trsZ=document.getElementById("trackSliderZoom");btsZ=document.getElementById("buttonSliderZoom");trsZ&&btsZ&&(trszS=trsZ.style,btszS=btsZ.style,trszS&&btszS&&(overrideSliderZoom?(trszS.display="none",btszS.display="none"):(trszS.display="inline-block",btszS.display="inline-block", Z.Utils.graphicSize(trsZ,ga,y),trszS.left=u-2+"px",trszS.top=Ma+"px",Z.Utils.buttonSize(btsZ,p,v),btszS.left=parseFloat(trszS.left)+"px",btszS.top=cc+"px",u+=A)));if(p=document.getElementById("buttonZoomIn"))Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px",p.top=D+"px",u+=E+1;if(!overridePan&&(p=document.getElementById("panDivider"))){Z.Utils.graphicSize(p,r,n);p=p.style;p.left=u+"px";p.top=x+"px";u+=T;if(p=document.getElementById("buttonPanLeft"))Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px", p.top=D+"px",u+=E;if(p=document.getElementById("buttonPanUp"))Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px",p.top=D+"px",u+=E;if(p=document.getElementById("buttonPanDown"))Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px",p.top=D+"px",u+=E;if(p=document.getElementById("buttonPanRight"))Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px",p.top=D+"px",u+=E}!overrideReset&&(p=document.getElementById("buttonReset"))&&(Z.Utils.buttonSize(p,q,H),p=p.style,p.left=u+"px",p.top=D+"px",u+=E+1);if(p=document.getElementById("fullViewDivider"))Z.Utils.graphicSize(p, r,n),r=p.style,r.left=u+"px",r.top=x+"px",u+=T;if(x=document.getElementById("buttonFullViewExit"))Z.Utils.buttonSize(x,q,H),x=x.style,x.left=u+"px",x.top=D+"px",x.display=Z.fullView?"inline-block":"none";if(x=document.getElementById("buttonFullView"))Z.Utils.buttonSize(x,q,H),x=x.style,x.left=u+"px",x.top=D+"px",u+=E+1,x.display=Z.fullView?"none":"inline-block";if(1==Z.helpVisible||3==Z.helpVisible)if(E=document.getElementById("buttonHelp"))Z.Utils.buttonSize(E,q,H),q=E.style,q.left=u+"px",q.top= D+"px";if(u=document.getElementById("progressTextBox"))if(u=u.style)overrideProgress?u.display="none":(u.display="inline-block",u.width=c+"px",u.height=d+"px",u.left=a-parseFloat(Y.style.left)-parseFloat(u.width)+"px",u.top=(b-parseFloat(u.height))/2+"px")};this.syncSliderToViewportZoom=function(a){if("undefined"!==typeof trszS&&"undefined"!==typeof btszS){a=(a-Z.minZ)/(Z.maxZ-Z.minZ);var b=parseFloat(trszS.left),c=parseFloat(trszS.left)+parseFloat(trszS.width)-parseFloat(btszS.width)-b;btszS.left= a*c+b+"px"}};this.z457=function(a){v(a)};this.backgroundEventsHandler=function(a){a=Z.Utils.event(a);if(a=Z.Utils.relatedTarget(a)){var b=a.parentNode;b&&(b=b.id)&&(buttonSliderZoomDown||buttonSliderImageSetDown||-1==b.indexOf("button")||-1!=b.indexOf("buttonContainer")||Z.Utils.setButtonDefaults(a.parentNode))}}}}; Z.ZoomifyNavigator=function(a){function b(c,d){var e="undefined"!==typeof d&&null!==d?!1:!0,h=e?a:d;"unconverted"!=Z.tileSource?("ZoomifyImageFile"==Z.tileSource?Va=h.formatTilePath(0,0,0):"ZoomifyImageFolder"==Z.tileSource&&(Va=Z.Utils.cacheProofPath(h.getImagePath()+"/TileGroup0/0-0-0."+Z.tileType)),X=null,X=new Image,X.onload=c,X.onerror=T,"offsetLoading"!=Va?(e||(Sa[Sa.length]={id:d.getViewportID().toString(),image:X}),"ZoomifyImageFile"==Z.tileSource?(new Z.NetConnector).loadImage(Va,Z.Utils.createCallback(null, c),"navigator",null):X.src=Va):window.setTimeout(function(){b(c)},100)):"undefined"!==typeof unconvertedImage&&null!==unconvertedImage?(X=h.createUnconvertedImageThumbnail(unconvertedImage),e&&"function"===typeof c?c():Sa[Sa.length]="undefined"!==typeof d?{id:d.getViewportID().toString(),image:X}:{id:null,image:null}):window.setTimeout(function(){b(c,d)},100)}function c(a,b){"ZoomifyImageFile"==Z.tileSource&&(X=b);var d=Z.Utils.createContainerElement("div","testImageContainer","inline-block","absolute", "hidden",bb+"px",nb+"px","0px","0px","none","0px","transparent none","0px","0px","normal",null,!0);d.appendChild(X);d.removeChild(X);d=null;d=X.height;if(0!=X.width&&0!=d){Z.NavigatorDisplay=Z.Utils.createContainerElement("div","NavigatorDisplay","inline-block","absolute","hidden",bb+"px",nb+"px",u+"px",la+"px","solid","1px","transparent none","0px","0px","normal",null,!0);t=Z.NavigatorDisplay;M=t.style;Z.slideshow&&Z.Utils.setOpacity(t,0);d=parseInt(Z.Utils.getResource("z230"),10);M.zIndex=(d+2).toString(); var d=parseFloat(Z.Utils.getResource("z82")),e=Z.Utils.getResource("z83"),k=Z.Utils.getResource("z83NOALPHA"),e=Z.Utils.createContainerElement("div","navigatorBackground","inline-block","absolute","hidden",bb+"px",nb+"px","0px","0px","none","0px",e,"0px","0px","normal",null,!0);Z.Utils.setOpacity(e,d,k);Z.NavigatorDisplay.appendChild(e);vb=e;Ra=vb.style;d=Z.Utils.createContainerElement("div","navigatorImageContainer","inline-block","absolute","hidden",bb+"px",nb+"px","0px","0px","none","0px","transparent none", "0px","0px","normal",null,!0);d.appendChild(X);X.alt=Z.Utils.getResource("z439");Z.NavigatorDisplay.appendChild(d);xa=d;oa=xa.style;F=X;d=F.width;k=F.height;e=Z.Utils.createContainerElement("div","navigatorRectangle","inline-block","absolute","hidden",bb+1+"px",nb+1+"px",u+"px",la+"px","solid","1px","transparent none","0px","0px","normal",null,!0);e.style.borderColor=Z.Utils.stringValidateColorValue(Z.navigatorRectangleColor);Z.NavigatorDisplay.appendChild(e);P=e;p=P.style;Z.ViewerDisplay.appendChild(Z.NavigatorDisplay); g(bb,nb,u,la,Fa,d,k);v(1==Z.navigatorVisible||2==Z.navigatorVisible);Z.Utils.addEventListener(t,"mouseover",Z.Utils.stopPropagation);Z.Utils.addEventListener(t,"mousedown",aa);Z.Utils.addEventListener(t,"touchstart",r);Z.Utils.addEventListener(t,"touchmove",E);Z.Utils.addEventListener(t,"touchend",H);Z.Utils.addEventListener(t,"touchcancel",ga);h||(h=!0,Z.Utils.validateCallback("navigatorInitialized"),Z.Viewer.validateViewerReady("navigatorInitialized"));A()}else window.setTimeout(function(){c(a, b)},100)}function d(a){if(Z.NavigatorDisplay)if(Z.slideshow&&Z.Utils.setOpacity(Z.NavigatorDisplay,0),"ZoomifyImageFile"==Z.tileSource&&(X=a),xa&&X&&0b&&(b+=360);var c=parseFloat(F.width),d=parseFloat(F.height),b=Z.Utils.rotatePoint(c/Z.imageW*a.x-c/2,d/Z.imageH*a.y-d/2,-b);a=b.x-parseFloat(p.width)/2;c=b.y-parseFloat(p.height)/2;b=parseFloat(M.width)/2;c=parseFloat(M.height)/2+c-1;p.left=b+a+"px";p.top=c+"px"}}function D(){if(F&&p&&oa){if("undefined"===typeof z||null===z)z=Z.imageZ;var b=Z.imageR;0>b&&(b+=360);var c=parseFloat(p.left),d=parseFloat(p.top),e=parseFloat(M.width)/2,h=parseFloat(M.height)/2,d=d- h,c=c-e+parseFloat(p.width)/2,e=d+parseFloat(p.height)/2,b=Z.Utils.rotatePoint(c,e,b),c=parseFloat(F.width),e=parseFloat(F.height),d=c/Z.imageW,b=new Z.Utils.Point((b.x+c/2)/d,(b.y+e/2)/d);a.syncViewportToNavigator(b)}}function T(){Z.Utils.showMessage(Z.Utils.getResource("z271"))}function aa(b){Z.interactivityOff||(a.zoomAndPanAllStop(!1,!0),t&&P&&p&&(b=Z.Utils.event(b),P.mouseXPrior=b.clientX,P.mouseYPrior=b.clientY,dragPtStart=new Z.Utils.Point(b.clientX,b.clientY),Z.Utils.addEventListener(t,"mousemove", C),Z.Utils.addEventListener(t,"mouseup",U),Z.Utils.addEventListener(document,"mouseup",U)))}function C(a){if(!Z.interactivityOff&&P&&p){var b=parseFloat(p.left),c=parseFloat(p.top);p.left=b+(a.clientX-P.mouseXPrior)+"px";p.top=c+(a.clientY-P.mouseYPrior)+"px";P.mouseXPrior=a.clientX;P.mouseYPrior=a.clientY;D();return!1}}function U(b){if(!Z.interactivityOff&&t&&P&&p){document.mousemove=null;document.mouseup=null;Z.Utils.removeEventListener(t,"mousemove",C);Z.Utils.removeEventListener(t,"mouseup",U); Z.Utils.removeEventListener(document,"mouseup",U);b=Z.Utils.event(b);var c=new Z.Utils.Point(b.clientX,b.clientY);4>Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)&&(c=Z.Utils.getElementPosition(Z.NavigatorDisplay),p.left=b.clientX-c.x-parseFloat(p.width)/2+"px",p.top=b.clientY-c.y-parseFloat(p.height)/2+"px");D();a.updateView()}}function r(a){!Z.interactivityOff&&(a.preventDefault(),t&&P&&p&&(a=Z.Utils.getFirstTouch(a)))&&(a=new Z.Utils.Point(a.pageX,a.pageY),dragPtStart=new Z.Utils.Point(a.x, a.y),P.mouseXPrior=a.x,P.mouseYPrior=a.y)}function E(a){if(!Z.interactivityOff&&(a.preventDefault(),Z.mousePan)){if(P&&p&&(a=Z.Utils.getFirstTouch(a))){a=new Z.Utils.Point(a.pageX,a.pageY);var b=parseFloat(p.left),c=parseFloat(p.top);p.left=b+(a.x-P.mouseXPrior)+"px";p.top=c+(a.y-P.mouseYPrior)+"px";P.mouseXPrior=a.x;P.mouseYPrior=a.y;D()}return!1}}function H(b){if(!Z.interactivityOff&&t&&P&&p){if(b=Z.Utils.getFirstTouch(b)){b=new Z.Utils.Point(b.pageX,b.pageY);var c=new Z.Utils.Point(b.x,b.y);Z.Utils.calculatePointsDistance(dragPtStart.x, dragPtStart.y,c.x,c.y)<(Z.mobileDevice?6:3)&&(c=Z.Utils.getElementPosition(Z.NavigatorDisplay),p.left=b.x-c.x-parseFloat(p.width)/2+"px",p.top=b.y-c.y-parseFloat(p.height)/2+"px")}D();a.updateView()}}function ga(b){if(!Z.interactivityOff&&t&&P&&p){if(b=Z.Utils.getFirstTouch(b)){b=new Z.Utils.Point(b.pageX,b.pageY);var c=new Z.Utils.Point(b.x,b.y);Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)<(Z.mobileDevice?6:3)&&(c=Z.Utils.getElementPosition(Z.NavigatorDisplay),p.left=b.x- c.x-parseFloat(p.width)/2+"px",p.top=b.y-c.y-parseFloat(p.height)/2+"px")}D();a.updateView()}}var h=!1,ca=a.getViewportID().toString(),k,t,M,vb,Ra,xa,oa,F,P,p,X,Sa=[],bb=Z.navigatorW,nb=Z.navigatorH,u=Z.navigatorL,la=Z.navigatorT,Fa=Z.navigatorFit,Va;b(c);this.z556=function(a,b){c(a,b)};this.setImage=function(a){xa&&X&&0b||a==Z.browsers.CHROME&&2>b),e=e&&v,v=!(a==Z.browsers.CHROME&&2>b),n=g||n?"high":null,y=(document.documentElement||{}).style||{},g=!1,D=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],T,aa;for(;T=D.shift();)if("undefined"!== typeof y[T]){g=!0;aa=/webkit/i.test(T);break}y=g;D=!1;if("undefined"!==typeof document.cancelFullScreen||"undefined"!==typeof document.webkitCancelFullScreen||"undefined"!==typeof document.mozCancelFullScreen||"undefined"!==typeof document.oCancelFullScreen||"undefined"!==typeof document.msCancelFullScreen||"undefined"!==typeof document.msExitFullscreen)D=!0;var C=Array.prototype.map,U=Array.prototype.splice,r=!1;try{new Float32Array(1),r=!0}catch(E){}var H=!1;try{new Uint8Array(1),H=!0}catch(ga){}var h= !1;if("function"==typeof Object.defineProperty)try{Object.defineProperty({},"x",{}),h=!0}catch(ca){}var k="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||0Z.browserVersion|| Z.browser==Z.browsers.OPERA&&15>Z.browserVersion||Z.browser==Z.browsers.CHROME&&25>Z.browserVersion&&Z.browser==Z.browsers.FIREFOX&&20>Z.browserVersion&&Z.browser==Z.browsers.SAFARI&&5>Z.browserVersion);Z.browser=a;Z.browserVersion=b;Z.scaleThreshold=c;Z.xmlHttpRequestSupport=A;Z.responseArraySupported=d;Z.canvasSupported=e;Z.useCanvas=Z.canvasSupported;Z.imageFiltersVisible=!Z.useCanvas&&Z.imageFiltersVisible?!1:Z.imageFiltersVisible;Z.cssTransformsSupported=g;Z.cssTransformProperty=T;Z.cssTransformNoUnits= aa;Z.alphaSupported=v;Z.renderQuality=n;Z.rotationSupported=y;Z.fullScreenSupported=D;Z.arrayMapSupported=C;Z.arraySpliceSupported=U;Z.float32ArraySupported=r;Z.uInt8ArraySupported=H;Z.definePropertySupported=h;Z.touchSupport=k;Z.mobileDevice=q;Z.localUse=t;Z.zifSupported=M},parseParameters:function(a){var b=[];if("object"===typeof a)b=a;else if("string"===typeof a){a=a.split("&");for(var c=0,d=a.length;c=Z.initialZ&&(Z.initialZ/=100));break;case "zMinZoom":"fit"==pValue&&(pValue="-1");"fill"==pValue&&(pValue="0");isNaN(parseFloat(pValue))|| (Z.minZ=parseFloat(pValue),Z.minZ&&0=Z.minZ&&(Z.minZ/=100));break;case "zMaxZoom":isNaN(parseFloat(pValue))||(Z.maxZ=parseFloat(pValue),Z.maxZ&&-1!=Z.maxZ&&(Z.maxZ/=100));break;case "zNavigatorVisible":Z.navigatorVisible=parseInt(pValue,10);break;case "zToolbarInternal":Z.toolbarInternal=pValue;break;case "zToolbarVisible":Z.toolbarVisible=parseInt(pValue,10);Z.toolbarAutoShowHide=0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&6!=Z.toolbarVisible&&7!=Z.toolbarVisible&&8!=Z.toolbarVisible; break;case "zLogoVisible":"0"==pValue&&(Z.logoVisible=!1);break;case "zMinimizeVisible":"0"==pValue&&(Z.minimizeVisible=!1);break;case "zSliderVisible":"0"==pValue&&(Z.sliderZoomVisible=!1);break;case "zPanButtonsVisible":"0"==pValue&&(Z.panButtonsVisible=!1);break;case "zResetVisible":"0"==pValue&&(Z.resetVisible=!1);break;case "zFullViewVisible":"1"==pValue?(Z.fullScreenVisible=!0,Z.fullPageVisible=!1):"0"==pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!1);break;case "zFullScreenVisible":"0"== pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!1);break;case "zFullPageVisible":"1"==pValue&&(Z.fullScreenVisible=!1,Z.fullPageVisible=!0);break;case "zInitialFullPage":"1"==pValue&&(Z.initialFullPage=!0);break;case "zFullPageInitial":alert(Z.Utils.getResource("z275")+" zFullPageInitial is now zInitialFullPage");break;case "zProgressVisible":"0"==pValue&&(Z.progressVisible=!1);break;case "zTooltipsVisible":"0"==pValue&&(Z.tooltipsVisible=!1);break;case "zHelpVisible":Z.helpVisible=parseInt(pValue, 10);break;case "zNavigatorRectangleColor":Z.navigatorRectangleColor=pValue;break;case "zSkinPath":Z.skinPath=pValue;break;default:if(g)switch(y){default:if(A)switch(y){default:Z.specialStorageEnabled==n&&alert(v+" "+y)}else alert(q+" "+y)}else alert(d+" "+y)}else alert(e+" "+y);if(Z.Utils.stringValidate(Z.annotationPath)||Z.Utils.stringValidate(Z.saveHandlerPath)||Z.Utils.stringValidate(Z.saveImageHandlerPath))A?Z.Utils.stringValidate(Z.saveHandlerPath)&&(a=Z.saveImageHandlerPath,Z.saveHandlerPath= Z.saveHandlerPath,Z.saveImageHandlerPath=a):(Z.annotationPath="",alert(q));Z.Utils.validateImagePath()},resetParametersXYZ:function(a){isNaN(parseFloat(this.getResource("z143")))||(Z.initialX=parseFloat(this.getResource("z143")));isNaN(parseFloat(this.getResource("z144")))||(Z.initialY=parseFloat(this.getResource("z144")));isNaN(parseFloat(this.getResource("z145")))||(Z.initialZ=parseFloat(this.getResource("z145")));isNaN(parseFloat(this.getResource("z163")))||(Z.minZ=parseFloat(this.getResource("z163"))); isNaN(parseFloat(this.getResource("z153")))||(Z.maxZ=parseFloat(this.getResource("z153")));if(this.stringValidate(a))for(var b=0,c=a.length;b=Z.initialZ&&(Z.initialZ/=100));break;case "zMinZoom":"fit"==d&&(d="-1");"fill"==d&&(d="0");isNaN(parseFloat(d))||(Z.minZ=parseFloat(d),Z.minZ&&0=Z.minZ&&(Z.minZ/=100));break;case "zMaxZoom":isNaN(parseFloat(d))||(Z.maxZ=parseFloat(d),Z.maxZ&&-1!=Z.maxZ&&(Z.maxZ/=100))}}}},validateImagePath:function(a){a="undefined"!==typeof a&&Z.Utils.stringValidate(a)?a:Z.imagePath;if(null!==a)this.getResource("z213"),-1!=a.toLowerCase().indexOf(".zif")?Z.zifSupported? (Z.tileSource="ZoomifyImageFile",Z.Utils.validateResponseArrayFunctionality()):alert(this.getResource("z16")):-1!=a.toLowerCase().indexOf(".jpg")||-1!=a.toLowerCase().indexOf(".png")?Z.tileSource="unconverted":Z.Utils.stringValidate(Z.tileHandlerPath)||(Z.tileSource="ZoomifyImageFolder");else if(Z.imageSet||Z.slideshow)Z.tileSourceMultiple=!0},clearImageParameters:function(){Z.imagePath=null;Z.parameters=null;Z.initialX=null;Z.initialY=null;Z.initialZ=null;Z.minZ=null;Z.maxZ=null;Z.initialR=null; Z.imageProperties=null;Z.tileW=null;Z.tileH=null;Z.tileType="jpg";Z.annotationPathProvided=!1;Z.imageSetPathProvided=!1;Z.tileSource=null;Z.tileSourceMultiple=null;Z.imageW=null;Z.imageH=null;Z.imageCenterX=null;Z.imageCenterY=null;Z.imageX=0;Z.imageY=0;Z.imageZ=0;Z.imageR=0;Z.priorX=0;Z.priorY=0;Z.priorZ=0;Z.priorR=0;Z.fitZ=null;Z.fillZ=null;Z.zooming="stop";Z.panningX="stop";Z.panningY="stop";Z.fullView=!1;Z.fullViewPrior=!1},getResource:function(a){var b="";switch(a){case "z110":b="Changing This Violates License Agreement"; break;case "z109":b="Changing This Violates License Agreement";break;case "z108":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Express, Pro, and Enterprise editions: ";break;case "z187":b="Changing This Violates License Agreement";break;case "z186":b="Changing This Violates License Agreement";break;case "z185":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Pro and Enterprise editions: "; break;case "z215":b="Changing this violates License Agreement";break;case "z214":b="Changing this violates License Agreement";break;case "z213":b="Support for Zoomify Image File (PFF) storage and other special storage options is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Enterprise edition.";break;case "z107":b="Changing this violates License Agreement";break;case "z106":b="Changing this violates License Agreement";break;case "z105":b="Support for this parameter is enabled only in the Zoomify Image Viewer included in the Zoomify HTML5 Enterprise edition: "; break;case "z125":b="0";break;case "z124":b="8192";break;case "z90":b="1024";break;case "z221":b="256";break;case "z219":b="256";break;case "z140":b="300";break;case "z139":b="60000";break;case "DEFAULT_IMAGELOADQUEUEDELAY":b="100";break;case "z218":b="1.15";break;case "z220":b="300";break;case "z81":b="6";break;case "z78":b="3";break;case "z80":b="5";break;case "z77":b="3";break;case "z79":b="3";break;case "z76":b="2";break;case "z75":b="0";break;case "z173":b=Z.mobileDevice?"1":"1.5";Z.rotationVisible&& (b="2");break;case "z173UNCONVERTED":b=Z.mobileDevice?Z.rotationVisible?"2":"1":"10";break;case "DEFAULT_z310SIZEMAXBROWSER":b="10000";break;case "DEFAULT_z310SIZEMAXFIREFOX":b="4000";break;case "DEFAULT_z310SIZEMAXIMAGESET":b="1000";break;case "z74":b=Z.mobileDevice?"1":"2";break;case "z88":b="1";break;case "z230":b="2000";break;case "DEFAULT_VALIDATEVIEWRETRYLIMIT":b="2";break;case "DEFAULT_VALIDATEVIEWRETRYDELAY":b="1000";break;case "z104":b="0";break;case "z175":b="5";break;case "z176":b="10"; break;case "z241":b="5";break;case "z242":b="0.02";break;case "z238":b="30";break;case "z240":b="20";break;case "z239":b="800";break;case "z93TIERSKIPTHRESHOLD":b="0.2";break;case "z122":b="10";break;case "DEFAULT_AUTORESIZESKIPDURATION":b="10";break;case "DEFAULT_MOUSEWHEEL":b="1";break;case "DEFAULT_MOUSEWHEELANIMATION":b="1";break;case "z165":b="300";break;case "z111":b="5";break;case "z112":b="0.067";break;case "z146":b="1";break;case "z164":b="1";break;case "z92":b="1";break;case "z93":b="1"; break;case "DEFAULT_DOUBLECLICKZOOM":b="1";break;case "DEFAULT_DOUBLECLICKDELAY":b="250";break;case "z95":b="1";break;case "z95STRICT":b="0";break;case "DEFAULT_SMOOTHPAN":b="1";break;case "DEFAULT_SMOOTHPANEASING":b="2";break;case "DEFAULT_SMOOTHPANGLIDE":b="2";break;case "z143":b=null;break;case "z144":b=null;break;case "z145":b=null;break;case "z163":b=null;break;case "z153":b="1";break;case "z83":b="#FBFAFA";break;case "z83NOALPHA":b="#FBFAFA";break;case "z83LIGHT":b="#FEFEFE";break;case "z82":b= "0.75";break;case "z86":b="0.75";break;case "z87":b="#C0C0C0";break;case "z200":b="skinFiles.xml";break;case "z201":b="Assets/Skins/Default";break;case "z199":b="0";break;case "z171":b="2";break;case "z172":b="150";break;case "z167":b="100";break;case "z168":b="-1";break;case "z170":b="-1";break;case "z166":b=null;break;case "z169":b="#0000FF";break;case "z223":b="4";break;case "z222":b="1";break;case "z224":b="1";break;case "z128":b="1";break;case "z150":b="1";break;case "z149":b=null;break;case "z162":b= "1";break;case "DEFAULT_SLIDERZOOMVISIBLE":b="1";break;case "z205ZOOM":b="10";break;case "z174":b="1";break;case "DEFAULT_RESETVISIBLE":b="1";break;case "z121":b="1";break;case "z119":b="1";break;case "z120":b="white";break;case "z118":b="0";break;case "z141":b="0";break;case "z232":b="Assets/VirtualPointer/virtualPointer.png";break;case "z157":b="undefined"===typeof Z.parameters||null===Z.parameters||"undefined"!==typeof Z.parameters.zMeasureVisible&&"0"==Z.parameters.zMeasureVisible||!("undefined"!== typeof Z.parameters.zMarkupMode&&"1"==Z.parameters.zMarkupMode||"undefined"!==typeof Z.parameters.zEditMode&&"1"==Z.parameters.zEditMode)?"0":"1";break;case "DEFAULT_FULLVIEWEXITEXTERNALBUTTONCOLOR":b="\t#F8F8F8";break;case "z190":b="0";break;case "DEFAULT_INITIALR":b="0";break;case "z184":b="1";break;case "z182":b="500";break;case "z183":b=" ";break;case "z183COLOR":b="#000000";break;case "z127":b="lightgray";break;case "z126":b="white";break;case "z159":b="lightgray";break;case "z158":b="white"; break;case "z16":b="Viewing Zoomify Images stored in the ZIF format requires a newer browser version. Please consider upgrading to the current release of your browser.";break;case "z8":b="\nClick the '?' button for help.";break;case "ERROR_ERROR":b="error";break;case "z268LONG":b="9000";break;case "z268":b="3000";break;case "z268MEDIUM":b="1500";break;case "z268SHORT":b="750";break;case "z287":b="Parameter unrecognized or deprecated - see the Parameters List documentation: ";break;case "z275":b="Parameter deprecated - please replace: "; break;case "z288":b="Recent versions of most browsers allow dynamic content loading (such as viewing of Zoomify Images) only from a web server. Please change your browser settings (see READ ME FIRST file for details) or use FireFox or an earlier version of your browser for local viewing.";break;case "z290":b="Browsers allow ZIF file viewing only from a web server. Please use Zoomify Image folders for local viewing.";break;case "z249":b="Image failed to load: possible invalid path, missing image, or network error."; break;case "z280":b="Sorry! Part of this view is not refreshing. The network may be slow, or the website may be missing a file: ";break;case "ERROR_VALIDATEVIEW":b="Sorry! Part of this view is not refreshing. The network\nmay be slow, or the website may be missing a file. ";break;case "z280-ZIF":b="Sorry! Part of this view is not refreshing. The network may be slow, or the ZIF file may be faulty: ";break;case "z256-ZIFBYTERANGE":b="Error loading image: ZIF file data request failed. Request content type: "; break;case "z256-ZIFBYTES":b="Error loading image: ZIF file invalid.";break;case "z295":b="Browser does not support XMLHttpRequest.";break;case "z256-IMAGEXML":b="Error loading image: please make sure image path in web page matches image folder location on webserver.";break;case "z256-TOOLBARSKINSXML":b="Error loading toolbar - skin files not found: please verify that the folders 'Assets/Skins/Default' are in same folder as the web page displaying the Viewer, or add zSkinPath parameter to web page. The zSkinPath parameter may be required if using a content management system such as Drupal, Joomla, or WordPress."; break;case "z256":b="Error making network request:\npossible invalid path or network error.";break;case "z272":b="Error related to network security: ";break;case "z273":b="Error related to network status: ";break;case "z273RANGEREQUESTS":b="Network error. If using ZIF storage, setting MIME type on web server may be necessary. See READ ME FIRST file in ZIF Storage folder or contact Support: ";break;case "z244":b=" converting XML text to XML doc (DOMParser): ";break;case "z294":b="Browser does not support XML DOM."; break;case "z293":b="XML Doc invalid.";break;case "z296":b="XML invalid.";break;case "z255":b="Image XML invalid.";break;case "z252":b="Image properties XML invalid.";break;case "z250":b="Image properties invalid.";break;case "z251":b="Image properties parameter invalid.";break;case "z254":b="Image tile count does not match value in image XML. If the count is invalid display problems can result.";break;case "z245":b=" while executing callback: ";break;case "z253":b="\nImage tile request not fulfilled within time period expected"; break;case "ERROR_UNCONVERTEDIMAGEPATHINVALID":b="Unconverted JPEG or PNG image failed to load: possible invalid path, missing image, or network error.";break;case "ERROR_TRANSLATINGCANVASFORUNCONVERTEDIMAGE":b="\nTranslation of canvas failed";break;case "ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE":b="\nScaling of canvas failed";break;case "ERROR_SETTINGTRANSFORMONCANVASFORUNCONVERTEDIMAGE":b="\nTransform on canvas failed";break;case "z271":b="Navigator image failed to load: possible invalid path, missing image, or network error."; break;case "z278":b="Skin XML invalid.";break;case "z279":b="The skin XML file has one or more faulty name lines.";break;case "z283":b="Unknown element style - no known method to identify.";break;case "z284":b="Unknown mouse position - no known method to calculate.";break;case "z285":b="Unknown mouse scroll - no known method to calculate.";break;case "z286":b="Unknown window size - no known method to calculate.";break;case "z360":b="Launch Zoomify Website";break;case "z363":a="";Z.hotspots?a="\nAlt-Click: Toggle Hotspot Visibility": Z.annotations&&(a="\nAlt-Click: Toggle Label Visibility");b="Minimize Toolbar"+a;break;case "z341":a="";Z.hotspots?a="\nAlt-Click: Toggle Hotspot Visibility":Z.annotations&&(a="\nAlt-Click: Toggle Label Visibility");b="Expand Toolbar"+a;break;case "z400":b="Zoom Out";break;case "z385":b="Zoom In And Out";break;case "z399":b="Zoom In";break;case "z370":b="Pan Left";break;case "z372":b="Pan Up";break;case "z369":b="Pan Down";break;case "z371":b="Pan Right";break;case "z378":b="Reset Initial View\nAlt-Click: Prior View"; break;case "z391":b="Enter Full View";break;case "z391EXIT":b="Exit Full View";break;case "z391EXITEXTERNAL":b="Exit Full View";break;case "z342":b="Show Help";break;case "z342MARKUP":b="Show Markup Help";break;case "z342ANNOTATION":b="Show Annotation Help";break;case "z342OK":b="Close Help Display";break;case "z362":b="Accept And Close Message";break;case "z361":b="Decline And Close Message";break;case "z427DISPLAY":b="www.zoomify.com";break;case "z427":b="http://www.zoomify.com";break;case "z427TARGET":b= "_blank";break;case "UI_TOOLBARINTERNALBACKGROUNDALPHA":b="0.75";break;case "UI_TOOLBARINTERNALBACKGROUNDCOLOR":b="lightgray";break;case "UI_TOOLBARINTERNALBUTTONUPCOLOR":b="white";break;case "UI_TOOLBARINTERNALBUTTONOVERCOLOR":b="lightgray";break;case "UI_TOOLBARINTERNALBUTTONDOWNCOLOR":b="darkgray";break;case "UI_TOOLBARINTERNALBUTTONZOOMINTEXT":b="+";break;case "UI_TOOLBARINTERNALBUTTONRESETTEXT":b="Z";break;case "UI_TOOLBARINTERNALBUTTONZOOMOUTTEXT":b="-";break;case "z439":b="Navigator Bird's Eye View"; break;case "z420":b="X";break;case "z422":b="430";break;case "z421":b="300";break;case "z423":b="OK";break;case "z437":b="430";break;case "z436":b="84";break;case "z435":b="Cancel";break;case "z438":b="OK";break;case "z32":b="

Viewer Help

To explore this image, simply click the image to zoom, double-click to zoom out, or click-drag to pan.

The Navigator thumbnail overview can also be clicked or click-dragged to pan.

Use the Toolbar for exact navigation - if using a mouse, hold it over any button to see a helpful tip.

"; break;default:b="Unexpected resource request"}return b},clearDisplay:function(a){if(a)if(Z.useCanvas&&"CANVAS"==a.tagName)Z.Utils.clearCanvas(a);else for(;a.hasChildNodes();)a.removeChild(a.lastChild)},clearCanvas:function(a){a=a.getContext("2d");a.save();try{a.setTransform(1,0,0,1,0,0)}catch(b){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SETTINGTRANSFORMONCANVASFORUNCONVERTEDIMAGE")),console.log("In function clearCanvas setting transform on canvas: "+b)}a.clearRect(0,0,a.canvas.width,a.canvas.height); a.restore()},createCallback:function(a,b){for(var c=[],d=2,e=arguments.length;d';d[d.length]='
';d[d.length]= '
';c.innerHTML=d.join("");for(var d=c=c.firstChild,e=c.getElementsByTagName("div");0Z.browserVersion?(b=a.screenX,c=a.screenY):"number"===typeof a.pageX?(b=a.pageX,c=a.pageY):"number"===typeof a.clientX?(b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=a.clientY+document.body.scrollTop+document.documentElement.scrollTop):this.showMessage(this.getResource("z284")); return new this.Point(b,c)},getMouseScroll:function(a){var b=0;"number"===typeof a.wheelDelta?b=a.wheelDelta:"number"===typeof a.detail?b=-1*a.detail:this.showMessage(this.getResource("z285"));return b?b/Math.abs(b):0},getPageScroll:function(){var a=0,b=0,c=document.documentElement||{},d=document.body||{};if("number"===typeof window.pageXOffset)a=window.pageXOffset,b=window.pageYOffset;else if(d.scrollLeft||d.scrollTop)a=d.scrollLeft,b=d.scrollTop;else if(c.scrollLeft||c.scrollTop)a=c.scrollLeft, b=c.scrollTop;return new this.Point(a,b)},getScreenSize:function(){return new this.Point(screen.width,screen.height)},getWindowSize:function(){var a=0,b=0,c=document.documentElement||{},d=document.body||{};"number"===typeof window.innerWidth?(a=window.innerWidth,b=window.innerHeight):c.clientWidth||c.clientHeight?(a=c.clientWidth,b=c.clientHeight):d.clientWidth||d.clientHeight?(a=d.clientWidth,b=d.clientHeight):this.showMessage(this.getResource("z286"));return new this.Point(a,b)},Button:function(a, b,c,d,e,g,n,q,v,A,x,y,D,T,aa,C,U,r,E,H){a=Z.Utils.createContainerElement("span",a,"inline-block","absolute","hidden",n,q,v,A,T,aa,C,U,r,E,H);if(Z.Utils.stringValidate(b)){var ga=document.createTextNode(b);a.appendChild(Z.Utils.createCenteredElement(ga));Z.Utils.setTextNodeStyle(ga,"black","verdana","13px","none","normal","normal","normal","normal","1em","center","none")}else{c=Z.Utils.stringRemoveTrailingSlashCharacters(c);var h=Z.Utils.createGraphicElement(c+"/"+d),ca=Z.Utils.createGraphicElement(c+ "/"+e),k=Z.Utils.createGraphicElement(c+"/"+g);h.style.width=ca.style.width=k.style.width=n;h.style.height=ca.style.height=k.style.height=q;h.style.position=ca.style.position=k.style.position="absolute";Z.browser==Z.browsers.FIREFOX&&3>Z.browserVersion&&(h.style.top=ca.style.top=k.style.top="");ca.style.visibility=k.style.visibility="hidden";h.alt=ca.alt=k.alt="";"undefined"!==typeof D&&Z.Utils.stringValidate(D)&&(h.alt=Z.Utils.getResource(D));a.appendChild(h);a.appendChild(ca);a.appendChild(k)}Z.Utils.addEventListener(a, "mousedown",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"mouseover",Z.Utils.stopPropagation);Z.Utils.addEventListener(a,"mousedown",Z.Utils.stopPropagation);Z.Utils.addEventListener(a,"mouseup",Z.Utils.stopPropagation);Z.Utils.addEventListener(a,"mouseout",Z.Utils.stopPropagation);"undefined"!==typeof imageUp&&(Z.Utils.addEventListener(h,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(ca,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(k,"contextmenu",Z.Utils.preventDefault)); Z.Utils.addEventListener(a,"touchstart",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"touchend",Z.Utils.preventDefault);Z.Utils.addEventListener(a,"touchcancel",Z.Utils.preventDefault);Z.Utils.stringValidate(b)||(Z.Utils.disableTextInteraction(ga),Z.Utils.addEventListener(a,"contextmenu",Z.Utils.preventDefault));Z.tooltipsVisible&&Z.Utils.stringValidate(D)&&(a.title=Z.Utils.getResource(D));Z.Utils.setButtonHandler(a,x,y);this.elmt=a},buttonSize:function(a,b,c){var d=a.style;d.width=b+"px";d.height= c+"px";c=a.firstChild;d=a.childNodes[1];a=a.childNodes[2];c&&d&&a&&(c.style.width=d.style.width=a.style.width=b+"px",c.style.height=d.style.height=a.style.height=b+"px")},setButtonDefaults:function(a){Z.Utils.clearButtonSettings(a);Z.Utils.setButtonState(a,"up");Z.Utils.setButtonHandler(a,"mouseover",Z.Toolbar.z457)},clearButtonSettings:function(a){var b=a.firstChild,c=a.childNodes[1],d=a.childNodes[2];b&&c&&d&&(b.style.visibility=c.style.visibility=d.style.visibility="hidden",Z.Utils.removeEventListener(b, "mouseover",Z.Toolbar.z457),Z.Utils.removeEventListener(c,"mousedown",Z.Toolbar.z457),Z.Utils.removeEventListener(c,"mouseout",Z.Toolbar.z457),Z.Utils.removeEventListener(d,"mouseup",Z.Toolbar.z457),Z.Utils.removeEventListener(a,"touchstart",Z.Toolbar.z457),Z.Utils.removeEventListener(a,"touchend",Z.Toolbar.z457),Z.Utils.removeEventListener(a,"touchcancel",Z.Toolbar.z457));Z.Utils.removeEventListener(a,"mouseover",Z.Toolbar.z457);Z.Utils.removeEventListener(a,"mousedown",Z.Toolbar.z457);Z.Utils.removeEventListener(a, "mouseout",Z.Toolbar.z457);Z.Utils.removeEventListener(a,"mouseup",Z.Toolbar.z457)},setButtonState:function(a,b){var c="up"==b?a.firstChild:"down"==b?a.childNodes[1]:a.childNodes[2];c&&(c.style.visibility="visible")},setButtonHandler:function(a,b,c){c="undefined"!==c?c:Z.Toolbar.z457;var d="undefined"!==b?b:"mouseover";if("mouseover"==b&&"undefined"!==typeof a.firstChild)a=a.firstChild;else if("mousedown"!=b||"undefined"===typeof a.childNodes[1])"mouseup"==b&&"undefined"!==typeof a.childNodes[2]? a=a.childNodes[2]:"mouseout"==b&&"undefined"!==typeof a.childNodes[1]&&(a=a.childNodes[1]);Z.Utils.addEventListener(a,"mousedown"==b?"touchstart":"touchend",c);Z.Utils.addEventListener(a,d,c)},Graphic:function(a,b,c,d,e,g,n,q){b=Z.Utils.stringRemoveTrailingSlashCharacters(b);b=Z.Utils.createGraphicElement(c?b+"/"+c:b);c=b.style;c.width=d;c.height=e;"undefined"!==typeof q&&Z.Utils.stringValidate(q)?b.alt=Z.Utils.getResource(q):b.alt="";c=Z.Utils.createContainerElement("span",a,"inline-block","absolute", "hidden",d,e,g,n,"none","0px","transparent none","0px","0px","normal");c.appendChild(b);this.elmt=c;Z.Utils.addEventListener(b,"mousedown",Z.Utils.preventDefault);Z.Utils.addEventListener(b,"touchstart",Z.Utils.preventDefault);Z.Utils.addEventListener(b,"contextmenu",Z.Utils.preventDefault)},createGraphicElement:function(a){var b=this.createContainerElement("img"),c=null;Z.browser==Z.browsers.IE&&7>Z.browserVersion?(c=this.createContainerElement("span",null,"inline-block"),b.onload=function(){c.style.width= c.style.width||b.width+"px";c.style.height=c.style.height||b.height+"px";b=b.onload=null},c.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+a+'", sizingMethod="scale")'):(c=b,c.src=a);return c},graphicSize:function(a,b,c){var d=a.style;d.width=b+"px";d.height=c+"px";a=a.firstChild.style;a.width=b+"px";a.height=c+"px"},Point:function(a,b){this.x="number"===typeof a?a:0;this.y="number"===typeof b?b:0},Point3D:function(a,b,c){this.x="number"===typeof a?a:0;this.y="number"===typeof b? b:0;this.z="number"===typeof c?c:0},Range:function(a,b){this.start="number"===typeof a?a:0;this.end="number"===typeof b?b:0},stringValidate:function(a){return"undefined"!==typeof a&&null!==a&&""!==a&&"null"!==a},stringLowerCaseFirstLetter:function(a){return a.charAt(0).toLowerCase()+a.slice(1)},stringMultiply:function(a,b){var c=Math.ceil(Math.log(b)/Math.LN2),d=a;do d+=d;while(0<--c);return d.slice(0,a.length*b)},stringRemoveTrailingSlashCharacters:function(a){return"/"==a.slice(-1,a.length)?a.slice(0, a.length-1):a},stringUnescapeAmpersandCharacters:function(a){a=a.replace(/\n/g,"");a=a.replace(/&/g,"&");a=a.replace(/&/g,"&");return a=a.replace(/&/g,"&")},setTextNodeStyle:function(a,b,c,d,e,g,n,q,v,A,x,y){a=a.parentNode.style;a.color=b;a.fontFamily=c;a.fontSize=d;a.fontSizeAdjust=e;a.fontStyle=g;a.fontStretch=n;a.fontVariant=q;a.fontWeight=v;a.lineHeight=A;a.textAlign=x;a.textDecoration=y},stringValidateColorValue:function(a){Z.Utils.stringValidate(a)||(a="#000000");0!=a.indexOf("#")&& (a="#"+a);return a},xmlConvertTextToDoc:function(a){var b=null;if(window.ActiveXObject)try{b=new ActiveXObject("Microsoft.XMLDOM"),b.async=!1,b.loadXML(a)}catch(c){this.showMessage(c.name+this.getResource("z244")+c.message)}else if(window.DOMParser)try{b=(new DOMParser).parseFromString(a,"text/xml")}catch(d){this.showMessage(d.name+this.getResource("z244")+d.message)}else this.showMessage(this.getResource("z294"));return b},arrayClear:function(a){if(a)for(;0c&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;cd&&(d=Math.max(0,a.length+d)):d=0;for(var e=a.length;dd&&(d=Math.max(0,a.length+d)):d=0;for(var n=a.length;dd&&(d=Math.max(0,a.length+d)):d=0;for(var g=a.length;dc&&(c=0);var g=[];if(3b&&(b=0);if(!c||c>a.length)c=a.length;if(b==c)return[];for(var d=[];b=a.length||c&&0>=c)return[];0>b&&(b=Math.abs(b)>a.length?0:a.length+b); if(!c||c+b>a.length)c=a.length-b;for(var d=[],e=b;eb&&(b+=360);var c=parseFloat(a.width)/2,d=parseFloat(a.height)/2,e=Z.Utils.rotatePoint,g=new Z.Utils.Point(0,0);0!=b&&(90==b?g=e(-c,d,-b):180==b?g=e(c,d,-b):270==b&&(g=e(c,-d,-b)),g.x+=c,g.y+=d);return new Z.Utils.Point(g.x,g.y)},intValue:function(a, b){return(a[b]+(a[b+1]<<8)|a[b+2]<<16)+16777216*a[b+3]},longValue:function(a,b){var c=(a[b]+(a[b+1]<<8)|a[b+2]<<16)+16777216*a[b+3];0!=a[b+4]&&(c+=4294967296*a[b+4]);return c},shortValue:function(a,b){return a[b]+(a[b+1]<<8)},createUint8Array:function(a,b){return Z.uInt8ArraySupported?new Uint8Array(a,b):new Z.Utils.TypedArray(a,b)},TypedArray:function(a){var b;if("number"===typeof a){b=Array(a);for(var c=0;carguments.length&&(b=0);for(var c=0,d=a.length;c>18&63,c=e>>12&63,d=e>>6&63,e&=63,q[n++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e);while(g(c/=d/2)?b/2*c*c*c*c*c+a:b/2*((c-=2)*c*c*c*c+2)+a},functionCallWithDelay:function(a,b){window.setTimeout(a,b)}, nodeIsInViewer:function(a){for(var b=!1;0==b;)if(a)a.id?"ViewerDisplay"==a.id?b=!0:a=a.parentNode:a=a.parentNode;else break;return b},roundToFixed:function(a,b){var c=Math.round(a).toString().length,c=b-c,c=Math.pow(10,0>c?0:c);return a=Math.round(a*c)/c},getRandomInt:function(a,b){return Math.floor(Math.random()*(b-a+1))+a},getSign:function(a){return a?0>a?-1:1:0},configureHelpDisplay:function(){var a=80,b=80,c=parseInt(this.getResource("z422"),10),d=parseInt(this.getResource("z421"),10);c>=Z.viewerW&& (c=Z.viewerW-a,a-=40);d>=Z.viewerH&&(d=Z.viewerH-b,b-=40);var a=Z.viewerW-c-a,e=Z.viewerH-d-b,g=this.getResource("z127"),b=this.getResource("z126");Z.HelpDisplay=this.createContainerElement("div","HelpDisplay","inline-block","absolute","hidden",c+"px",d+"px",a+"px",e+"px","solid","1px",g,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.HelpDisplay);a=Z.Utils.createContainerElement("div","helpTextBox","inline-block","absolute",null,c-50+"px",d-74+"px","4px","4px","solid","1px","white","0px", "20px",null);a.style.overflowY="auto";Z.HelpDisplay.appendChild(a);Z.help=document.getElementById("helpTextBox");a=parseInt(Z.Utils.getResource("z230"),10);Z.HelpDisplay.style.zIndex=(a+9).toString();d=d-18-5;c-=66;a=this.getResource("z423");c=new Z.Utils.Button("buttonHelpOk",a,null,null,null,null,"56px","18px",c+"px",d+"px","mousedown",this.helpOkButtonHandler,"z342OK","solid","1px",b,"0px","0px");Z.HelpDisplay.appendChild(c.elmt)},helpOkButtonHandler:function(a){Z.Utils.hideHelp();return!0},showHelp:function(a){Z.HelpDisplay|| Z.Utils.configureHelpDisplay();Z.help&&(Z.help.innerHTML=unescape(a),Z.HelpDisplay.style.display="inline-block",document.getElementById("buttonHelpOk").style.display="inline-block")},hideHelp:function(){Z.HelpDisplay.style.display="none"},configureMessageDisplay:function(){var a=parseInt(this.getResource("z437"),10),b=parseInt(this.getResource("z436"),10),c=Z.viewerH-b-40,d=this.getResource("z159"),e=this.getResource("z158");Z.MessageDisplay=this.createContainerElement("div","MessageDisplay","inline-block", "absolute","hidden",a+"px",b+"px","40px",c+"px","solid","1px",d,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.MessageDisplay);c=parseInt(Z.Utils.getResource("z230"),10);Z.MessageDisplay.style.zIndex=(c+10).toString();c=Z.Utils.createTextElement("messageBox","",a-18+"px",b-40+"px","4px","4px","4px","solid","1px",!0,"verdana","12px","none",null,1,"auto","auto",null);Z.MessageDisplay.appendChild(c);Z.messages=document.getElementById("messageBox");b=b-18-5;a-=66;c=this.getResource("z438"); e=new Z.Utils.Button("buttonMessageOk",c,null,null,null,null,"56px","18px",a+"px",b+"px","mousedown",this.messageOkButtonHandler,"z362","solid","1px",e,"0px","0px");Z.MessageDisplay.appendChild(e.elmt)},messageOkButtonHandler:function(a){Z.Utils.hideMessage();return!0},messageCancelButtonHandler:function(a){Z.Utils.hideMessage();return!1},showMessage:function(a,b,c,d,e){if(Z.messagesVisible){Z.MessageDisplay||Z.Utils.configureMessageDisplay();Z.MessageDisplay.messageTimer&&window.clearTimeout(MessageDisplay.messageTimer); var g=!0;e&&(-1!=Z.Utils.arrayIndexOf(Z.messageDisplayList,a)?g=!1:Z.messageDisplayList[Z.messageDisplayList.length]=a);if(g&&(Z.messages&&(Z.messages.value=a),Z.MessageDisplay.style.display="inline-block","undefined"!==typeof d&&null!==d&&(a=document.getElementById("textBoxFor-messageBox"))&&(a.firstChild.style.textAlign=d),d=document.getElementById("buttonMessageOk"),a=parseInt(this.getResource("z436"),10),"undefined"!==typeof b&&null!==b&&b?(d.style.display="inline-block",Z.MessageDisplay.style.height= a+"px"):(d.style.display="none",Z.MessageDisplay.style.height=a-22+"px"),"undefined"!==typeof c&&null!==c&&!isNaN(c))){"undefined"!==typeof Z.MessageDisplay.messageTimer&&null!==Z.MessageDisplay.messageTimer&&window.clearTimeout(Z.MessageDisplay.messageTimer);if("undefined"===typeof c||null===c)c=3E3;Z.MessageDisplay.messageTimer=window.setTimeout(Z.Utils.hideMessageTimerHandler,c)}}},getMessage:function(){var a="";Z.messages&&Z.Utils.stringValidate(Z.messages.value)&&(a=Z.messages.value);return a}, hideMessage:function(){Z.MessageDisplay&&(Z.MessageDisplay.style.display="none")},hideMessageTimerHandler:function(){Z.MessageDisplay.messageTimer&&(window.clearTimeout(Z.MessageDisplay.messageTimer),Z.MessageDisplay.messageTimer=null);Z.Utils.hideMessage()},uploadProgress:function(a){var b=Z.saveImageMessage;a.lengthComputable?(a=Math.round(100*a.loaded/a.total),b+=a.toString()+"%"):b+=Z.Utils.getResource("ALERT_IMAGESAVEUNABLETOCOMPUTEPROGRESS");Z.Utils.showMessage(b,!1,"none","center")}};