/*
 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&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1),Z.Viewport&&(Z.Viewport.toggleFullViewMode(!1),Z.Viewport.toggleFullViewMode(!0)),Z.NavigatorDisplay&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0),
Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!0))}function c(a){a=Z.Utils.event(a);18==a.keyCode||a.altKey||Z.viewportCurrent.zoomAndPanAllStop(!0,!0);if(a){var b=a.type;a=a.keyCode;if("keydown"==b)switch(Z.keyIsDown=!0,a){case 90:Z.viewportCurrent.zoom("out");break;case 17:Z.viewportCurrent.zoom("out");break;case 65:Z.viewportCurrent.zoom("in");break;case 16:Z.viewportCurrent.zoom("in");break;case 37:Z.animation&&Z.viewportCurrent.getZoom()==Z.minZ||Z.viewportCurrent.pan("left");break;
case 38:Z.animation&&Z.viewportCurrent.getZoom()==Z.minZ||Z.viewportCurrent.pan("up");break;case 40:Z.animation&&Z.viewportCurrent.getZoom()==Z.minZ||Z.viewportCurrent.pan("down");break;case 39:Z.animation&&Z.viewportCurrent.getZoom()==Z.minZ||Z.viewportCurrent.pan("right");break;case 27:Z.fullView?Z.viewportCurrent.toggleFullViewMode(!1):Z.viewportCurrent.reset()}else"keyup"==b&&(Z.keyIsDown=!1,90==a||17==a||65==a||16==a?Z.viewportCurrent.zoom("stop"):37==a||39==a?Z.viewportCurrent.pan("horizontalStop"):
38!=a&&40!=a||Z.viewportCurrent.pan("verticalStop"))}}function d(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c=Z.Utils.isRightMouseButton(a),d=a.altKey;if(!("mouseover"!=b&&"mouseout"!=b&&Z.interactivityOff||"mousedown"==b&&(Z.interactivityOff||Z.coordinatesVisible&&d)||c)){Z.touchSupport&&!Z.clickZoomAndPanBlock&&"touchmove"!=b&&"gesturechange"!=b&&a.preventDefault();switch(b){case "mouseover":Z.fullView||"TEXTAREA"==document.activeElement.tagName||Z.Viewer.initializeViewerKeyDefaultListeners(!0);
break;case "mouseout":Z.Viewer.initializeViewerKeyDefaultListeners(!1)}var d=Z.Utils.event(a),g=d.type;if(d&&g){var n;a=Z.Utils.target(d);c=Z.Utils.relatedTarget(d);"resize"!=g&&(n=Z.Utils.getMousePosition(d));"DOMMouseScroll"==g&&(g="mousewheel");switch(g){case "mouseover":d=Z.Utils.nodeIsInViewer(a);g=Z.Utils.nodeIsInViewer(c);d&&g||(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!0),Z.NavigatorDisplay&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0),Z.mouseOutDownPoint=null);break;
case "mouseout":d=Z.Utils.nodeIsInViewer(a);g=Z.Utils.nodeIsInViewer(c);d&&g||"[object HTMLSelectElement]"==a||"[object HTMLOptionElement]"==a||"[object HTMLSelectElement]"==c||"[object HTMLOptionElement]"==c||(Z.mouseIsDown?Z.mouseOutDownPoint=new Z.Utils.Point(n.x,n.y):(Z.ToolbarDisplay&&Z.toolbarAutoShowHide&&Z.Toolbar.show(!1),Z.NavigatorDisplay&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1)));break;case "resize":x||(x=window.setTimeout(e,A));break;case "mousewheel":n=Math.max(-1,Math.min(1,
d.wheelDelta||-d.detail)),Z.viewportCurrent.mouseWheelHandler(n)}}if("mousedown"==b||"mousemove"==b)return!1}}}function e(a){x&&(window.clearTimeout(x),x=null,g())}function g(){var a=Z.Utils.getContainerSize(Z.pageContainer,Z.ViewerDisplay),b=Z.viewportCurrent.calculateZoomForResize(Z.viewportCurrent.getZoom(),Z.viewerW,Z.viewerH,a.x,a.y);n.resizeViewer(a.x,a.y,b)}var n=this,q=[];Z.ViewerDisplay=Z.Utils.createContainerElement("div","ViewerDisplay","inline-block","relative","hidden","100%","100%",
"0px","0px","none","0px","transparent none","0px","0px","normal","pointer");Z.pageContainer=document.getElementById(Z.pageContainerID);Z.Utils.getElementStyle(Z.pageContainer);Z.ViewerDisplay.style["-webkit-touch-callout"]="none";Z.ViewerDisplay.style["-moz-user-select"]="none";Z.ViewerDisplay.style["-khtml-user-select"]="none";Z.ViewerDisplay.style["-webkit-user-select"]="none";Z.ViewerDisplay.style["-ms-user-select"]="none";Z.ViewerDisplay.style["-o-user-select"]="none";Z.ViewerDisplay.style["user-select"]=
"none";var v=Z.Utils.getContainerSize(Z.pageContainer,Z.ViewerDisplay);Z.viewerW=v.x;Z.viewerH=v.y;Z.pageContainer.innerHTML="";Z.pageContainer.appendChild(Z.ViewerDisplay);Z.autoResize=!1!==Z.autoResize&&Z.Utils.isElementFluid(Z.pageContainer);var A=parseInt(Z.Utils.getResource("DEFAULT_AUTORESIZESKIPDURATION"),10),x;Z.mouseWheelCompleteDuration=parseInt(Z.Utils.getResource("z165"),10);this.configureViewer=function(){function b(){Z.clearCallback(e,b);n.initializeViewerKeyEventListeners(!0);Z.Utils.addEventListener(Z.ViewerDisplay,
"mouseover",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mouseout",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mousemove",Z.Utils.preventDefault);Z.Utils.addEventListener(Z.ViewerDisplay,"mousewheel",d);Z.Utils.addEventListener(Z.ViewerDisplay,"mousewheel",Z.Utils.preventDefault);a();Z.autoResize&&Z.Utils.addEventListener(window,"resize",d);n.configureComponents(Z.viewportCurrent)}function c(){Z.clearCallback("readyViewer",c)}var e=Z.imageSet?"initializedViewer":"initializedViewport";Z.setCallback(e,
b);Z.setCallback("readyViewer",c);Z.Viewport=new Z.ZoomifyViewport;Z.viewportCurrent=Z.Viewport};this.configureComponents=function(a){0<Z.toolbarVisible&&!Z.Toolbar&&(Z.Toolbar=new Z.ZoomifyToolbar(a));0<Z.navigatorVisible&&!Z.Navigator&&(Z.Navigator=new Z.ZoomifyNavigator(a),Z.Navigator&&Z.Navigator.z682())};this.getVersion=function(){return Z.version};this.setSizeAndPosition=function(a,b,c,d,e){Z.viewerW=a;Z.viewerH=b;Z.ViewerDisplay.style.width=a+"px";Z.ViewerDisplay.style.height=b+"px";Z.Viewport&&
Z.Viewport.getStatus("initialized")&&Z.Viewport.setSizeAndPosition(a,b,c,d);b=1==Z.toolbarPosition?b-Z.toolbarH:0;Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&(Z.Toolbar.setSizeAndPosition(a,null,null,b),Z.toolbarAutoShowHide&&Z.Toolbar.show(!0));Z.NavigatorDisplay&&Z.Navigator.getInitialized()&&(Z.Navigator.setSizeAndPosition(null,null,c,d,Z.navigatorFit),1<Z.navigatorVisible&&Z.Navigator.setVisibility(!0));e&&Z.Viewport.updateView(!0)};this.getImagePath=function(){return n.getImage()};this.getImage=
function(){return Z.imagePath};this.setImagePath=function(a,b){"undefined"!==typeof b&&Z.Utils.stringValidate(b)&&(Z.imageProperties=b);n.setImage(a)};this.setImage=function(a,b,c){Z.Viewport&&(Z.Viewport.getStatus("initialized")||c)&&(Z.Viewport.zoomAndPanAllStop(!0),Z.Utils.clearImageParameters(),Z.imagePath=Z.Utils.stringRemoveTrailingSlashCharacters(a),Z.Utils.validateImagePath(),Z.Viewport.setImagePath(Z.imagePath),"undefined"!==typeof b&&(Z.parameters=Z.Utils.parseParameters(b)),c&&Z.Utils.setParameters(Z.parameters),
"unconverted"==Z.tileSource?Z.Viewport.loadUnconvertedImage(a):Z.imageProperties?(a=Z.Utils.xmlConvertTextToDoc(Z.imageProperties),Z.Viewport.z602(a)):(a=new Z.NetConnector,Z.Viewport.loadImageProperties(Z.imagePath,a)))};this.setImageWithFade=function(a,b,c){Z.Viewport&&(Z.Viewport.getStatus("initialized")||c)&&(Z.slideTransitionTimeout=window.setTimeout(function(){Z.Viewport.slideTransitionTimeoutHandler("out",a,b,c)},50))};this.getStatus=function(a){a=Z.Utils.arrayIndexOfObjectValue(q,"state",
a);return-1==a?!1:q[a].status};this.setStatus=function(a,b){var c=!1,d=Z.Utils.arrayIndexOfObjectValue(q,"state",a);-1==d?(c=b,q[q.length]={state:a,status:b}):(!q[d].status&&b&&(c=!0),q[d].status=b);c&&(Z.Utils.validateCallback(a+"Viewer"),n.validateViewerReady(a))};this.validateViewerStatus=function(a){var b=!0;if(Z.imageSet)for(var c=0,d=Z.imageSetLength;c<d;c++)if(!Z["Viewport"+c.toString()].getStatus(a)){b=!1;break}b&&n.setStatus(a,!0)};this.validateViewerReady=function(a){a=Z.Viewport&&Z.Viewport.getStatus("initialized")&&
("unconverted"==Z.tileSource||Z.Viewport.getStatus("precacheLoaded")&&Z.Viewport.getStatus("backfillLoaded")&&Z.Viewport.getStatus("backfillDrawn"))&&Z.Viewport.getStatus("displayLoaded")&&Z.Viewport.getStatus("displayDrawn");var b=!Z.hotspots||Z.Viewport.getStatus("hotspotsLoaded"),c=!Z.annotations||Z.Viewport.getStatus("annotationsLoaded")&&Z.Viewport.getStatus("annotationPanelInitialized"),d=0==Z.ToolbarVisible||Z.Toolbar&&Z.Toolbar.getInitialized(),e=!Z.NavigatorVisible||Z.Navigator&&Z.Navigator.getInitialized(),
g=!Z.RulerVisible||Z.Ruler&&Z.Ruler.getInitialized(),r=!Z.imageSet||Z.Viewer&&Z.Viewer.getStatus("initialized")&&("unconverted"==Z.tileSource||Z.Viewer.getStatus("precacheLoaded")&&Z.Viewer.getStatus("backfillLoaded")&&Z.Viewer.getStatus("backfillDrawn"))&&Z.Viewer.getStatus("displayLoaded")&&Z.Viewer.getStatus("displayDrawn"),n=!Z.imageSet||!Z.hotspots||Z.Viewer&&Z.Viewer.getStatus("hotspotsLoaded"),q=!Z.imageSet||!Z.annotations||Z.Viewer&&Z.Viewer.getStatus("annotationsLoaded")&&Z.Viewer.getStatus("annotationPanelInitialized");
(a=a&&b&&c&&d&&e&&g&&r&&n&&q)&&Z.Viewer.setStatus("ready",!0);return a};this.initializeViewerKeyEventListeners=function(a){a?(Z.Utils.addEventListener(document,"keydown",c),Z.Utils.addEventListener(document,"keyup",c)):(Z.Utils.removeEventListener(document,"keydown",c),Z.Utils.removeEventListener(document,"keyup",c))};this.initializeViewerKeyDefaultListeners=function(a){a?(Z.Utils.addEventListener(document,"keydown",Z.Utils.preventDefault),Z.Utils.addEventListener(document,"keyup",Z.Utils.preventDefault)):
(Z.Utils.removeEventListener(document,"keydown",Z.Utils.preventDefault),Z.Utils.removeEventListener(document,"keyup",Z.Utils.preventDefault))};this.autoResizeViewer=function(){g()};this.resizeViewer=function(a,b,c){n.setSizeAndPosition(a,b,0,0,!1);Z.viewportCurrent.resizeViewport(Z.imageX,Z.imageY,c,Z.imageR)};this.z586=function(a){Z.mouseWheelIsDown=!1;Z.mouseWheelCompleteTimer&&(window.clearTimeout(Z.mouseWheelCompleteTimer),Z.mouseWheelCompleteTimer=null,Z.zooming="stop",Z.viewportCurrent.updateView(!0))}};
Z.ZoomifyViewport=function(a,b,c,d){function e(a,b,l,f,c,d,h,e,k,t,B){v();Z.imageW=a;Z.imageH=b;Z.imageCenterX=Z.imageW/2;Z.imageCenterY=Z.imageH/2;Vb=c;ya=l;za=f;D();A(Q,N,ec,Mb);m.validateXYZDefaults();ua>fc?(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&&0<Z.navigatorVisible&&Z.Navigator.setImage(Z.imagePath)}function n(){ua=1;ia=I=0;fa=!1;"undefined"!==typeof wa&&Z.Utils.arrayClear(wa);"undefined"!==typeof Ca&&Z.Utils.arrayClear(Ca);"undefined"!==typeof na&&Z.Utils.arrayClear(na);"undefined"!==typeof Da&&Z.Utils.arrayClear(Da);"undefined"!==typeof Ea&&Z.Utils.arrayClear(Ea);"undefined"!==typeof Ab&&Z.Utils.arrayClear(Ab);"undefined"!==typeof tierTileOffsetsCount&&
Z.Utils.arrayClear(tierTileOffsetsCount);"undefined"!==typeof tierTileOffsetChunks&&Z.Utils.arrayClear(tierTileOffsetChunks);"undefined"!==typeof tierTileOffsetLast&&Z.Utils.arrayClear(tierTileOffsetLast);"undefined"!==typeof rb&&Z.Utils.arrayClear(rb);"undefined"!==typeof tierTileByteCountsCount&&Z.Utils.arrayClear(tierTileByteCountsCount);"undefined"!==typeof tierTileByteCountChunks&&Z.Utils.arrayClear(tierTileByteCountChunks);"undefined"!==typeof tierTileByteCountLast&&Z.Utils.arrayClear(tierTileByteCountLast)}
function q(a){if("undefined"===typeof a||null===a)a=0;a=a.toString();Z.useCanvas&&!J&&(Qb=Z.Utils.createContainerElement("canvas","oversizeDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),Z.ViewerDisplay.appendChild(Qb),J=Qb,Ta=J.style);O||(sb=Z.Utils.createContainerElement("div","viewportContainer"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),Z.ViewerDisplay.appendChild(sb),
O=sb,w=O.style);V||(gc=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportBackfillDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),sb.appendChild(gc),V=gc,L=V.style);ba||(hc=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),sb.appendChild(hc),ba=hc,ja=ba.style);Z.useCanvas&&
!La&&(ic=Z.Utils.createContainerElement("canvas","transitionCanvas","none","absolute","visible","1px","1px","0px","0px","none","0px","transparent none","0px","0px","normal"),sb.appendChild(ic),La=ic,Ib=La.style);Z.useCanvas||(V.innerHTML="",ba.innerHTML="")}function v(){J&&(ha=J.getContext("2d"));tb=V.getContext("2d");ka=ba.getContext("2d");Jb=La.getContext("2d")}function A(a,b,l,f){if("undefined"===typeof l||null===l)l=0;if("undefined"===typeof f||null===f)f=0;Z.viewerW=Q=a;Z.viewerH=N=b;da=Q*Fc;
ea=N*Fc;a=Z.imageSet?Zc:"unconverted"==Z.tileSource&&Z.browser==Z.browsers.FIREFOX?$c:ad;b=Z.constrainPanStrict?Z.imageW:2*Z.imageW;var c=Z.constrainPanStrict?Z.imageH:2*Z.imageH;da>a&&(da=a);ea>a&&(ea=a);da>b&&(da=b);ea>c&&(ea=c);da<Q&&(da=Q);ea<N&&(ea=N);$a=Z.Utils.roundToFixed(da/2,4);ab=Z.Utils.roundToFixed(ea/2,4);sa=Z.Utils.roundToFixed(-((da-Q)/2)+l,4);Z.Utils.roundToFixed((da-Q)/2+l,4);ta=Z.Utils.roundToFixed(-((ea-N)/2)+f,4);Z.Utils.roundToFixed((ea-N)/2+f,4);J&&(J.width=Q,J.height=N,Ta.width=
Q+"px",Ta.height=N+"px",Ta.left="0px",Ta.top="0px");O.width=da;O.height=ea;w.width=da+"px";w.height=ea+"px";w.left=sa+"px";w.top=ta+"px";ba.width=da;ba.height=ea;ja.width=da+"px";ja.height=ea+"px";if(Z.useCanvas){J&&(ha.translate(Q/2,N/2),ha.save());try{ka.translate($a,ab)}catch(d){Z.Utils.showMessage(Z.Utils.getResource("ERROR_TRANSLATINGCANVASFORUNCONVERTEDIMAGE")),console.log("In function setSizeAndPosition translating canvas:  "+d)}ka.save()}}function x(a,b,l){if("ZoomifyImageFile"==Z.tileSource){l=
parseFloat(Z.Utils.getResource("z125"));var f=parseFloat(Z.Utils.getResource("z124"));b.loadByteRange(a,l,f,"header")}else"ZoomifyImageFolder"==Z.tileSource&&(a=Z.Utils.cacheProofPath(a+"/ImageProperties.xml"),b.loadXML(a,l))}function y(a,b){n();if("undefined"===typeof m.getStatus)window.setTimeout(function(){y(a,b)},100);else{var l=null,f=null,c=null,d=null,h=null,k=null;"ZoomifyImageFolder"==Z.tileSource&&(l=parseInt(a.documentElement.getAttribute("WIDTH"),10),f=parseInt(a.documentElement.getAttribute("HEIGHT"),
10),h=parseInt(a.documentElement.getAttribute("NUMTILES"),10),parseInt(a.documentElement.getAttribute("NUMIMAGES"),10),k=parseInt(a.documentElement.getAttribute("VERSION"),10),c=d=parseInt(a.documentElement.getAttribute("TILESIZE"),10));null!==Z.tileW&&(c=Z.tileW);null!==Z.tileH&&(d=Z.tileH);if("ZoomifyImageFolder"==Z.tileSource||"ImageServer"==Z.tileSource){if(null===c||isNaN(c))c=ya;if(null===d||isNaN(d))d=za;if(null===h||isNaN(h))h=1}!isNaN(l)&&0<l&&!isNaN(f)&&0<f&&!isNaN(c)&&0<c&&!isNaN(d)&&0<
d&&0<h?m.getStatus("initialized")?g(l,f,c,d,h,k,null,null,null,null,null,b):e(l,f,c,d,h,k,null,null,null,null,null,b):"ZoomifyImageFolder"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z252")):Z.Utils.showMessage(Z.Utils.getResource("z250"))}}function D(){if("unconverted"==Z.tileSource)wa[0]=Z.imageW,Ca[0]=Z.imageH,na[0]=1,Da[0]=1,ua=Ea[0]=1;else if("ZoomifyImageFile"==Z.tileSource)for(var a=ua-1;0<=a;a--)na[a]=Math.ceil(wa[a]/ya),Da[a]=Math.ceil(Ca[a]/za),Ea[a]=na[a]*Da[a];else{for(var a=
Z.imageW,b=Z.imageH;a>ya||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<qa.length&&(I==Wb||I==Xb||I==Rb))for(b=0,l=qa.length;b<l;b++)(f=qa[b])&&f.t==I&&f.c>=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<l;b++)(f=va[b])&&f.t==I&&f.c>=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<l;b++)f=Ja[b],f.alpha=1;Z.Utils.arrayClear(Ja);Z.Utils.arrayClear(Za)}Pb=W.length;m.traceDebugValues("tilesToDisplay",null,kb.length,kb);m.traceDebugValues("tilesInCache",
null,Ya.length,Ya);m.traceDebugValues("tilesToLoad",null,W.length,W)}}function C(a,b,l,f,c,d){c||Z.Utils.clearDisplay(a);if("canvasCopy"==f)Z.Utils.clearDisplay(ba),ka.restore(),ka.save(),ka.scale(1,1),ka.drawImage(La,-$a,-ab),ka.restore(),ka.save(),ka.scale(R,R);else{c=m.z542(b);d=[];if(null===l)for(var h=0,e=lb.length;h<e;h++)d[h]=lb[h];else if(0<l.length)for(h=0,e=l.length;h<e;h++){var k=l[h];k&&k.t==b&&(b==ia&&!fa||k.c>=c.l&&k.c<=c.r&&k.r>=c.t&&k.r<=c.b)&&(d[d.length]=l[h])}if(0<d.length)if(m.traceDebugValues("z622-"+
a.id,null,null,d),"centerOut"==f)for(h=Math.floor(d.length/2),e=d.length;h<e;h++)P(a,b,d[h]),d.length-h-1!=h&&P(a,b,d[d.length-h-1]);else for(h=0,e=d.length;h<e;h++)P(a,b,d[h]);else m.traceDebugValues("No cached tiles in view");m.traceDebugValues("blankLine")}}function U(a,b){var l=m.z542();syncTransitionCanvas();for(var f=0,c=b.length;f<c;f++){var d=b[f];d&&d.t==a&&(a==ia||d.c>=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(0<a.length){m.traceDebugValues("z577"+c,null,null,a);c=(new Date).getTime();if("centerOut"==l&&4<a.length){var d=[],e=0,k=0,t=0,B=0;for(l=0;l<a.length;l++){var g=a[l];g&&(g=new h(g,f),d[d.length]=g,0==l?(e=k=g.c,t=B=g.r):(g.c<e?e=g.c:g.c>k&&(k=g.c),g.r<t?t=g.r:g.r>B&&(B=g.r)))}a=e+(k-e)/2;f=t+(B-t)/2;for(l=0;l<d.length;l++)d[l].r-=f,d[l].c-=a;d.sort(function(a,b){return a.r*a.r+a.c*a.c-(b.r*b.r+b.c*b.c)});for(l=0;l<d.length;l++)d[l].r+=
f,d[l].c+=a,Ra(d[l],c,b)}else for(l=0,d=a.length;l<d;l++)if(g=a[l])g=new h(g,f),Ra(g,c,b);m.traceDebugValues("blankLine")}else m.traceDebugValues("z577"+c,"No new tiles requested")}function h(a,b){this.name=a;var l=new ca(a);this.t=l.t;this.c=l.c;this.r=l.r;this.x=Math.floor(this.c*ya);this.y=Math.floor(this.r*za);this.image=null;this.alpha=0;this.url=m.formatTilePath(this.t,this.c,this.r,b);this.style=this.elmt=this.loadTime=null}function ca(a){this.t=parseInt(a.substring(0,a.indexOf("-")),10);this.c=
parseInt(a.substring(a.indexOf("-")+1,a.lastIndexOf("-")),10);this.r=parseInt(a.substring(a.lastIndexOf("-")+1),10)}function k(a,b,l){l=b+l*na[a];b=8*l+Ab[a];l=Math.floor(l/ub);var f=l*ub,f=f+ub>Ea[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;l<f;l++){var c=ma[l].split(",");c[0]==a&&c[5]==b&&(void 0!==c[4]&&"image-display"==c[4]?Ka[Ka.length]=c[1]+"-"+c[2]+"-"+c[3]:"image-backfill"==c[4]&&(Qa[Qa.length]=c[1]+"-"+c[2]+"-"+c[3]),ma=Z.Utils.arraySplice(ma,l,1),l--,f--)}0<Ka.length&&(Ka.sort(),Ka=Z.Utils.arrayUnique(Ka),m.traceDebugValues("z637",Ka),l=xa,vb(Ka,l,"simple","image-display"));0<Qa.length&&
(Qa.sort(),Qa=Z.Utils.arrayUnique(Qa),l=oa,vb(Qa,l,"simple","image-backfill"))}function vb(a,b,l,f){l=(new Date).getTime();for(var c=0,d=a.length;c<d;c++){var e=null;if(e=a[c])if(a=Z.Utils.arraySplice(a,c,1),c--,d--,index=Z.Utils.arrayIndexOfObjectValue(mb,"name",e),-1!=index?(e=mb[index],mb=Z.Utils.arraySplice(mb,index,1),e.url=m.formatTilePath(e.t,e.c,e.r,f)):e=new h(e,f),null!=e&&-1==e.url.indexOf("NaN"))m.traceDebugValues("z577Retry",e.name+"  "+e.url),Ra(e,l,b);else if(-1==e.url.indexOf("NaN")){var k=
parseInt(Z.Utils.getResource("z268MEDIUM"),10);Z.Utils.showMessage(Z.Utils.getResource("z280-ZIF")+e.name+".jpg",!1,k,"center",!1)}}}function Ra(a,b,l){var f=a.name;if("z647"==a.url.substr(0,8)){B(a);b=a.name;l=Z.Utils.arrayIndexOf(W,b);-1!=l&&(W=Z.Utils.arraySplice(W,l,1));if("ZoomifyImageFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)l=Z.Utils.arrayIndexOf(Ka,b),-1!=l&&(Ka=Z.Utils.arraySplice(Ka,l,1));Ja[Ja.length]=a;Za[Za.length]=b}else if("offsetLoading"==a.url)-1==Z.Utils.arrayIndexOfObjectValue(mb,
"name",f)&&(mb[mb.length]=a),m.traceDebugValues("z581DelayForOffset",f);else if("offsetLoading"!=a.url){var c;l==xa?c="image-display":l==oa&&(c="image-backfill");var d=a.t==Wb&&Ic||a.t==Xb&&Jc||a.t==Rb&&Kc;"image-display"==c&&d||(a.loadTime=b,m.traceDebugValues("z581-"+c,f),bd.loadImage(a.url,Z.Utils.createCallback(null,l,a),c,a))}}function xa(a,b){if(a&&b){a.image=b;var l=a.name,f=Z.Utils.arrayIndexOf(W,l);if(-1!=f){W=Z.Utils.arraySplice(W,f,1);B(a);-1==Z.Utils.arrayIndexOf(Za,l)&&(Za[Za.length]=
l,Ja[Ja.length]=a);Yb||(Yb=window.setInterval(F,50));Ob=W.length;if(0==Ob){Z.useCanvas&&0<Bb&&(jc?(U(I,va),C(ba,I,va,"canvasCopy",!1,"4. Updating view: all new tiles loaded"),window.setTimeout(function(){Z.Utils.clearDisplay(La)},200),jc=!1):C(ba,I,va,"centerOut",!1,"4. Updating view: all new tiles loaded"));for(;Xa.length>Bb&&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;b<l;b++){var f=Ja[b];f.t==I?(0!=pc&&1>f.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=8<pa;Z.useCanvas?(a==ba||a==La||a==V&&fa?(f-=Z.imageX*b,c-=Z.imageY*b):a==J&&(fa||d)&&(d=m.calculateCurrentCenterCoordinates(),f-=d.x*b,c-=d.y*b),b=a.getContext("2d"),Z.alphaSupported&&1>l.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<Z.minZ&&(a=Z.minZ,Z.Utils.validateCallback("zoomConstrainedMin"));return a}function B(a){if(0<Bb){var b=Z.Utils.arrayIndexOf(Xa,a.name);-1!=b&&(Xa=Z.Utils.arraySplice(Xa,b,1),va=Z.Utils.arraySplice(va,b,1));Xa[Xa.length]=
a.name;va[va.length]=a}}function Ma(){window.clearTimeout(Kb);Kb=null;Db=((new Date).getTime()-tilesTimeStart)/1E3;var a=$b*Db,a=Eb&&Cb<a,b=Eb&&Cb>=ac;if(2==Z.debug||3==Z.debug)Z.Utils.trace("View validation-time elapsed: "+Db),0<Eb&&(a?Z.Utils.trace("Loading delay - re-calling updateView"):b?Z.Utils.trace("Display delay - re-calling updateView"):Z.Utils.trace("Progress slow, resetting timer")),Z.Utils.trace(""),Z.traces.scrollTop=Z.traces.scrollHeight,Z.Utils.traceTileSpeed(Db,$b);0<Eb?bc<cd?a||
b?(bc+=1,m.updateView(!0)):Kb=window.setTimeout(Ma,Mc):console.log(Z.Utils.getResource("ERROR_VALIDATEVIEW")):(bc=0,Z.Utils.validateCallback("viewUpdateComplete"),Z.Utils.validateCallback("viewUpdateCompleteGetLabelIDs"))}function cc(a){Z.preventDupCall||(Z.priorX=Z.imageX,Z.priorY=Z.imageY,Z.priorZ=Z.imageZ,Z.priorR=Math.round(Z.imageR));Z.preventDupCall="undefined"!==typeof a&&null!==a}function Nb(a,b,c,f,d,h){h||m.zoomAndPanAllStop();if("undefined"===typeof a||null===a)a=Z.imageW/2;if("undefined"===
typeof b||null===b)b=Z.imageH/2;"undefined"===typeof c||null===c?c=Z.fitZ:1<c&&(c/=100);if("undefined"===typeof f||null===f)f=Z.imageR;c=Va(c);f=90*Math.round(Math.abs(f)/90)*Z.Utils.getSign(f);-360>=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);Sb<h+1&&!r?wb=window.setTimeout(function(){Oc(a,b,c,f,d,h,e)},k):(r&&(Z.tourPlaying=!1),Z.interactivityOff=!1,wb&&(window.clearTimeout(wb),wb=null),m.updateView(),"function"===typeof e&&e())}function Y(){Nc=Na=Ha=Ga=0;ob&&(window.clearTimeout(ob),ob=null)}function K(a,b){var c=!1,f=la(I,a);if(f!=R){R=f;var c=f/ib,d=da*c,h=ea*c,e=(da-d)/2,k=(ea-h)/2;f<ib&&(f=Fa(parseFloat(w.left),parseFloat(w.top),a,Z.imageR,"container"),w.left=f.x+"px",
w.top=f.y+"px");if(Z.useCanvas)if(ja.width=d+"px",ja.height=h+"px",ja.left=e+"px",ja.top=k+"px",pa=la(Ba,m.getZoom()),f=8<pa,fa||f){if(null!==ha&&"undefined"===typeof b||null===b||b&&J&&("in"!=Z.zooming||d>Z.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&&1<Z.smoothPanEasing&&(eb(void 0),xc=Ia,null===Tb&&(Tb=new Z.Utils.Point(parseFloat(w.left),parseFloat(w.top))),null===fb&&(fb=window.setInterval(ed,50)));break;case "mousemove":xb=new Z.Utils.Point(f.x,f.y);G&&(clearTimeout(G),G=null);!h&&Z.mousePan&&(fb?Fb=f:
Z.animation&&m.getZoom()==Z.minZ?(f.x>O.mouseXPrior?Z.Viewer.viewportNext():f.x<O.mouseXPrior&&Z.Viewer.viewportPrior(),O.mouseXPrior=f.x,O.mouseYPrior=f.y):(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 "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&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1))}break;case "touchcancel":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))"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&&1<Z.navigatorVisible&&Z.Navigator.setVisibility(!1))}break;case "gesturestart":fd(a);
pb||(pb=window.setInterval(gd,hd));break;case "gesturechange":yc=Math.round(100*a.scale)/100;break;case "gestureend":pb&&(window.clearInterval(pb),Ub=!0,pb=null),Z.mousePan&&m.updateView()}}}function eb(a){null!==fb&&a&&(window.clearInterval(fb),fb=null);Tb=zc=Ac=Wa=null;gb=hb=yb=zb=0}function ed(a){if(!Z.animation||m.getZoom()!=Z.minZ){var b=parseFloat(w.left),c=parseFloat(w.top);if(Z.mouseIsDown||Wa){var f=(Wa?zc:Fb.x)-xc.x,d=(Wa?Ac:Fb.y)-xc.y,h=b-Tb.x,k=c-Tb.y;if(!(isNaN(f)||isNaN(d)||isNaN(h)||
isNaN(k)||0==f&&0==d&&0==h&&0==k)){var e=Wa?Z.smoothPanGlide:1;a=Wa?1:100;gb=Math.round((f-h)/(Z.smoothPanEasing*e)*a/a);hb=Math.round((d-k)/(Z.smoothPanEasing*e)*a/a);Z.mouseIsDown?(yb=gb,zb=hb):(Math.abs(gb)>Math.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;h<c;h++)switch(k=b+8+20*h,Z.Utils.shortValue(a,k)){case 256:wa[d-1]=Z.Utils.intValue(a,k+12);break;case 257:Ca[d-1]=Z.Utils.intValue(a,k+12);break;case 322:t=Z.Utils.intValue(a,k+12);break;case 323:B=Z.Utils.intValue(a,k+12);break;case 324:var p=tierTileOffsetsCount[d-1]=Z.Utils.longValue(a,k+4);Ab[d-1]=Z.Utils.longValue(a,k+12);r+=p;break;case 325:p=tierTileByteCountsCount[d-1]=Z.Utils.longValue(a,k+4),rb[d-1]=1==p?Z.Utils.intValue(a,
k+12):2==p?Z.Utils.intValue(a,k+12)+","+Z.Utils.intValue(a,k+16):Z.Utils.longValue(a,k+12)}b=Z.Utils.longValue(a,b+20*c+8);c=Z.Utils.longValue(a,b);d++}h=wa[0];k=Ca[0];ua=d-1;wa.reverse();Ca.reverse();tierTileOffsetsCount.reverse();Ab.reverse();tierTileByteCountsCount.reverse();rb.reverse();!isNaN(h)&&0<h&&!isNaN(k)&&0<k&&!isNaN(t)&&0<t&&!isNaN(B)&&0<B&&0<r?"undefined"!==typeof m.getStatus?e(h,k,t,B,r,ca,null,null,null,null,null):g(h,k,t,B,r,ca,null,null,null,null,null):"ZoomifyImageFolder"==Z.tileSource?
Z.Utils.showMessage(Z.Utils.getResource("z252")):Z.Utils.showMessage(Z.Utils.getResource("z250"))}};this.parseZIFOffsetChunk=function(a,b){var c=Z.Utils.arrayIndexOfObjectValue(tierTileOffsetChunks,"chunkID",b);-1!=c&&(tierTileOffsetChunks[c].chunk=a,M(b,"offset"))};this.parseZIFByteCountChunk=function(a,b){var c=Z.Utils.arrayIndexOfObjectValue(tierTileByteCountChunks,"chunkID",b);-1!=c&&(tierTileByteCountChunks[c].chunk=a,M(b,"byteCount"))};this.parseZIFImage=function(a,b,c){a="data:image/jpeg;base64,"+
Z.Utils.encodeBase64(a);var d;"image-display"==c?d=xa:"image-backfill"==c?d=oa:"navigator"==c&&(d=Z.Navigator.z556);b=Z.Utils.createCallback(null,d,b);Z.Utils.createImageElementFromBytes(a,b)};this.z602=function(a){y(a)};this.validateXYZDefaults=function(a){a&&Z.Utils.resetParametersXYZ(Z.parameters);var b=parseFloat(Z.Utils.getResource("z143")),c=parseFloat(Z.Utils.getResource("z144")),d=parseFloat(Z.Utils.getResource("z145")),h=parseFloat(Z.Utils.getResource("DEFAULT_INITIALR")),k=parseFloat(Z.Utils.getResource("z163"));
a=parseFloat(Z.Utils.getResource("z153"));b=isNaN(b)?null:b;c=isNaN(c)?null:c;d=isNaN(d)?null:d;h=isNaN(h)?null:h;k=isNaN(k)?null:k;a=isNaN(a)?null:a;Z.parameters?(Z.parameters.zInitialX||(Z.initialX=b),Z.parameters.zInitialY||(Z.initialY=c),Z.parameters.zInitialZoom||(Z.initialZ=d),Z.parameters.zInitialRotation||(Z.initialR=h),Z.parameters.zMinZoom||(Z.minZ=k),Z.parameters.zMaxZoom||(Z.maxZ=a)):(Z.initialX=b,Z.initialY=c,Z.initialZ=d,Z.initialR=h,Z.minZ=k,Z.maxZ=a);null===Z.initialX&&(Z.initialX=
Z.imageW/2);null===Z.initialY&&(Z.initialY=Z.imageH/2);Z.fitZ=m.z468(0);Z.fillZ=m.calculateZoomToFill(0);b=m.getStatus("initialized")?m.getRotation():Z.initialR;a=m.z468(b);b=m.calculateZoomToFill(b);1<Z.fitZ&&(null!==Z.maxZ?Z.fitZ>Z.maxZ&&(Z.fitZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fitZ=1));1<Z.fillZ&&(null!==Z.maxZ?Z.fillZ>Z.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.initialZ<Z.minZ&&(Z.initialZ=Z.minZ);Z.initialZ>Z.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&&a<Z.viewportCurrentID+1){cc();var k=!1;if(b||parseFloat(ja.width)!=ba.width){if(Z.useCanvas){ja.width=ba.width+"px";ja.height=ba.height+"px";ja.left="0px";ja.top="0px";ka.restore();ka.save();
try{ka.scale(R,R)}catch(e){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE")),console.log("In function z630 scaling canvas:  "+e)}V&&(fa?(L.width=V.width+"px",L.height=V.height+"px",L.left=Oa+"px",L.top=Pa+"px",tb.restore(),tb.save(),tb.scale(Ua,Ua)):(L.width=cb+"px",L.height=db+"px",L.left=Oa+"px",L.top=Pa+"px"))}k=!0}if(b||parseFloat(w.left)!=sa||parseFloat(w.top)!=ta)k=parseFloat(w.left)-sa,c=parseFloat(w.top)-ta,0!=Z.imageR&&(c=Z.Utils.rotatePoint(k,c,Z.imageR),
k=c.x,c=c.y),w.left=sa+"px",w.top=ta+"px",fa||(Oa=parseFloat(L.left)+k,Pa=parseFloat(L.top)+c,L.left=Oa+"px",L.top=Pa+"px"),h=m.getZoom(),Z.imageX=rc=Z.imageX-k/h,Z.imageY=sc=Z.imageY-c/h,k=!0;k&&(C(ba,I,va,"centerOut",!1,"1a. Updating view: resetting display positions"),fa&&C(V,ia,qa,"simple",!1,"1b. Updating view: resetting backfill positions"));k=!1;if("undefined"!==typeof b&&b||R!=ib||m.getZoom()!=Z.imageZ||!m.getStatus("initialized")){R!=ib&&(Z.imageZ=m.getZoom());Z.imageZ<Z.minZ&&(Z.imageZ=
Z.minZ);Z.imageZ>Z.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&&0<Bb&&(k=!0)}else m.traceDebugValues("updateView-noChange");"unconverted"!=
Z.tileSource&&fa?aa(!0):J&&Z.Utils.clearDisplay(J)}Z.imageSet&&a!=Z.viewportCurrentID?(m.setStatus("displayLoaded",!0),m.setStatus("displayDrawn",!0)):("unconverted"!=Z.tileSource?(aa(),C(ba,I,null,"centerOut",k,"3. Updating view: prior to loading of any new tiles")):"undefined"!==typeof Aa&&(b=-Z.imageX,k=-Z.imageY,Z.Utils.clearDisplay(ba),ka.drawImage(Aa,b,k)),0<W.length&&ga(W,xa,"centerOut","image-display"),m.syncViewportRelated());f&&Z.Utils.validateCallback("viewPanned");d&&Z.Utils.validateCallback("viewZoomed");
(f||d)&&Z.Utils.validateCallback("viewChanged")}};syncTransitionCanvas=function(){La&&Ib&&Jb&&(La.width=ba.width,La.height=ba.height,Ib.width=ja.width,Ib.height=ja.height,Ib.left=ja.left,Ib.top=ja.top,Jb.restore(),Jb.save(),Jb.translate($a,ab),Jb.scale(R,R))};this.loadUnconvertedImage=function(a){r(a)};this.getUnconvertedImage=function(){return Aa};this.createUnconvertedImageThumbnail=function(){if(Z.useCanvas){if("undefined"!==typeof Aa){var a=null,a=150/Z.imageW,b=Z.Utils.createContainerElement("canvas",
"tempCanvas","inline-block","absolute","visible",Z.imageW*a+"px",Z.imageH*a+"px","0px","0px","none","0px","transparent none","0px","0px","normal"),c=b.getContext("2d");try{c.scale(a,a),c.drawImage(Aa,0,0)}catch(d){console.log("In function initializeViewportContinue scaling canvas:  "+d)}a=new Image;a.src=b.toDataURL("image/jpeg",Z.saveImageCompression);return a}window.setTimeout(function(){createUnconvertedImageThumbnail()},100)}};this.formatTilePath=function(a,b,c,d){var h;if("ZoomifyImageFile"==
Z.tileSource){h="offsetLoading";var e="loading",B="loading",g;if(1==tierTileOffsetsCount[a])e=Ab[a];else{var r=new k(a,b,c),p=r.chunkID+","+a+","+b+","+c+","+d+",offset";g=Z.Utils.arrayIndexOfObjectValue(tierTileOffsetChunks,"chunkID",r.chunkID);-1==g?(m.traceDebugValues("z532",r.chunkID+","+a+","+b+","+c+","+d),-1==Z.Utils.arrayIndexOf(ma,p)&&(ma[ma.length]=p),tierTileOffsetChunks[tierTileOffsetChunks.length]={chunkID:r.chunkID,chunk:"loading"},g=new Z.NetConnector,g.loadByteRange(qb,r.chunkStart,
r.chunkEnd,"offset",null,r.chunkID)):"loading"==tierTileOffsetChunks[g].chunk?-1==Z.Utils.arrayIndexOf(ma,p)&&(ma[ma.length]=p):"loading"!=tierTileOffsetChunks[g].chunk&&(g=tierTileOffsetChunks[g].chunk,e=Z.Utils.longValue(g,r.offsetStartInChunk))}1==tierTileByteCountsCount[a]?B=rb[a]:(g=b+c*na[a],2==tierTileByteCountsCount[a]?(a=rb[a],B=0==g?a.substring(0,a.indexOf(",")):a.substring(a.indexOf(",")+1,a.length)):(r=new t(a,b,c),a=r.chunkID+","+a+","+b+","+c+","+d+",byteCount",g=Z.Utils.arrayIndexOfObjectValue(tierTileByteCountChunks,
"chunkID",r.chunkID),-1==g?(-1==Z.Utils.arrayIndexOf(ma,a)&&(ma[ma.length]=a),tierTileByteCountChunks[tierTileByteCountChunks.length]={chunkID:r.chunkID,chunk:"loading"},g=new Z.NetConnector,g.loadByteRange(qb,r.chunkStart,r.chunkEnd,"byteCount",null,r.chunkID)):"loading"==tierTileByteCountChunks[g].chunk?-1==Z.Utils.arrayIndexOf(ma,a)&&(ma[ma.length]=a):"loading"!=tierTileByteCountChunks[g].chunk&&(g=tierTileByteCountChunks[g].chunk,B=Z.Utils.intValue(g,r.bcStartInChunk))));"loading"==e||isNaN(e)||
"loading"==B||isNaN(B)||(h=qb+"?"+e.toString()+","+B.toString())}else if("ZoomifyImageFolder"==Z.tileSource){h=c*na[a]+b;for(e=0;e<a;e++)h+=Ea[e];a=qb+"/TileGroup"+Math.floor(h/256)+"/"+a+"-"+b+"-"+c+"."+Z.tileType;if(Z.browser==Z.browsers.IE&&9>Z.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-h<k?e=Z.fitZ:d>1+k?e=u(c,1):0<c?e=
u(c-1,1):"unconverted"==Z.tileSource&&(e=Z.fitZ)):a?e=1:d<1-k?e=u(c,1):c<ua-1&&(e=u(c+1,1));return new Z.Utils.Point3D(b.x,b.y,e)};this.calculateCurrentCenterCoordinates=function(a,b,c){if("undefined"===typeof a||null===a)a=new Z.Utils.Point(parseFloat(w.left),parseFloat(w.top));if("undefined"===typeof c||null===c)c=Z.imageR;0>c&&(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;k<e;k++){var t=hotspots[k],B=new HotspotDimensions(t,a,null,!0),g=t.x-B.w/2,m=t.x+B.w/2,r=t.y-B.h/2,t=t.y+B.h/2;g<b&&(b=g);m>c&&(c=m);r<d&&(d=r);t>h&&(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;e<d&&t<h?k=a:e==d&&t<h?k=-1:e<d&&t==h?k=-1:e>d&&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=b<c?b:c),k=a*d);k<Z.minZ&&(k=Z.minZ);k>Z.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<Na?"in":"out";0!=Na?ob||(ob=window.setTimeout(tc,uc)):(Y(),m.updateView())}};this.pan=function(a){if("horizontalStop"!=
a||"stop"!=Z.panningX)if("verticalStop"!=a||"stop"!=Z.panningY){switch(a){case "left":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":0<Ga?"left":"right";Z.panningY=0==Ha?"stop":0<Ha?"up":"down";u(I,1);u(I,1);0!=Ga||0!=Ha?ob||(ob=window.setTimeout(tc,uc)):(Y(),m.updateView())}};this.zoomAndPanToView=function(a,b,c,d,
h,k,e){m.zoomAndPanAllStop();if(Z.clickZoomAndPanBlock)Z.clickZoomAndPanBlock=!1;else{if("undefined"===typeof a||null===a)a=Z.imageX;if("undefined"===typeof b||null===b)b=Z.imageY;if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;if("undefined"===typeof h||null===h)h=nd;if("undefined"===typeof k||null===k)k=Cc;if("center"==a||isNaN(parseFloat(a)))a=Z.imageCenterX;if("center"==b||isNaN(parseFloat(b)))b=Z.imageCenterY;if(-1==c||isNaN(parseFloat(c)))b=Z.fitZ;
if("undefined"===typeof a||null===a)a=Z.initialX;if("undefined"===typeof b||null===b)b=Z.initialY;if("undefined"===typeof d||null===d)d=Z.imageR;"undefined"===typeof c||null===c?c=Z.initialZ:1<c&&2>c&&0!=c%1?c=1:1<c?c/=100:.99<c&&1>c&&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+(0<a?Lb:-Lb)));constrainedZ=Va(b);constrainedZ!=Z.imageZ&&(Z.zooming=0<a?"in":0>a?"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);d<b?d=b:d>c?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=0<c?"in":0>c?"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),g<Z.minZ+.1&&(g=Z.minZ),g>Z.maxZ-.1&&(g=Z.maxZ),d=g-a.getZoom(),Z.zooming=0<d?"in":0>d?"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;d<e;d++){var r=g[d],n=r.id;if(n&&-1!=n.indexOf("button"))if("buttonContainer"!=n&&"buttonContainerImageFilter"!=n)Z.Utils.setButtonDefaults(r);else for(var r=r.childNodes,n=0,q=r.length;n<q;n++){var H=r[n],E=H.id;E&&-1!=E.indexOf("button")&&Z.Utils.setButtonDefaults(H)}}buttonSliderZoomDown=!1;Z.zooming="stop";a.updateView()}else"buttonZoomOut"==c||"buttonZoomIn"==c?a.zoom("stop"):"buttonPanLeft"==c||"buttonPanRight"==c?(a.pan("horizontalStop"),
"buttonPanLeft"==c&&g&&a.toggleSmoothPan()):"buttonPanUp"==c||"buttonPanDown"==c?a.pan("verticalStop"):c=="buttonLabelScaleDown"+e||c=="buttonLabelScaleUp"+e?a.labelScale("stop"):"buttonFullView"==c?a.toggleFullViewMode(!0):"buttonFullViewExit"==c&&a.toggleFullViewMode(!1);else"mouseout"==d&&("buttonZoomOut"==c||"buttonZoomIn"==c?a.zoom("stop"):"buttonPanLeft"==c||"buttonPanRight"==c?a.pan("horizontalStop"):"buttonPanUp"!=c&&"buttonPanDown"!=c||a.pan("verticalStop"))}function x(a){sliderIntervalMousePtZoom=
new Z.Utils.Point(a.clientX,a.clientY)}function y(a){(a=Z.Utils.getFirstTouch(a))&&(sliderIntervalMousePtZoom=new Z.Utils.Point(a.pageX,a.pageY))}var D=this,T=!1,aa=a.getViewportID().toString();if(Z.toolbarInternal){var C,U,r,E=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONOVERCOLOR"),H=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONDOWNCOLOR"),ga=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONUPCOLOR");b();this.getInitialized=function(){return T};this.getSkinArray=function(){return toolbarSkinArray};
this.getSkinSizes=function(){return toolbarSkinSizes};this.show=function(a){4>Z.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:0<Z.helpVisible?45:Z.fullScreenVisible||Z.fullPageVisible?45:Z.resetVisible?35:Z.panButtonsVisible?32:Z.sliderZoomVisible?19:Z.minimizeVisible?14:Z.logoVisible?8:6;e=a.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN0");
null!==e&&(g=e.nodeValue);e=a.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN"+c.toString());null!==e&&(r=e.nodeValue);if("undefined"!==typeof g&&Z.Utils.stringValidate(g)&&"undefined"!==typeof r&&Z.Utils.stringValidate(r)){g=!1;r=0;for(c+=1;r<c;r++)e=a.getElementsByTagName("FILES")[0].attributes.getNamedItem("SKIN"+r).nodeValue,Z.Utils.stringValidate(e)?toolbarSkinFilePaths[r]=b+"/"+e:(toolbarSkinFilePaths[r]="null",g=!0);g&&Z.Utils.showMessage(Z.Utils.getResource("z279"));z558(d,
toolbarSkinFilePaths)}else Z.Utils.showMessage(Z.Utils.getResource("z278"))};this.setSizeAndPosition=function(a,b,c,d){"undefined"===typeof a||null===a?a=0<Z.toolbarVisible?Z.toolbarCurrentW:0:Z.toolbarCurrentW=a;if("undefined"===typeof b||null===b)b=0<Z.toolbarVisible?tlbrH:0;if("undefined"===typeof c||null===c)c=0;if("undefined"===typeof d||null===d)d=1==Z.toolbarPosition?Z.viewerH-tlbrH:0;tbS=Z.ToolbarDisplay.style;tbS.width=a+"px";tbS.height=b+"px";tbS.left=c+"px";tbS.top=d+"px";var e=toolbarSkinSizes[2],
g=toolbarSkinSizes[3],r=toolbarSkinSizes[4],n=toolbarSkinSizes[5],q=toolbarSkinSizes[6],H=toolbarSkinSizes[7],E=toolbarSkinSizes[8],p=toolbarSkinSizes[9],v=toolbarSkinSizes[10],ga=toolbarSkinSizes[11],y=toolbarSkinSizes[12],A=toolbarSkinSizes[13];c=toolbarSkinSizes[14];d=toolbarSkinSizes[15];var u=0,C=(b-g)/2+1,x=(b-n)/2,D=(b-H)/2,B=1.3*D,Ma=D+4,cc=D+2,Nb=1==Z.logoVisible?0:E/2,U=1==Z.logoVisible?0:E/2,T=E-(q-r),Y=2,K=0;Z.panButtonsVisible&&(Y+=4,K+=1);Z.resetVisible&&(Y+=1);if(Z.fullScreenVisible||
Z.fullPageVisible)Y+=1,K+=1;Z.helpVisible&&(Y+=1,Z.fullScreenVisible||Z.fullPageVisible||(K+=1));K=Y*E+K*T;Z.sliderZoomVisible&&(K+=A);overrideSliderZoom=overrideProgress=overrideLogo=overridePan=!1;var Y=(1==Z.logoVisible?e+2:0)+(0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&0!=Z.minimizeVisible?E:0),S=1==Z.panButtonsVisible?4*E+T:0,aa=1==Z.resetVisible?E:0,eb=Y+20+K+20+c;eb>a&&(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&&0<X.width&&0<X.height){a=X.width;var b=X.height;xa.appendChild(X);F=Z.NavigatorDisplay.childNodes[1].firstChild;g(bb,nb,u,la,Fa,a,b);a=Z.ToolbarDisplay&&"inline-block"==Z.ToolbarDisplay.style.display&&!Z.ToolbarMinimized||"undefined"!==typeof slideList&&null!==slideList&&"visible"==slideList.style.visibility;v((1==Z.navigatorVisible||2==Z.navigatorVisible)&&
a);a=parseInt(Z.Utils.getResource("z230"),10);Z.NavigatorDisplay.style.zIndex=(a+2).toString();A()}else window.setTimeout(function(){d()},100)}function e(){h&&(k&&(window.clearInterval(k),k=null),t&&M&&vb&&Ra&&xa&&oa&&F&&P&&p||(t=Z.NavigatorDisplay,M=t.style,vb=Z.NavigatorDisplay.firstChild,Ra=vb.style,xa=Z.NavigatorDisplay.childNodes[1],oa=xa.style,F=Z.NavigatorDisplay.childNodes[1].firstChild,P=Z.NavigatorDisplay.childNodes[2],p=P.style))}function g(a,b,c,d,e,h,g){e||(e=Fa);if("undefined"===typeof a||
null===a)a=Z.navigatorW;if("undefined"===typeof b||null===b)b=Z.navigatorH;if("undefined"===typeof c||null===c)c=0;if("undefined"===typeof d||null===d)d=0;t||(t=Z.NavigatorDisplay);M||(M=t.style);F=t.childNodes[1].firstChild;0==F.width&&"undefined"!==h&&null!==h&&(F.width=h);0==F.height&&"undefined"!==g&&null!==g&&(F.height=g);t&&M&&F&&(e&&(a=1,a=0==e?Z.viewerW/Z.viewerH:F.width/F.height,a*=b),M.width=a+"px",M.height=b+"px",M.left=c+"px",M.top=d+"px",n(a,b))}function n(a,b){F||(F=Z.NavigatorDisplay.childNodes[1].firstChild);
F&&0!=F.width&&0!=F.height?(Ra||(Ra=Z.NavigatorDisplay.firstChild.style),oa||(oa=Z.NavigatorDisplay.childNodes[1].style),Ra&&oa&&(Ra.width=a+"px",Ra.height=b+"px",q(a,b),oa.width=F.width+"px",oa.height=F.height+"px",oa.left=(a-F.width)/2+"px",oa.top=(b-F.height)/2+"px",A())):window.setTimeout(function(){n(a,b)},100)}function q(a,b){F||(F=Z.NavigatorDisplay.childNodes[1].firstChild);if(F){var c=F.width,d=F.height,e=c/d,h=a/c,g=b/d;h<=g?(c=a,d=a/e,navImageT=(b-a/c*d)/2):g<h&&(d=b,c=b*e,navImageL=(a-
b/d*c)/2);F.width=c;F.height=d}}function v(a){M||(M=Z.NavigatorDisplay.style);M&&(M.display=a?"inline-block":"none")}function A(){if(a&&a.getStatus("initialized")){x();var b=a.calculateCurrentCenterCoordinates();y(b)}}function x(){if(F&&p){var b=F.width/Z.imageW,c=F.height/Z.imageH,d=a.getZoom(),c=Z.viewerH*c/d;p.width=Z.viewerW*b/d+"px";p.height=c+"px"}}function y(a){if(F&&p&&oa){if("undefined"===typeof a||null===a||0==a.x&&0==a.y)a=new Z.Utils.Point(Z.imageX,Z.imageY);if("undefined"===typeof z||
null===z)z=Z.imageZ;var b=Z.imageR;0>b&&(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&&0<xa.childNodes.length&&(xa.innerHTML="");"undefined"===typeof Sa||null===Sa||0==Sa.length?b(d):(a=Z.Utils.arrayIndexOfObjectValue(Sa,"id",ca),-1!=a&&(X=Sa[a].image,d(X)))};this.getInitialized=
function(){return h};this.setVisibility=function(a){v(a)};this.syncToViewport=function(){A()};this.z657=function(){x()};this.z658=function(a){y(a)};this.z682=function(){h?e():k=window.setInterval(e,300)};this.setSizeAndPosition=function(a,b,c,d,e,h,k){g(a,b,c,d,e,h,k)}};
Z.NetConnector=function(){function a(a,c,d){var g=a.substring(0,a.indexOf("?")),h=parseFloat(a.substring(a.indexOf("?")+1,a.indexOf(",")));a=parseFloat(a.substring(a.indexOf(",")+1,a.length));h=new Z.Utils.Range(h,h+a);b(g,e,h,c,d)}function b(a,b,e,g,h,n){var k=c();if(k){var q="function"===typeof b;if(q){var v=b;b=function(){window.setTimeout(Z.Utils.createCallback(null,v,k),1)};k.onreadystatechange=function(){4==k.readyState&&(k.onreadystatechange=new Function,b())}}try{"undefined"===typeof e||null===
e?(k.open("GET",a,q),k.send(null)):"undefined"!==typeof g&&null!==g&&"ZoomifyImageFile"==Z.tileSource&&("tile"!=g&&(a=Z.Utils.cacheProofPath(a)),k.open("GET",a,!0),k.responseType="arraybuffer",Z.Utils.defineObjectProperty(k,"zType",{value:g,writable:!1,enumerable:!1,configurable:!1}),Z.Utils.defineObjectProperty(k,"zTile",{value:h,writable:!1,enumerable:!1,configurable:!1}),Z.Utils.defineObjectProperty(k,"zChunkNumber",{value:n,writable:!1,enumerable:!1,configurable:!1}),Z.browser==Z.browsers.SAFARI&&
k.setRequestHeader("If-Modified-Since","Thu, 01 Dec 1994 16:00:00 GMT"),k.setRequestHeader("Range","bytes="+e.start.toString()+"-"+e.end.toString()),k.send(null))}catch(x){d(x,a,g),k=null,console.log(x)}}else Z.Utils.showMessage(Z.Utils.getResource("z295"))}function c(){var a=null;switch(Z.xmlHttpRequestSupport){case "XMLHttpRequest":a=new XMLHttpRequest;break;case "Msxml2.XMLHTTP.6.0":a=new ActiveXObject("Msxml2.XMLHTTP.6.0");break;case "Msxml2.XMLHTTP.3.0":a=new ActiveXObject("Msxml2.XMLHTTP.3.0");
break;case "Microsoft.XMLHTTP":a=new ActiveXObject("Microsoft.XMLHTTP")}return a}function d(a,b,c){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):1==Z.localUse&&"ZoomifyImageFile"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z290"),!0):-1!=b.toLowerCase().indexOf(".zif")?Z.Utils.showMessage(Z.Utils.getResource("z256-ZIFBYTERANGE")+
c+".",!1,x,"center"):-1!=b.indexOf("ImageProperties.xml")?Z.Utils.showMessage(Z.Utils.getResource("z256-IMAGEXML"),!0,null,"left"):-1!=b.toLowerCase().indexOf("reply_data")?Z.Utils.showMessage(Z.Utils.getResource("z256-IMAGEOFFSET"),!1,x,"center"):-1!=b.indexOf(Z.Utils.getResource("z200"))?Z.Utils.showMessage(Z.Utils.getResource("z256-TOOLBARSKINSXML"),!0,null,"left"):Z.Utils.showMessage(Z.Utils.getResource("z256"),!1,A,"center")}function e(a,b){if(a)if(200!==a.status&&0!==a.status&&206!==a.status){var c=
a.status,d=404==c?"Not Found":a.statusText;Z.Toolbar&&!Z.Toolbar.getInitialized()?Z.Utils.showMessage(Z.Utils.getResource("z256-TOOLBARSKINSXML"),!0,null,"left"):"ZoomifyImageFile"==Z.tileSource?Z.Utils.showMessage(Z.Utils.getResource("z273RANGEREQUESTS")+c+" - "+d,!0,null,"left"):Z.Utils.showMessage(Z.Utils.getResource("z273")+c+" - "+d,!1,A,"center")}else if(c=null,c=null!==Z.annotationPath&&".json"==Z.annotationPath.toLowerCase().substring(Z.annotationPath.length-5,Z.annotationPath.length),a.response&&
a.zType&&"ZoomifyImageFile"==Z.tileSource){if(Z.Viewport)if(c=new Z.Utils.createUint8Array(a.response,0),"header"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFHeader(c);else for(var d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFHeader(c);else if("offset"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFOffsetChunk(c,a.zChunkNumber);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFOffsetChunk(c,a.zChunkNumber);
else if("byteCount"==a.zType)if("undefined"===typeof b||null===b)Z.Viewport.parseZIFByteCountChunk(c,a.zChunkNumber);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFByteCountChunk(c,a.zChunkNumber);else if("image"==a.zType.substring(0,5))y--,Z.Viewport.parseZIFImage(c,a.zTile,a.zType);else if("navigator"==a.zType)if("undefined"===typeof b||null===b)Z.viewportCurrent.parseZIFImage(c,a.zTile,a.zType);else for(d=0,e=Z.imageSetLength;d<e;d++)b==d&&Z["Viewport"+d.toString()].parseZIFImage(c,
a.zTile,a.zType);else Z.Utils.showMessage(Z.Utils.getResource("z256-ZIFBYTES"),!1,x,"center")}else a.responseXML&&a.responseXML.documentElement&&!c?(c=a.responseXML,g(c,b)):a.responseText&&(c=a.responseText,"ZoomifyImageFolder"==Z.tileSource?(c=Z.Utils.xmlConvertTextToDoc(c),g(c,b)):"ZoomifyImageFile"==Z.tileSource&&(c=Z.Utils.xmlConvertTextToDoc(c),g(c,b)));else Z.Utils.showMessage(Z.Utils.getResource("z272"),!1,A,"center")}function g(a,b){if(a&&a.documentElement){var c=a.documentElement.tagName;
"IMAGE_PROPERTIES"==c||"ZIFHEADER"==c?("ZoomifyImageFile"==Z.tileSource||"ZoomifyImageFolder"==Z.tileSource)&&Z.Viewport&&Z.Viewport.z602(a):"SKINDATA"==c?Z.Toolbar&&Z.Toolbar.parseSkinXML(a):Z.Utils.showMessage(Z.Utils.getResource("z296"),!0)}else Z.Utils.showMessage(Z.Utils.getResource("z293"),!0)}function n(b,c,d,e){if(y<D)return y++,"ZoomifyImageFile"==Z.tileSource&&("undefined"!==typeof e&&null!==e||"navigator"==d)?a(b,d,e):(c=Z.Utils.createCallback(null,q,c),(new v(b,c,d)).start()),!0;-1==Z.Utils.arrayIndexOfObjectValue(U,
"sc",b)&&(U[U.length]={sc:b,cb:c,ct:d,t:e},C||(C=window.setInterval(function(){var a=U[0];n(a.sc,a.cb,a.ct,a.t)&&(U=Z.Utils.arraySplice(U,0,1));0==U.length&&C&&(window.clearInterval(C),C=null)},aa)));return!1}function q(a,b,c){y--;if("function"===typeof a)try{a(c)}catch(d){Z.Utils.showMessage(d.name+Z.Utils.getResource("z245")+b+" "+d.message,!0)}}function v(a,b,c){function d(c){e.onload=null;e.onabort=null;e.onerror=null;g&&window.clearTimeout(g);window.setTimeout(function(){b(a,c?e:null)},1)}var e=
null,g=null;this.start=function(){e=new Image;var b=function(){d(!1)};e.onload=function(){d(!0)};e.onabort=b;e.onerror=b;g=window.setTimeout(function(){console.log(Z.Utils.getResource("z253"));d(!1);Z.Viewport.traceDebugValues("imageRequestTimeout",c+" timeout: "+a)},T);e.src=a}}var A=parseInt(Z.Utils.getResource("z268"),10),x=parseInt(Z.Utils.getResource("z268MEDIUM"),10),y=0,D=parseInt(Z.Utils.getResource("z140"),10),T=parseFloat(Z.Utils.getResource("z139")),aa=Z.Utils.getResource("DEFAULT_IMAGELOADQUEUEDELAY"),
C,U=[];this.loadXML=function(a,c){"undefined"===typeof c||null===c?b(a,e,null):b(a,function(a){e(a,c)},null)};this.loadByteRange=function(a,c,d,g,h,n){c=new Z.Utils.Range(c,d);b(a,e,c,g,h,n)};this.loadImage=function(a,b,c,d){n(a,b,c,d)}};
Z.Utils={addCrossBrowserMethods:function(){document.addEventListener?(this.disableTextInteraction=function(a){if(a){var b=a.parentNode.style;b&&(a.parentNode.unselectable="on",b.userSelect="none",b.MozUserSelect="none",b.webkitUserSelect="none",b.webkitTouchCallout="none",b.webkitTapHighlightColor="transparent")}},this.renderQuality=function(a,b){b&&a.style.setProperty("image-rendering","high"==b?"optimizeQuality":"optimizeSpeed",null)},this.setOpacity=function(a,b,c){Z.alphaSupported?a.style.opacity=
b:c&&(a.style.backgroundColor=c)}):document.attachEvent&&(this.disableTextInteraction=function(a){a&&(a.parentNode.unselectable="on",a.parentNode.onselectstart=function(){return!1})},this.renderQuality=function(a,b){b&&(a.style.msInterpolationMode="high"==b?"bicubic":"nearest-neighbor")},this.setOpacity=function(a,b,c){Z.alphaSupported?(b*=100,a.style.zoom=1,a.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+b+")",a.style.filter="alpha(opacity="+b+")",100==b&&(a.style.filter="")):c&&
(a.style.backgroundColor=c)})},addCrossBrowserEvents:function(){document.addEventListener?(this.addEventListener=function(a,b,c){a&&("mousewheel"==b&&a.addEventListener("DOMMouseScroll",c,!1),a.addEventListener(b,c,!1))},this.removeEventListener=function(a,b,c){a&&("mousewheel"==b&&a.removeEventListener("DOMMouseScroll",c,!1),a.removeEventListener(b,c,!1))},this.event=function(a){return a},this.target=function(a){return a.target},this.relatedTarget=function(a){return a.relatedTarget},this.isRightMouseButton=
function(a){var b=!1;if(2==a.which||3==a.which)b=!0;return b},this.preventDefault=function(a){a.preventDefault()},this.stopPropagation=function(a){a.stopPropagation()}):document.attachEvent&&(this.addEventListener=function(a,b,c){if(-1==this._findListener(a,b,c)){var d=function(){var b=window.event;Function.prototype.call?c.call(a,b):(a._currentListener=c,a._currentListener(b),a._currentListener=null)};a.attachEvent("on"+b,d);b={target:a,eventName:b,handler:c,handler2:d};var d=(a.document||a).parentWindow,
e="l"+this._listenerCounter++;d._allListeners||(d._allListeners={});d._allListeners[e]=b;a._listeners||(a._listeners=[]);a._listeners[a._listeners.length]=e;d._unloadListenerAdded||(d._unloadListenerAdded=!0,d.attachEvent("onunload",this._removeAllListeners))}},this.removeEventListener=function(a,b,c){if(a&&(c=this._findListener(a,b,c),-1!=c)){var d=(a.document||a).parentWindow,e=a._listeners[c];a.detachEvent("on"+b,d._allListeners[e].handler2);a._listeners=Z.Utils.arraySplice(a._listeners,c,1);delete d._allListeners[e]}},
this.event=function(a){return window.event},this.target=function(a){return a.srcElement},this.relatedTarget=function(a){var b=null;"mouseover"==a.type?b=a.fromElement:"mouseout"==a.type&&(b=a.toElement);return b},this.isRightMouseButton=function(a){var b=!1;2==a.button&&(b=!0);return b},this.preventDefault=function(a){a&&(a.returnValue=!1)},this.stopPropagation=function(a){a.cancelBubble=!0},this._findListener=function(a,b,c){var d=a._listeners;if(!d)return-1;a=(a.document||a).parentWindow;for(var e=
d.length-1;0<=e;e--){var g=a._allListeners[d[e]];if(g&&g.eventName==b&&g.handler==c)return e}return-1},this._removeAllListeners=function(){for(id in this._allListeners){var a=this._allListeners[id];a.target.detachEvent("on"+a.eventName,a.handler2);delete this._allListeners[id]}},this._listenerCounter=0)},declareGlobals:function(){Z.pageContainerID=null;Z.imagePath=null;Z.skinPath=null;Z.skinMode=null;Z.parameters=null;Z.cacheProofCounter=0;Z.timerCounter=0;Z.browsers=null;Z.browser=null;Z.browserVersion=
null;Z.scaleThreshold=null;Z.canvasSupported=null;Z.cssTransformsSupported=null;Z.cssTransformProperty=null;Z.cssTransformNoUnits=null;Z.alphaSupported=null;Z.renderQuality=null;Z.rotationSupported=null;Z.fullScreenSupported=null;Z.arrayMapSupported=null;Z.arraySpliceSupported=null;Z.float32ArraySupported=null;Z.uInt8ArraySupported=null;Z.xmlHttpRequestSupport=null;Z.definePropertySupported=null;Z.responseArraySupported=null;Z.responseArrayPrototyped=!1;Z.touchSupport=null;Z.mobileDevice=null;Z.localUse=
null;Z.zifSupported=null;Z.onReady=null;Z.onAnnotationReady=null;Z.initialX=null;Z.initialY=null;Z.initialZ=null;Z.initialZoom=null;Z.minZ=null;Z.minZoom=null;Z.maxZ=null;Z.maxZoom=null;Z.zoomSpeed=null;Z.panSpeed=null;Z.smoothPan=null;Z.smoothPanEasing=null;Z.smoothPanGlide=null;Z.autoResize=null;Z.fadeInSpeed=null;Z.toolbarInternal=null;Z.toolbarVisible=null;Z.toolbarAutoShowHide=null;Z.toolbarW=null;Z.toolbarH=null;Z.toolbarPosition=null;Z.navigatorVisible=null;Z.navigatorW=null;Z.navigatorWidth=
null;Z.navigatorH=null;Z.navigatorHeight=null;Z.navigatorL=null;Z.navigatorLeft=null;Z.navigatorT=null;Z.navigatorTop=null;Z.navigatorFit=null;Z.navigatorRectangleColor=null;Z.clickZoom=null;Z.doubleClickZoom=null;Z.doubleClickDelay=null;Z.clickPan=null;Z.clickZoomAndPanBlock=!1;Z.mousePan=null;Z.keys=null;Z.constrainPan=null;Z.panBuffer=null;Z.constrainPanStrict=null;Z.tooltipsVisible=null;Z.helpVisible=0;Z.watermarkPath=null;Z.copyrightPath=null;Z.hotspots=!1;Z.hotspotPath=null;Z.hotspotFolder=
null;Z.hotspotListTitle=null;Z.hotspotsDrawOnlyInView=!0;Z.captionBoxes=!1;Z.screensaver=!1;Z.screensaverSpeed=null;Z.tour=!1;Z.tourPath=null;Z.tourListTitle=null;Z.tourPlaying=null;Z.tourStop=!1;Z.slideshow=!1;Z.slidePath=null;Z.slideListTitle=null;Z.slideshowPlaying=null;Z.slideTransitionTimeout=null;Z.slideTransitionSpeed=null;Z.slideOpacity=0;Z.audioContent=!1;Z.audioMuted=!1;Z.annotations=!1;Z.annotationPath=null;Z.annotationPanelVisible=null;Z.annotationPanelVisibleState=!1;Z.annotationFolder=
null;Z.annotationXMLText=null;Z.annotationJSONObject=null;Z.annotationsAddMultiple=null;Z.annotationsAutoSave=null;Z.saveButtonVisible=null;Z.labelClickSelect=null;Z.simplePath=!1;Z.noPost=!1;Z.noPostDefaults=!1;Z.unsavedEditsTest=!0;Z.maskVisible=null;Z.maskingSelection=!1;Z.maskFadeTimeout=null;Z.maskFadeSpeed=null;Z.maskOpacity=0;Z.maskClearOnUserAction=null;Z.externalEditPermissionFunction=null;Z.annotationSort="none";Z.saveHandlerPath=null;Z.saveImageHandlerPath=null;Z.saveImageFull=null;Z.postingXML=
!1;Z.postingImage=!1;Z.minimizeVisible=null;Z.sliderZoomVisible=null;Z.sliderVisible=null;Z.panButtonsVisible=null;Z.resetVisible=null;Z.fullViewVisible=null;Z.fullScreenVisible=null;Z.fullPageVisible=null;Z.initialFullPage=null;Z.fullPageInitial=null;Z.measureVisible=!1;Z.captionTextColor=null;Z.captionBackColor=null;Z.polygonLineColor=null;Z.polygonFillColor=null;Z.captionTextVisible=!0;Z.captionBackVisible=!0;Z.polygonFillVisible=!0;Z.polygonLineVisible=!0;Z.rotationVisible=null;Z.initialR=null;
Z.initialRotation=null;Z.virtualPointerVisible=null;Z.crosshairsVisible=null;Z.rulerVisible=null;Z.units=null;Z.unitsPerImage=null;Z.pixelsPerUnit=null;Z.sourceMagnification=null;Z.magnification=null;Z.rulerListType=null;Z.rulerW=null;Z.rulerWidth=null;Z.rulerH=null;Z.rulerHeight=null;Z.rulerL=null;Z.rulerLeft=null;Z.rulerT=null;Z.rulerTop=null;Z.coordinatesVisible=null;Z.saveImageFull=null;Z.saveImageFilename=null;Z.saveImageFormat=null;Z.saveImageCompression=null;Z.saveImageBackColor=null;Z.imageFiltersVisible=
null;Z.initialImageFilters=null;Z.progressVisible=null;Z.messagesVisible=null;Z.logoVisible=null;Z.logoLink=null;Z.logoLinkURL=null;Z.logoCustomPath=null;Z.canvas=null;Z.debug=null;Z.imageProperties=null;Z.serverIP=null;Z.serverPort=null;Z.tileHandlerPath=null;Z.tileHandlerPathFull=null;Z.tileW=null;Z.tileH=null;Z.tileType="jpg";Z.tilesPNG=null;Z.freehandVisible=null;Z.textVisible=null;Z.iconVisible=null;Z.rectangleVisible=null;Z.polygonVisible=null;Z.annotationPathProvided=!1;Z.saveHandlerProvided=
!1;Z.imageSetPathProvided=!1;Z.saveImageHandlerProvided=!1;Z.tileSource=null;Z.tileSourceMultiple=null;Z.focal=null;Z.quality=null;Z.markupMode=null;Z.editMode=null;Z.editing=null;Z.labelMode="view";Z.editModePrior=Z.editMode;Z.sliderFocus="zoom";Z.animation=!1;Z.animationPath=null;Z.animationCount=0;Z.animationAxis=null;Z.animator=null;Z.slidestack=!1;Z.slidestackPath=null;Z.imageSet=!1;Z.imageSetPath=null;Z.imageSetLength=null;Z.imageSetListPosition=null;Z.imageSetListTitle=null;Z.imageSetStart=
null;Z.imageSetLoop=null;Z.sliderImageSetVisible=null;Z.mouseWheelParmeterProvided=null;Z.mouseWheel=null;Z.imageSetHotspotPath=null;Z.hotspotFileShared=!1;Z.imageSetAnnotationPath=null;Z.annotationFileShared=!1;Z.Viewer=null;Z.ViewerDisplay=null;Z.Viewport=null;Z.Toolbar=null;Z.ToolbarDisplay=null;Z.ToolbarMinimized=!1;Z.TooltipDisplay=null;Z.Navigator=null;Z.NavigatorDisplay=null;Z.MessageDisplay=null;Z.messages=null;Z.messageDisplayList=[];Z.overlayMessage=null;Z.CoordinatesDisplay=null;Z.coordinates=
null;Z.coordinatesSave=null;Z.CopyrightDisplay=null;Z.AnnotationPanelDisplay=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.preventDupCall=!1;Z.fitZ=null;Z.fillZ=null;Z.zooming="stop";Z.panningX="stop";Z.panningY="stop";Z.fullView=!1;Z.fullViewPrior=!1;Z.interactivityOff=!1;Z.useCanvas=!0;Z.specialStorageEnabled=null;Z.callbacks=[];Z.updateViewPercent=0;Z.TraceDisplay=null;Z.traces=
null;Z.mouseIsDown=!1;Z.buttonIsDown=!1;Z.keyIsDown=!1;Z.mouseWheelIsDown=!1;Z.mouseWheelCompleteDuration=null;Z.mouseWheelCompleteTimer=null;Z.mouseOutDownPoint=null;Z.viewportCurrentID=0;Z.viewportCurrent=null;Z.viewportChangeTimeout=null},detectBrowserFeatures:function(){Z.browsers={UNKNOWN:0,IE:1,FIREFOX:2,SAFARI:3,CHROME:4,OPERA:5};var a=Z.browsers.UNKNOWN,b=0,c=1E4,d=navigator.appName,e=navigator.appVersion,g=!1,n=!1,q=navigator.userAgent.toLowerCase();if("Microsoft Internet Explorer"==d&&window.attachEvent&&
window.ActiveXObject)b=q.indexOf("msie"),a=Z.browsers.IE,b=parseFloat(q.substring(b+5,q.indexOf(";",b))),g="undefined"!==typeof document.documentMode;else if("Netscape"==d&&-1!=q.indexOf("trident"))a=Z.browsers.IE,b=11;else if("Netscape"==d&&window.addEventListener){var v=q.indexOf("firefox"),d=q.indexOf("safari"),e=q.indexOf("chrome");0<=v?(a=Z.browsers.FIREFOX,b=parseFloat(q.substring(v+8)),c=1E4):0<=d&&(c=q.substring(0,d).lastIndexOf("/"),a=0<=e?Z.browsers.CHROME:Z.browsers.SAFARI,b=parseFloat(q.substring(c+
1,d)),c=1E4);d=new Image;d.style.getPropertyValue&&(n=d.style.getPropertyValue("image-rendering"))}else"Opera"==d&&window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera)&&(a=Z.browsers.OPERA,b=parseFloat(e));var A;if(window.XMLHttpRequest)netReq=new XMLHttpRequest,A="XMLHttpRequest";else if(window.ActiveXObject)for(d=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0,v=d.length;e<v;e++)try{netReq=new ActiveXObject(d[e]);A=d[e];break}catch(x){}var d="response"in
XMLHttpRequest.prototype||"mozResponseArrayBuffer"in XMLHttpRequest.prototype||"mozResponse"in XMLHttpRequest.prototype||"responseArrayBuffer"in XMLHttpRequest.prototype,e=document.createElement("canvas"),e=!(!e.getContext||!e.getContext("2d")),v=!(a==Z.browsers.SAFARI&&4>b||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||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,q=-1<q.indexOf("android")||-1<q.indexOf("iphone")||-1<q.indexOf("ipad")||-1<q.indexOf("ipod"),t;switch(window.location.protocol){case "http:":t=!1;break;case "https:":t=!1;break;case "file:":t=!0;break;default:t=null}var M=!(Z.browser==Z.browsers.IE&&9>Z.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<d;c++){var e=a[c],g=e.indexOf("=");if(0<g){var n=e.substring(0,g),e=e.substring(g+1);b[n]=e}}}return b},
parametersToDelimitedString:function(a,b){var c="",d;for(d in a)c+=d+"="+a[d].toString()+b;return c=c.slice(0,-1)},setParameters:function(a){var b=this.getResource("z287"),c=this.getResource("z110"),d=this.getResource("z109"),e=this.getResource("z108"),c=c!=d?!0:!1;Z.expressParamsEnabled||(Z.toolbarInternal=!0,Z.logoLinkURL=Z.Utils.getResource("z427"));var g=this.getResource("z187"),n=this.getResource("z186"),d=this.getResource("z185"),g=g!=n?!0:!1,q=this.getResource("z215"),n=this.getResource("z214"),
v=this.getResource("z213");Z.specialStorageEnabled=q!=n?!0:!1;var A=this.getResource("z107"),x=this.getResource("z106"),q=this.getResource("z105"),A=A!=x?!0:!1;Z.skinPath=this.getResource("z201");Z.skinMode=this.getResource("z199");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")));isNaN(parseFloat(this.getResource("z241")))||(Z.zoomSpeed=parseFloat(this.getResource("z241")));isNaN(parseFloat(this.getResource("z175")))||(Z.panSpeed=parseFloat(this.getResource("z175")));isNaN(parseFloat(this.getResource("z111")))||(Z.fadeInSpeed=parseFloat(this.getResource("z111")));Z.navigatorVisible=parseInt(this.getResource("z171"),
10);Z.navigatorW=parseInt(this.getResource("z172"),10);Z.navigatorH=parseInt(this.getResource("z167"),10);Z.navigatorL=parseInt(this.getResource("z168"),10);Z.navigatorT=parseInt(this.getResource("z170"),10);Z.navigatorFit=this.getResource("z166");Z.navigatorRectangleColor=this.getResource("z169");Z.clickZoom="0"!=this.getResource("z93");Z.doubleClickZoom="0"!=this.getResource("DEFAULT_DOUBLECLICKZOOM");Z.doubleClickDelay=parseFloat(this.getResource("DEFAULT_DOUBLECLICKDELAY"));Z.clickPan="0"!=this.getResource("z92");
Z.mousePan="0"!=this.getResource("z164");Z.constrainPan="0"!=this.getResource("z95");Z.panBuffer=parseFloat(this.getResource("z173"));Z.constrainPanStrict="0"!=this.getResource("z95STRICT");Z.smoothPan=Z.useCanvas&&"0"!=this.getResource("DEFAULT_SMOOTHPAN");Z.smoothPanEasing=parseInt(this.getResource("DEFAULT_SMOOTHPANEASING"),10);Z.smoothPanGlide=parseInt(this.getResource("DEFAULT_SMOOTHPANGLIDE"),10);Z.keys="0"!=this.getResource("z146");Z.canvas="0"!=this.getResource("z88");Z.debug=parseInt(this.getResource("z104"),
10);Z.toolbarVisible=parseInt(this.getResource("z223"),10);Z.toolbarAutoShowHide=0!=Z.toolbarVisible&&1!=Z.toolbarVisible&&6!=Z.toolbarVisible&&7!=Z.toolbarVisible&&8!=Z.toolbarVisible;Z.toolbarPosition=parseFloat(this.getResource("z222"));Z.logoVisible="0"!=this.getResource("z150");Z.logoCustomPath=this.getResource("z149");Z.minimizeVisible="0"!=this.getResource("z162");Z.sliderZoomVisible="0"!=this.getResource("DEFAULT_SLIDERZOOMVISIBLE");Z.mouseWheel=parseInt(this.getResource("DEFAULT_MOUSEWHEEL"),
10);Z.panButtonsVisible="0"!=this.getResource("z174");Z.resetVisible="0"!=this.getResource("DEFAULT_RESETVISIBLE");Z.tooltipsVisible="0"!=this.getResource("z224");Z.helpVisible=parseInt(this.getResource("z128"),10);Z.progressVisible="0"!=this.getResource("z184");Z.fullViewVisible="0"!=this.getResource("z121");Z.fullScreenVisible="0"!=this.getResource("z119");Z.fullPageVisible="0"!=this.getResource("z118");Z.initialFullPage="0"!=this.getResource("z141");Z.measureVisible="0"!=this.getResource("z157");
Z.rotationVisible="0"!=this.getResource("z190");Z.initialR=this.getResource("DEFAULT_INITIALR");if("object"===typeof a&&null!==a)for(var y in a)if("function"!==typeof a[y]||"zOnAnnotationReady"===y||"zOnReady"===y)if("undefined"===typeof Z[Z.Utils.stringLowerCaseFirstLetter(y.substr(1))])alert(b+" "+y);else if(pValue=a[y],c||"zNavigatorVisible"==y)switch(y){case "zOnAnnotationReady":"function"===typeof pValue&&Z.setCallback("annotationPanelInitialized",pValue);break;case "zOnReady":"function"===typeof pValue&&
Z.setCallback("readyViewer",pValue);break;case "zInitialX":isNaN(parseFloat(pValue))||(Z.initialX=parseFloat(pValue));break;case "zInitialY":isNaN(parseFloat(pValue))||(Z.initialY=parseFloat(pValue));break;case "zInitialZoom":"fit"==pValue&&(pValue="-1");"fill"==pValue&&(pValue="0");isNaN(parseFloat(pValue))||(Z.initialZ=parseFloat(pValue),Z.initialZ&&0<Z.initialZ&&100>=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&&100>=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<c;b++){var d=a[b],e=d.indexOf("=");if(0<e){var g=d.substring(0,e),d=d.substring(e+1);if(this.stringValidate(d))switch(g){case "zInitialX":isNaN(parseFloat(d))||(Z.initialX=parseFloat(d));break;case "zInitialY":isNaN(parseFloat(d))||(Z.initialY=parseFloat(d));break;case "zInitialZoom":"fit"==d&&(d="-1");"fill"==d&&(d="0");isNaN(parseFloat(d))||(Z.initialZ=parseFloat(d),
Z.initialZ&&0<Z.initialZ&&100>=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&&100>=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="<p align=%22center%22><font face=%22Arial,Helvetica,sans-serif%22><strong>Viewer Help</strong></font></p><p align=%22justify%22><font face=%22Arial,Helvetica,sans-serif%22>To explore this image, simply click the image to zoom, double-click to zoom out, or click-drag to pan.<br><br>The Navigator thumbnail overview can also be clicked or click-dragged to pan.<br><br>Use the Toolbar for exact navigation - if using a mouse, hold it over any button to see a helpful tip.</font></p>";
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<e;d++)c[c.length]=arguments[d];return function(){for(var d=c.concat([]),e=0,q=arguments.length;e<q;e++)d[d.length]=arguments[e];return b.apply(a,d)}},validateCallback:function(a){var b=Z.callbacks.slice(0);Z.Utils.functionCallWithDelay(function(){Z.Utils.validateCallbackDelayed(a,b)},10)},validateCallbackDelayed:function(a,b){for(var c=0,d=b.length;c<d;c++){var e=b[c];if(e&&e.callbackEvent==a&&"object"===typeof e&&"function"===
typeof e.callbackFunction)switch(a){case "viewZoomingGetCurrentZoom":var g=Z.Viewport.getZoom();e.callbackFunction(g);break;case "viewUpdateCompleteGetLabelIDs":g=Z.Viewport.getLabelIDsInCurrentView(!1,!0,!0);e.callbackFunction(g);break;case "viewUpdateCompleteGetLabelInternalIDs":g=Z.Viewport.getLabelIDsInCurrentView(!0,!0,!0);e.callbackFunction(g);break;default:e.callbackFunction()}}Z.Utils.arrayClear(b)},getContainerSize:function(a,b){var c=Z.Utils.getElementStyle(a),d=parseFloat(c.width),e=parseFloat(c.height);
Z.Utils.stringValidate(c.width)&&-1!=c.width.indexOf("%")&&(d=parseFloat(Z.Utils.getElementStyleProperty(a,"width")));Z.Utils.stringValidate(c.height)&&-1!=c.height.indexOf("%")&&(e=parseFloat(Z.Utils.getElementStyleProperty(a,"height")));isNaN(d)&&(d=b.clientWidth);isNaN(e)&&(e=b.clientHeight);if(0==d||0==e)winDimensions=Z.Utils.getWindowSize(),0==d&&(a.parentNode.style.width=winDimensions.x+"px",d=a.clientWidth),0==e&&(a.parentNode.style.height=winDimensions.y+"px",e=a.clientHeight);return new Z.Utils.Point(d,
e)},createContainerElement:function(a,b,c,d,e,g,n,q,v,A,x,y,D,T,aa,C,U){var r=document.createElement(a);this.stringValidate(b)&&(r.id=b);b=r.style;b.display=this.stringValidate(c)?c:"inline-block";b.position=this.stringValidate(d)?d:"static";b.overflow=this.stringValidate(e)?e:"hidden";"canvas"==a?(this.stringValidate(g)&&r.setAttribute("width",g),this.stringValidate(n)&&r.setAttribute("height",n)):(this.stringValidate(g)&&(b.width=g),this.stringValidate(n)&&(b.height=n));this.stringValidate(q)&&
(b.left=q);this.stringValidate(v)&&(b.top=v);b.borderStyle=this.stringValidate(A)?A:"none";b.borderWidth=this.stringValidate(x)?x:"0px";b.borderColor="#696969";b.background=this.stringValidate(y)?y:"transparent none";b.margin=this.stringValidate(D)?D:"0px";b.padding=this.stringValidate(T)?T:"0px";b.whiteSpace=this.stringValidate(aa)?aa:"normal";this.stringValidate(C)&&(b.cursor=C);"undefined"!==U&&U&&(Z.Utils.addEventListener(r,"touchstart",Z.Utils.preventDefault),Z.Utils.addEventListener(r,"mousedown",
Z.Utils.preventDefault),Z.Utils.addEventListener(r,"contextmenu",Z.Utils.preventDefault));return r},createCenteredElement:function(a,b){var c=this.createContainerElement("div"),d=[];d[d.length]='<div style="#position:relative; display:table; height:100%; width:100%; border:none; margin:0px; padding:0px; overflow:hidden; text-align:left;">';d[d.length]='<div style="#position:absolute; display:table-cell; #top:50%; width:100%; border:none; margin:0px; padding:0px; vertical-align:middle;">';d[d.length]=
'<div id="'+b+'"; style="#position:relative; width:100%; #top:-50%; border:none; margin:0px; padding:0px; text-align:center;"></div></div></div>';c.innerHTML=d.join("");for(var d=c=c.firstChild,e=c.getElementsByTagName("div");0<e.length;)d=e[0],e=d.getElementsByTagName("div");d.appendChild(a);return c},createTextElement:function(a,b,c,d,e,g,n,q,v,A,x,y,D,T,aa,C,U,r){c=Z.Utils.createContainerElement("div","textBoxFor-"+a,"inline-block","absolute","hidden",c,d,e,g,q,v,"white","0px",n,"normal");d=document.createElement("textarea");
c.appendChild(d);e=d.style;d.id=a;d.value=b;d.readOnly=A;e.width="100%";e.height="100%";e.margin="0";e.border="0";this.stringValidate(x)&&(e.fontFamily=x);this.stringValidate(y)&&(e.fontSize=y);this.stringValidate(D)&&(e.resize=D);this.stringValidate(T)&&(d.columns=T);this.stringValidate(aa)&&(d.rows=aa);this.stringValidate(C)&&(e.overflowX=C);this.stringValidate(U)&&(e.overflowY=U);this.stringValidate(r)&&(d.wrap=r,"off"==r&&(e.whiteSpace="nowrap"));return c},getChildElementByID:function(a,b){for(var c=
null,d=0,e=a.childNodes.length;d<e&&(c=a.childNodes[d],c.id!=b)&&(c=Z.Utils.getChildElementByID(c,b),null===c);d++);return c},getElementPosition:function(a){for(var b=0,c=0,d="fixed"==this.getElementStyle(a).position,e=this.getOffsetParent(a,d);e;)b+=a.offsetLeft,c+=a.offsetTop,d&&(a=this.getPageScroll(),b+=a.x,c+=a.y),a=e,d="fixed"==this.getElementStyle(a).position,e=this.getOffsetParent(a,d);return new this.Point(b,c)},getOffsetParent:function(a,b){return b&&a!=document.body?document.body:a.offsetParent},
getElementSize:function(a){return new this.Point(a.clientWidth,a.clientHeight)},getElementStyle:function(a){if(a.currentStyle)return a.currentStyle;if(window.getComputedStyle)return window.getComputedStyle(a,"");this.showMessage(this.getResource("z283"))},getElementStyleProperty:function(a,b){if(window.getComputedStyle)return window.getComputedStyle(a,null).getPropertyValue(b);if(a.currentStyle)return a.currentStyle[b];this.showMessage(this.getResource("z283"))},isElementFluid:function(a){var b,c,
d,e,g,n=a.cloneNode(!1);d=c=!1;window.getComputedStyle?value=window.getComputedStyle(n,null).width:n.currentStyle&&(value=n.currentStyle.width);"undefined"!==typeof value&&null!==value&&""!==value?c=-1!=value.toString().indexOf("%")||"auto"==value:(n.style.margin="0",n.style.padding="0",n.style.maxWidth="none",n.style.minWidth="none",b=document.createElement("testContainer"),b.style.display="block",b.style.width="800px",b.style.padding="0",b.style.margin="0",b.appendChild(n),a.parentNode.insertBefore(b,
a),c=n.offsetWidth,b.style.width="900px",n.offsetWidth==c?(a.parentNode.removeChild(b),c=!1):(e=Math.floor(.125*c),g=Math.floor(100/900*n.offsetWidth),a.parentNode.removeChild(b),c=e==g?!0:!1));0==d&&(window.getComputedStyle?value=window.getComputedStyle(n,null).height:n.currentStyle&&(value=n.currentStyle.height),"undefined"!==typeof value&&null!==value&&""!=value?d=-1!=value.toString().indexOf("%")||"auto"==value:(n.style.margin="0",n.style.padding="0",n.style.maxHeight="none",n.style.minHeight=
"none",b=document.createElement("testContainer"),b.style.display="block",b.style.height="800px",b.style.padding="0",b.style.margin="0",b.appendChild(n),a.parentNode.insertBefore(b,a),d=n.offsetHeight,b.style.height="900px",n.offsetHeight==d?(a.parentNode.removeChild(b),d=!1):(e=Math.floor(.125*d),g=Math.floor(100/900*n.offsetHeight),a.parentNode.removeChild(b),d=e==g?!0:!1)));return c||d},getEventTargetCoords:function(a){return getElementPosition(Z.Utils.target(a))},getFirstTouch:function(a){var b=
null,c=a.touches;a=a.changedTouches;"undefined"!==typeof c?b=c[0]:"undefined"!==typeof a&&(b=a[0]);return b},getMousePosition:function(a){var b=0,c=0;"DOMMouseScroll"==a.type&&Z.browser==Z.browsers.FIREFOX&&3>Z.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(/&#38;/g,"&");a=a.replace(/&#038;/g,"&");return a=a.replace(/&amp;/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(;0<a.length;)a.pop()},arrayIndexOf:function(a,
b,c){c?0>c&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;c<d;c++)if(a[c]===b)return c;return-1},arrayIndexOfObjectValue:function(a,b,c,d){if("undefined"!==typeof a){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var e=a.length;d<e;d++)if(a[d][b]===c)return d}return-1},arrayIndexOfObjectTwoValues:function(a,b,c,d,e,g){if("undefined"!==typeof a){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var n=a.length;d<n;d++)if(a[d][b]===c&&a[d][e].toString()===g.toString())return d}return-1},arrayIndexOfObjectValueSubstring:function(a,
b,c,d,e){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var g=a.length;d<g;d++)if(e){if(-1!=a[d][b].toLowerCase().indexOf(c))return d}else if(-1!=a[d][b].indexOf(c))return d;return-1},arraySplice:function(a,b,c){if(Z.arraySpliceSupported)if(3<arguments.length)for(var d=3,e=arguments.length;d<e;d++)a.splice(b,c,arguments[d]);else a.splice(b,c);else{0>c&&(c=0);var g=[];if(3<arguments.length)for(d=3,e=arguments.length;d<e;d++)g[g.length]=arguments[d];for(var d=Z.Utils.arraySubarray(a,0,b),n=Z.Utils.arraySubarrayLen(a,
b,c),e=Z.Utils.arraySubarray(a,b+c),g=d.concat(g,e),d=a.length=0,e=g.length;d<e;d++)a[a.length]=g[d];a=n}return a},arraySubarraySimple:function(a,b){return this.slice(a,b)},arraySortNumericAscending:function(a,b,c){a.sort(function(a,b){return a-b});return a},arraySubarray:function(a,b,c){0>b&&(b=0);if(!c||c>a.length)c=a.length;if(b==c)return[];for(var d=[];b<c;b++)d[d.length]=a[b];return d},arraySubarrayLen:function(a,b,c){if(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;e<b+c;e++)d[d.length]=a[e];return d},arrayToArrayOfStrings:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b[c]="undefined"!==typeof a[c]&&"undefined"!=a[c]&&null!==a[c]?a[c].toString():"";return b},arrayUnique:function(a){for(var b=1;b<a.length;)a[b-1]==a[b]?a=Z.Utils.arraySplice(a,b,1):b++;return a},arrayUniqueByObjectValue:function(a,b){if("undefined"!==typeof a)for(var c=1;c<a.length;)a[c-1][b]==a[c][b]?a=Z.Utils.arraySplice(a,c,1):c++;return a},
calculatePointsDistance:function(a,b,c,d){return Math.sqrt((a-=c)*a+(b-=d)*b)},fullScreenView:function(a,b,c){if("undefined"===typeof c||null===c)c=!1;b?(b=document.documentElement,b.requestFullScreen?(a.requestFullScreen(),Z.Utils.addEventListener(document,"fullscreenchange",Z.Viewport.fullScreenEscapeHandler)):b.mozRequestFullScreen?(a.mozRequestFullScreen(),Z.Utils.addEventListener(document,"mozfullscreenchange",Z.Viewport.fullScreenEscapeHandler)):b.webkitRequestFullScreen?(a.webkitRequestFullScreen(),
Z.Utils.addEventListener(document,"webkitfullscreenchange",Z.Viewport.fullScreenEscapeHandler)):b.msRequestFullscreen&&(a.msRequestFullscreen(),Z.Utils.addEventListener(document,"MSFullscreenChange",Z.Viewport.fullScreenEscapeHandler))):document.cancelFullScreen?(c||document.cancelFullScreen(),Z.Utils.removeEventListener(document,"fullscreenchange",Z.Viewport.fullScreenEscapeHandler)):document.msExitFullscreen?(c||document.msExitFullscreen(),Z.Utils.removeEventListener(document,"MSFullscreenChange",
Z.Viewport.fullScreenEscapeHandler)):document.mozCancelFullScreen?(c||document.mozCancelFullScreen(),Z.Utils.removeEventListener(document,"mozfullscreenchange",Z.Viewport.fullScreenEscapeHandler)):document.webkitCancelFullScreen&&(c||document.webkitCancelFullScreen(),Z.Utils.removeEventListener(document,"webkitfullscreenchange",Z.Viewport.fullScreenEscapeHandler))},rotatePoint:function(a,b,c){var d=Math.PI/180*-c;c=a*Math.cos(d)-b*Math.sin(d);a=a*Math.sin(d)+b*Math.cos(d);return new Z.Utils.Point(c,
a)},rotateElement:function(a,b,c){if(b!=Z.imageR||c)b="rotate("+b.toString()+"deg)",a.transform=b,a.msTransform=b,a.mozTransform=b,a.webkitTransform=b,a.oTransform=b},getDisplayPositionRotated:function(a,b){if("undefined"===typeof b||null===b)b=Z.imageR;0>b&&(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;c<a;++c)b[c]=0}else b=a.slice(0);b.subarray=Z.Utils.arraySubarraySimple;b.buffer=b;b.byteLength=
b.length;b.set=Z.Utils.setSimple;"object"===typeof a&&a.buffer&&(b.buffer=a.buffer);return b},setSimple:function(a,b){2>arguments.length&&(b=0);for(var c=0,d=a.length;c<d;++c,++b)this[b]=a[c]&255},encodeBase64:function(a){var b,c,d,e,g=0,n=0,q="",q=[];if(!a)return a;do b=a[g++],c=a[g++],d=a[g++],e=b<<16|c<<8|d,b=e>>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<a.length);q=q.join("");a=a.length%3;return(a?q.slice(0,a-3):q)+"===".slice(a||3)},validateResponseArrayFunctionality:function(){"ZoomifyImageFile"!=Z.tileSource||Z.responseArraySupported||Z.responseArrayPrototyped||(Z.Utils.defineObjectProperty(XMLHttpRequest.prototype,"response",{get:function(){return(new VBArray(this.responseBody)).toArray()}}),
Z.responseArrayPrototyped=!0)},defineObjectProperty:function(a,b,c){Z.definePropertySupported?Object.defineProperty(a,b,c):(delete a[b],"get"in c&&a.__defineGetter__(b,c.get),"set"in c&&a.__defineSetter__(b,c.set),"value"in c&&(a.__defineSetter__(b,function(a){this.__defineGetter__(b,function(){return a});return a}),a[b]=c.value))},createImageElementFromBytes:function(a,b){function c(a){d.onload=null;d.onabort=null;d.onerror=null;e&&window.clearTimeout(e);window.setTimeout(function(){b(d)},1)}var d=
new Image,e=null,g=parseFloat(this.getResource("z139")),n=function(){c(!1)};d.onload=function(){c(!0)};d.onabort=n;d.onerror=n;e=window.setTimeout(function(){console.log(Z.Utils.getResource("z253"));c(!1)},g);d.src=a},cacheProofPath:function(a){a+="?t"+(new Date).getTime().toString()+"n"+Z.cacheProofCounter.toString();Z.cacheProofCounter+=1;return a},easing:function(a,b,c,d){b-=a;return 1>(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")}};