/* Zoomify Image Viewer, version on line 25 below. Copyright Zoomify, Inc., 1999-2018. 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="5.23.5 Pro";Z.setCallback=function(a,b){"undefined"===typeof Z.callbacks&&(Z.callbacks=[]);var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackName",a,null,"callbackFunction",b);-1==c&&(c=Z.callbacks.length);Z.callbacks[c]={callbackName:a,callbackFunction:b}}; Z.showImage=function(a,b,c){if(Z.showImage.done)Z.Utils.declareGlobals(),Z.pageContainerID=a,"undefined"!==typeof b&&Z.Utils.stringValidate(b)?Z.imagePath=Z.Utils.stringRemoveTrailingSlash(b):Z.imagePath=null,"undefined"!==typeof c&&(Z.parameters=Z.Utils.parseParameters(c)),Z.initialize();else{Z.showImage.done=!0;Z.Utils.addCrossBrowserMethods();Z.Utils.addCrossBrowserEvents();Z.Utils.declareGlobals();Z.pageContainerID=a;Z.setEditPermissionFunction=function(a){Z.externalEditPermissionFunction=a}; Z.clearCallback=function(a,b){var c=Z.Utils.arrayIndexOfObjectTwoValues(Z.callbacks,"callbackName",a,null,"callbackFunction",b);-1!=c&&(Z.callbacks=Z.Utils.arraySplice(Z.callbacks,c,1))};a="undefined"!==typeof b&&Z.Utils.stringValidate(b);var d="undefined"!==typeof c&&("string"===typeof c&&-1!=c.indexOf("zIIIFServer")||"object"===typeof c&&"undefined"!==typeof c.zIIIFServer);a&&-1!=b.indexOf("zXMLParametersPath")?(b=b.substring(19,b.length),Z.xmlParametersPath=Z.Utils.stringRemoveTrailingSlash(b)): Z.imagePath=d?"IIIFImageServer":a?Z.Utils.stringRemoveTrailingSlash(b):null;"undefined"!==typeof c&&("string"===typeof c&&(c=unescape(c),c=Z.Utils.stringUnescapeAmpersandCharacters(c)),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.pageContainer=document.getElementById(Z.pageContainerID);Z.xmlParametersPath&&!Z.parameters?Z.loadParametersXML():null!==Z.parameters&&"undefined"!==typeof Z.parameters.zXMLParametersPath?Z.Utils.setParameters(Z.parameters):(Z.Utils.setParameters(Z.parameters),(!Z.localUse||"ZoomifyZIFFile"!=Z.tileSource&&"ZoomifyPFFFile"!= Z.tileSource)&&Z.createViewer(),1!=Z.debug&&2!=Z.debug&&3!=Z.debug||Z.Utils.trace(Z.Utils.getResource("z445"),!1,!0))};Z.createViewer=function(){Z.Viewer=new Z.ZoomifyImageViewer;Z.Utils.stringValidate(Z.copyrightPath)?Z.Utils.enforceCopyright():Z.Viewer.configureViewer()};Z.loadParametersXML=function(){Z.xmlParametersParsing=!0;var a=new Z.NetConnector,b=Z.Utils.cacheProofPath(Z.xmlParametersPath);a.loadXML(b,null,"loadingParametersXML")}; Z.ZoomifyImageViewer=function(){function a(a,b){"undefined"!==typeof a&&Z.Utils.stringValidate(a)||(a=Z.helpPath);"undefined"!==typeof b&&Z.Utils.stringValidate(b)||(b="helpCustom");(new Z.NetConnector).loadHTML(a,w.receiveHelpHTML,null,"loadingHelpHTML-"+b)}function b(a){if(a=Z.Utils.event(a)){var b=null;if(null!==Z.editing&&Z.Viewport.verifyEditsUnsaved())return b=Z.Utils.getResource("ALERT_UNSAVEDEDITSEXIST-BROWSER"),a.returnValue=b}}function c(){Z.Utils.showMessage(Z.Utils.getResource("z291")+ this.url,!0)}function d(a){(a=Z.Utils.event(a))&&C&&(Z.Utils.removeEventListener(C,"mousedown",d),Z.Utils.addEventListener(Z.ViewerDisplay,"mousemove",e),Z.Utils.addEventListener(Z.ViewerDisplay,"mouseup",f),a=Z.Utils.getMousePosition(a),dragPtStart=new Z.Utils.Point(a.x,a.y),new Z.Utils.Point(parseFloat(C.style.left),parseFloat(C.style.top)),C.mouseXPrior=dragPtStart.x,C.mouseYPrior=dragPtStart.y)}function e(a){if((a=Z.Utils.event(a))&&C){a=Z.Utils.getMousePosition(a);dragPtCurrent=new Z.Utils.Point(a.x, a.y);var b=dragPtCurrent.x-C.mouseXPrior,c=dragPtCurrent.y-C.mouseYPrior;C.mouseXPrior=dragPtCurrent.x;C.mouseYPrior=dragPtCurrent.y;a=C.style;var b=parseFloat(a.left)+b,c=parseFloat(a.top)+c,d=parseFloat(a.width,10),e=parseFloat(a.height,10);0>b&&(b=0);b+d>Z.viewerW&&(b=Z.viewerW-d);0>c&&(c=0);c+e>Z.viewerH&&(c=Z.viewerH-e);a.left=b+"px";a.top=c+"px"}}function f(a){if((a=Z.Utils.event(a))&&C){a=Z.Utils.getMousePosition(a);a=Z.mouseOutDownPoint?Z.mouseOutDownPoint:new Z.Utils.Point(a.x,a.y);Z.Utils.removeEventListener(Z.ViewerDisplay, "mousemove",e);Z.Utils.removeEventListener(Z.ViewerDisplay,"mouseup",f);Z.Utils.addEventListener(C,"mousedown",d);var b=a.x-C.mouseXPrior,c=a.y-C.mouseYPrior;a=C.style;b=parseFloat(a.left)+b;c=parseFloat(a.top)+c;a.left=b+"px";a.top=c+"px"}}function g(a){if(a=Z.Utils.event(a))if(a.preventDefault(),Z.interactive&&C&&(a=Z.Utils.getFirstTouch(a)))a=new Z.Utils.Point(a.pageX,a.pageY),dragPtStart=new Z.Utils.Point(a.x,a.y),C.mouseXPrior=a.x,C.mouseYPrior=a.y}function t(a){if(a=Z.Utils.event(a)){a.preventDefault(); if(!Z.interactive||!Z.mousePan)return;if(C&&(a=Z.Utils.getFirstTouch(a))){a=new Z.Utils.Point(a.pageX,a.pageY);var b=C.style,c=parseFloat(b.left),d=parseFloat(b.top);b.left=c+(a.x-C.mouseXPrior)+"px";b.top=d+(a.y-C.mouseYPrior)+"px";C.mouseXPrior=a.x;C.mouseYPrior=a.y}}return!1}function u(a){if(a=Z.Utils.event(a))if(a.preventDefault(),Z.interactive&&C&&(a=Z.Utils.getFirstTouch(a))){a=new Z.Utils.Point(a.pageX,a.pageY);a=new Z.Utils.Point(a.x,a.y);var b=a.x-C.mouseXPrior,c=a.y-C.mouseYPrior;a=C.style; b=parseFloat(a.left)+b;c=parseFloat(a.top)+c;a.left=b+"px";a.top=c+"px"}}function B(a){if(a=Z.Utils.event(a))if(a.preventDefault(),Z.interactive&&C&&(a=Z.Utils.getFirstTouch(a))){a=new Z.Utils.Point(a.pageX,a.pageY);a=new Z.Utils.Point(a.x,a.y);var b=a.x-C.mouseXPrior,c=a.y-C.mouseYPrior;a=C.style;b=parseFloat(a.left)+b;c=parseFloat(a.top)+c;a.left=b+"px";a.top=c+"px"}}function N(a){function b(){Z.clearCallback("readyViewer",b);Z.viewportCurrent=Z.Viewport0;Z.overlays&&(Z.imageSetStart=Z.imageSetLength- 1);w.viewportSelect(Z.imageSetStart)}Z.imagePath="multiple";Z.tileSourceMultiple&&Z.Utils.validateImagePath(a[0].media);Z.setCallback("readyViewer",b);for(var c=0,d=a.length;ca?a-Z.navigatorW:Z.navigatorL,0!=Z.navigatorT?Z.navigatorT: d,Z.navigatorFit),1f&&(f=0);f+n>Z.viewerW&&(f=Z.viewerW-n);0>g&&(g=0);g+r>Z.viewerH&&(g=Z.viewerH-r);C.style.left=f+"px";C.style.top=g+"px"}Z.imageList&&Z.Viewport.getStatus("initializedImageList")&& Z.Viewport.setSizeAndPositionImageList();Z.slideList&&"undefined"!==typeof slideList&&null!==slideList&&(f=Z.Viewport.calculateSlideListCoords(Z.viewerW,Z.viewerH),slideList.style.left=f.x+"px",slideList.style.top=f.y+"px");Z.Gallery&&Z.Gallery.getInitialized()&&(Z.Gallery.setSizeAndPosition(a,b,c,d),Z.galleryAutoShowHide&&Z.Gallery.setVisibility(!0));0a&&(Z.imageSetLoop?(a<-b&&(a=-(-a%b)),0>a&&(a+=b+1)):a=0);w.viewportSelect(a)};this.viewportNext=function(a){a="undefined"===typeof a||null===a?0:Math.round(a);var b=Z.imageSetLength-1;a=Z.viewportCurrentID+(1+a);a>b&&(a=Z.imageSetLoop?a%(b+1):b);w.viewportSelect(a)};this.viewportSelect=function(a,b){var c=Z.mouseIsDown||Z.buttonIsDown||Z.keyIsDown,d=null===Z.Viewport;if("undefined"=== typeof a||null===a)a=0;a=Math.abs(a);if(a!=Z.viewportCurrentID||!c){var e=a.toString(),f=Z["Viewport"+e],g=f==Z.viewportCurrent;"undefined"===typeof f||g&&!d&&c||(c=Z.viewportCurrentID.toString(),d=Z.viewportCurrent,Z.viewportCurrent=f,Z.viewportCurrentID=a,Z.comparison||Z.viewportCurrent.setVisibility(!0),Z.Viewport=Z.viewportCurrent,g||Z.comparison||Z.overlays||d.setVisibility(!1),Z.Utils.validateCallback("viewportChanged"),Z.comparison&&Z.Viewport0&&Z.Viewport1&&(f=document.getElementById("viewportContainer0"), g=document.getElementById("viewportContainer1"),Z.Utils.swapZIndices(f,g),f=a,Z.Navigator&&Z.Navigator.setSelected(0==f),Z.Navigator2&&Z.Navigator2.setSelected(1==f)),Z.viewportCurrent&&Z.viewportCurrent.getStatus("initializedViewport")&&(f=Z.viewportCurrent.getViewW()!=Z.viewerW||Z.viewportCurrent.getViewH()!=Z.viewerH,Z.comparison||(f?Z.viewportCurrent.syncViewportResize(Z.imageX,Z.imageY,Z.imageZ,Z.imageR):(0!=Z.imageR&&Z.viewportCurrent.rotateSet(Z.imageR,!1,!0),Z.viewportCurrent.updateView(!0))), d&&(Z.hotspotFileShared||Z.annotationFileShared)&&(d=d.getHotspots())&&Z.viewportCurrent.setHotspots(d),!Z.comparison&&Z.Navigator&&Z.Navigator.getInitialized()&&0Nf?(Ab=la(Zb,Z.initialZ),ra&&Xa.scale(Ab,Ab)):cb&&(cb.width="0px",cb.height="0px");$b=la(Ta,Z.initialZ);Qb=wa=la(ta,Z.initialZ);if(Z.useCanvas)try{hb.scale(wa,wa)}catch(q){Z.Utils.showMessage(Z.Utils.getResource("ERROR_SCALINGCANVASFORUNCONVERTEDIMAGE"),!1,Z.messageDurationStandard,"center"),console.log("In function initializeViewportContinue scaling canvas: "+q)}Ua&&ga();Z.virtualPointerVisible&&Z.Viewer.createVirtualPointer(); 0Nf?(Ab=la(Zb,Z.initialZ),ra&&(Xa.restore(),Xa.scale(Ab,Ab))):cb&&(cb.width="0px",cb.height="0px");$b=la(Ta,Z.initialZ);Qb=wa=la(ta,Z.initialZ);Z.useCanvas&&(hb.restore(),hb.scale(wa,wa));Ua&&ga();qa&&(m.setDrawingColor("buttonColor0"+Ga,!0),(Z.hotspots||Z.tour)&&h(Ga)); Z.virtualPointerVisible&&Z.Viewer.createVirtualPointer();"unconverted"!=Z.tileSource&&m.z619();if(Z.narrative||Z.comparison)ea=Z.viewerW;m.setSizeAndPosition(ea,fa,ff,gf);k="undefined"!==typeof Z.parameters&&null!==Z.parameters&&("undefined"!==typeof Z.parameters.zInitialX||"undefined"!==typeof Z.parameters.zInitialY||"undefined"!==typeof Z.parameters.zInitialZoom);!Z.comparison&&!Z.overlays||k?Zc(Z.initialX,Z.initialY,Z.initialZ,Z.initialR,null,!0):Zc(Z.priorX,Z.priorY,Z.priorZ,Z.priorR,null,!0); Z.Utils.validateCallback("imageChanged");m.setStatus("initializedViewport",!0);(k=0==a?Z.Navigator:Z.Navigator2)&&k.setImage(m.getImagePath());Z.comparison&&(k=(0==m.getViewportID()?Z.Viewport1:Z.Viewport0).getCoordinatesFull(!0),m.setView(k.x,k.y,k.z,k.r,null,null));k=Z["Viewport"+(Z.imageSetLength-1).toString()];Z.Viewer.configureComponents(Z.overlays?k:Z.viewportCurrent);m.syncViewportRelated();Z.Utils.validateCallback("reinitializedViewport");Z.slideshowPlaying&&m.nextSlide()}function N(){$a= 1;Ta=ta=0;Of=Pf=Qf=db=!1;"undefined"!==typeof qb&&Z.Utils.arrayClear(qb);"undefined"!==typeof Hb&&Z.Utils.arrayClear(Hb);"undefined"!==typeof Ya&&Z.Utils.arrayClear(Ya);"undefined"!==typeof Cb&&Z.Utils.arrayClear(Cb);"undefined"!==typeof Ib&&Z.Utils.arrayClear(Ib);"undefined"!==typeof td&&Z.Utils.arrayClear(td);"undefined"!==typeof ne&&Z.Utils.arrayClear(ne);"undefined"!==typeof yc&&Z.Utils.arrayClear(yc);"undefined"!==typeof Ng&&Z.Utils.arrayClear(Ng);"undefined"!==typeof $c&&Z.Utils.arrayClear($c); "undefined"!==typeof Id&&Z.Utils.arrayClear(Id);"undefined"!==typeof zc&&Z.Utils.arrayClear(zc);"undefined"!==typeof Og&&Z.Utils.arrayClear(Og);"undefined"!==typeof jf&&Z.Utils.arrayClear(jf);"undefined"!==typeof Va&&Z.Utils.arrayClear(Va);"undefined"!==typeof kf&&Z.Utils.arrayClear(kf)}function D(k){if("undefined"===typeof k||null===k)k=0;var a=k.toString();Z.useCanvas&&!ra&&(tc=Z.Utils.createContainerElement("canvas","oversizeDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px", "none","0px","transparent","0px","0px","normal"),Z.ViewerDisplay.appendChild(tc),ra=tc,cb=ra.style);!Z.comparison&&!Z.narrative||ad||(bd=Z.Utils.createContainerElement("div","comparisonMaskContainer"+a,"inline-block","absolute","hidden","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),Z.ViewerDisplay.appendChild(bd),ad=bd,ud=ad.style);Ha||(ab=Z.Utils.createContainerElement("div","viewportContainer"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px", "transparent","0px","0px","normal"),Z.comparison||Z.narrative?bd.appendChild(ab):Z.ViewerDisplay.appendChild(ab),Ha=ab,M=Ha.style);sa||(Mc=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportBackfillDisplay"+a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Mc),sa=Mc,ja=sa.style,Z.hideOverlayBackfill&&0!=k&&(ja.display="none"));xa||(oe=Z.Utils.createContainerElement(Z.useCanvas?"canvas":"div","viewportDisplay"+ a,"inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(oe),xa=oe,Aa=xa.style);Z.useCanvas&&!ac&&(Rf=Z.Utils.createContainerElement("canvas","transitionCanvas","none","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Rf),ac=Rf,cd=ac.style);Z.watermarks&&!Ua&&(Sf=Z.Utils.createContainerElement("div","watermarkDisplay","inline-block","absolute","visible","1px","1px","0px", "0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Sf),Ua=Sf,Nc=Ua.style);Z.maskVisible&&!Ma&&(Tf=Z.Utils.createContainerElement("canvas","maskCanvas","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Tf),Ma=Tf,rb=Ma.style,rb.display="none");k=Z.zoomRectangle||Z.measureVisible||Z.tour&&!Z.screensaver||Z.hotspots||Z.annotations;var a=Z.useCanvas&&(k||Z.hotspots&&Z.labelShapesInternal),b=Z.useCanvas&&(Z.zoomRectangle|| Z.measureVisible||null!==Z.editMode),l=a&&Z.saveImageHandlerProvided;a&&!eb&&(Uf=Z.Utils.createContainerElement("canvas","drawingDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Uf),eb=Uf,Jb=eb.style);b&&!Wa&&(Vf=Z.Utils.createContainerElement("canvas","editingDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Vf),Wa=Vf,Kb=Wa.style); k&&!qa&&(Jd=Z.Utils.createContainerElement("div","hotspotDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Jd),qa=Jd,Lb=qa.style,Z.Utils.addEventListener(Jd,"mousedown",Z.Utils.preventDefault));l&&!pe&&(Wf=Z.Utils.createContainerElement("canvas","savingDisplay","inline-block","absolute","visible","1px","1px","0px","0px","none","0px","transparent","0px","0px","normal"),ab.appendChild(Wf),pe=Wf,lf=pe.style,lf.display= "none");Z.useCanvas||(sa.innerHTML="",xa.innerHTML="");Ua&&(Ua.innerHTML="");qa&&(qa.innerHTML="")}function O(){Z.useCanvas&&(ra&&(Xa=ra.getContext("2d")),sb=sa.getContext("2d"),hb=xa.getContext("2d"),Kd=ac.getContext("2d"),eb&&(qe=eb.getContext("2d")),Wa&&(Ba=Wa.getContext("2d")),Ma&&(J=Ma.getContext("2d")),pe&&(Xf=pe.getContext("2d")))}function ha(k,b,p,l){if("undefined"===typeof p||null===p)p=0;if("undefined"===typeof l||null===l)l=0;ea=Z.narrative?k-Z.narrativeW:Z.comparison?k/2:k;k=1==Z.toolbarVisible&& Z.toolbarBackgroundVisible?null!==Z.toolbarH?Z.toolbarH:parseInt(Z.Utils.getResource("DEFAULT_TOOLBARHEIGHT"),10):0;fa=Z.viewerH-k;ff=0;gf=0==Z.toolbarPosition?k:0;k=1;if(Z.rotationVisible||0!=Z.imageR)k=Math.sqrt(ea*ea+fa*fa)/((ea+fa)/2);Ca=ea*Pg*k;Da=fa*Pg*k;k=Z.imageSet?Wh:"unconverted"==Z.tileSource&&Z.mobileDevice?Xh:"unconverted"==Z.tileSource&&Z.browser==Z.browsers.FIREFOX?Yh:Zh;b=Z.constrainPanStrict?Z.imageW:2*Z.imageW;var c=Z.constrainPanStrict?Z.imageH:2*Z.imageH;Ca>k&&(Ca=k);Da>k&&(Da= k);Ca>b&&(Ca=b);Da>c&&(Da=c);CaSa||b>Qa;)a/=2,b/=2,$a++;for(var a=Z.imageW,b=Z.imageH,k=0,l=$a-1;0<=l;l--)qb[l]=a,Hb[l]=b,Ya[l]=Math.ceil(qb[l]/Sa),Cb[l]=Math.ceil(Hb[l]/Qa),Ib[l]=Ya[l]*Cb[l],a/=2,b/=2,k+=Ib[l];uc=$a-1;nf=Ya[uc]-1;of=Cb[uc]-1;if("DZIFolder"==Z.tileSource){a=qb[0];b=Hb[0];for(l=0;1Sa||a>Qa;)k=Math.floor(Z.imageW/b),a=Math.floor(Z.imageH/b),b*=2,k%2&&k++,a%2&&a++,$a++;uc=$a-1;nf=Ya[uc]-1;of=Cb[uc]-1;k=Z.imageW;a=Z.imageH;b=2;tileCounter=0;for(l=$a-1;0<=l;l--)Ya[l]=Math.floor(k/Sa),k%Sa&&Ya[l]++,Cb[l]=Math.floor(a/Qa),a%Qa&&Cb[l]++,Ib[l]=Ya[l]*Cb[l],tileCounter+=Ib[l],qb[l]=k,Hb[l]=a,k=Math.floor(Z.imageW/b),a=Math.floor(Z.imageH/b),b*=2,k%2&&k++,a%2&& a++;k=tileCounter;k!=xc&&Z.Utils.showMessage(Z.Utils.getResource("z254"),!1,Z.messageDurationStandard,"center")}}}function n(k,a){for(var b=Ya[k]-1,l=Cb[k]-1,c=0;c<=b;c++)for(var L=0;L<=l;L++)a[a.length]=k+"-"+c+"-"+L}function Q(){db=!1;Ta=0;ta>Nf?(Ta=ta-$h,db=!0):Ta=ta>Rg?re:ta>Sg?pf:qf;for(var k=Ta.toString(),a=0,b=Za.length;a=k.l&&l.c<=k.r&&l.r>=k.t&&l.r<=k.b&&(Cc[Cc.length]=l.name,Pc[Pc.length]=l,c=Z.Utils.arrayIndexOf(ya,l.name),-1!=c&&(ya=Z.Utils.arraySplice(ya,c,1)));a=0;for(b=Mb.length;a=k.l&&l.c<=k.r&&l.r>=k.t&&l.r<=k.b&&(c=Z.Utils.arrayIndexOf(Cc,l.name),-1==c&&(Cc[Cc.length]=l.name,Pc[Pc.length]=l),l=Z.Utils.arrayIndexOf(ya, l.name),-1!=l&&(ya=Z.Utils.arraySplice(ya,l,1)));if(0!=se){a=0;for(b=ec.length;a=c.l&&f.c<=c.r&&f.r>=c.t&&f.r<=c.b)&&(L[L.length]=b[d])}if(0=b.l&&L.c<=b.r&&L.r>=b.t&&L.r<=b.b)&&ia(ac,k,L)}}function aa(k){Ub=null;Ub=new Image;Ub.onload=S;Ub.onerror=P;Ub.src=k}function S(){if("undefined"!==typeof Ub){var k=Z.Utils.createContainerElement("div","testImageContainer","inline-block","absolute","hidden",ea+"px",fa+"px","0px","0px","none","0px","transparent","0px","0px","normal",null,!0);k.appendChild(Ub); k.removeChild(Ub);var k=null,k=Ub.width,a=Ub.height;0!=k&&0!=a?u(k,a,k,a,null,null,null,null,null,null,null):window.setTimeout(function(){S()},100)}else window.setTimeout(function(){S()},100)}function P(){Z.Utils.showMessage(Z.Utils.getResource("ERROR_UNCONVERTEDIMAGEPATHINVALID"))}function C(k,a,b,l){var c="undefined"!==typeof l&&null!==l?"-"+l:"";if(0e&&(e=g.c),g.rh&&(h=g.r)))}k=d+(e-d)/2;l=f+(h-f)/2;for(b=0;bIb[k]?8*(Ib[k]-l):Md;this.chunkStart=td[k]+b*Md;this.chunkEnd=this.chunkStart+l;this.offsetStartInChunk=a-this.chunkStart;this.chunkID=k.toString()+"-"+b.toString()}function va(k,a,b){b=a+b*Ya[k];a=4*b+$c[k];b=Math.floor(b/Ra);var l=b*Ra,l=l+Ra>Ib[k]?4*(Ib[k]-l):Nd;this.chunkStart=$c[k]+b*Nd;this.chunkEnd=this.chunkStart+l;this.bcStartInChunk=a-this.chunkStart;this.chunkID=k.toString()+"-"+b.toString()}function E(k,a,b,l,c){"tile"==k?(k=(parseInt(a,10)+Z.dziSubfoldersToSkip+1).toString(),b=Z.imagePath+ "/"+Z.dziImageSubfolder+"/"+k+"/"+b+"_"+l+"."+Z.tileType):b=Z.imagePath+"/"+Z.dziImagePropertiesFilename;if(Z.browser==Z.browsers.IE&&9>Z.browserVersion||0==vc)b=Z.Utils.cacheProofPath(b);return b}function X(k,a,b){var l=m.getViewportID();kf[k]=b;var c=new Z.NetConnector;null===Z.tileHandlerPathFull?c.loadByteRange(Z.imagePath,k,a,"loadingPFFFileBytes","offset",null,b,l):(b=tb.replace(".","%2E"),c.loadXML(Z.tileHandlerPathFull+"?filePath="+b+"&requestType=2&begin="+k+"&end="+a,"loadingPFFChunkServletXML"))} function H(k,a){for(var b=0,l=Na.length;bvc&&Mb.length>vc;)Fc=Z.Utils.arraySplice(Fc,0,1),Mb=Z.Utils.arraySplice(Mb,0,1);Ld=0}m.traceDebugValues("onTileLoad",k.name,k.loadTime);m.updateProgress(Ld,se)}sf==tf+dd&&m.setStatus("displayLoadedViewport",!0)}else"undefined"!==typeof a&&null!==a||console.log(Z.Utils.getResource("z280")+k.name+".jpg")}function Fa(k,a){if(k&&a&&k.imagePath==Z.imagePath){k.image=a;var b=k.name;ib[ib.length]=k;var l=Z.Utils.arrayIndexOf(Za, b);-1!=l&&(Za=Z.Utils.arraySplice(Za,l,1));if("ZoomifyZIFFile"==Z.tileSource||"ZoomifyPFFFile"==Z.tileSource)b=Z.Utils.arrayIndexOf(lc,b),-1!=b&&(lc=Z.Utils.arraySplice(lc,b,1));k.alpha=1;k.t==Ta&&ia(sa,Ta,k);m.traceDebugValues("onTileBackfillPrecache",k.name);Ug==uf&&(m.setStatus("precacheLoadedViewport",!0),0l.alpha+eg?l.alpha+=eg:(l.alpha=1,k++),ia(xa,ta,l),k>=b&&(window.clearInterval(rf),rf=null,a=b)):(ec=Z.Utils.arraySplice(ec,a,1),Dc=Z.Utils.arraySplice(Dc,a,1),l=Z.Utils.arrayIndexOf(ya,l.name),-1!=l&&(ya=Z.Utils.arraySplice(ya, l,1)),b--)}}function ia(k,a,b){if("z647"!=b.url.substr(0,8)&&0!=b.image.width&&0!=b.image.height){var l=b.x,c=b.y;a=ca(a,1);Ab=la(Zb,m.getZoom());var d=8b.alpha&&"transitionCanvas"!=k.id&&-1==k.id.indexOf("oversizeDisplay")&&"savingDisplay"!=k.id&&!Vg&&(a.globalAlpha=b.alpha),a.drawImage(b.image,l,c),Z.alphaSupported&& 1>b.alpha&&"transitionCanvas"!=k.id&&-1==k.id.indexOf("oversizeDisplay")&&"savingDisplay"!=k.id&&!Vg&&(a.globalAlpha=1),2!=Z.debug&&4!=Z.debug||pa(k,b.name,l,c,wa)):(k==xa?(l-=Z.imageX*a-Sb/wa,c-=Z.imageY*a-Tb/wa,a=wa):a=$b,b.elmt||(b.elmt=Z.Utils.createContainerElement("img"),b.elmt.onmousedown=Z.Utils.preventDefault,Z.Utils.addEventListener(b.elmt,"contextmenu",Z.Utils.preventDefault),b.elmt.src=b.url,b.style=b.elmt.style,b.style.position="absolute",Z.Utils.renderQuality(b,Z.renderQuality),Z.cssTransformsSupported&& (b.style[Z.cssTransformProperty+"Origin"]="0px 0px")),b.elmt.parentNode!=k&&k.appendChild(b.elmt),d=b.style,d.display="none",Z.cssTransformsSupported?d[Z.cssTransformProperty]=["matrix(",(b.image.width/b.elmt.width*a).toFixed(8),",0,0,",(b.image.height/b.elmt.height*a).toFixed(8),",",(l*a).toFixed(8),Z.cssTransformNoUnits?",":"px,",(c*a).toFixed(8),Z.cssTransformNoUnits?")":"px)"].join(""):(d.width=b.image.width*a+"px",d.height=b.image.height*a+"px",d.left=l*a+"px",d.top=c*a+"px"),d.display="inline-block", Z.Utils.setOpacity(b,b.alpha),2!=Z.debug&&4!=Z.debug||pa(k,b.name,l,c,a));k==xa?(m.traceDebugValues("z507",b.name),sf==te&&m.setStatus("displayDrawnViewport",!0)):(m.traceDebugValues("z507Backfill",b.name),cg<=fg&&m.setStatus("backfillDrawnViewport",!0))}}function pa(k,a,b,l,c){if(Z.useCanvas){var d=parseInt(Z.Utils.getResource("z129"),10),e=parseInt(Z.Utils.getResource("z160"),10),f=parseInt(Z.Utils.getResource("z151"),10),d=Math.round(d*c),e=2*(df?f:d);k=k.getContext("2d");k.font=e+"px verdana"; k.textAlign="left";k.textBaseline="top";e=Sa*c/2;c=Qa*c/2;k.fillStyle="#FFFFFF";k.fillText(a,b+e,l+c);k.fillStyle="#000000";k.fillText(a,b+e+1,l+c+1)}else{var d=parseInt(Z.Utils.getResource("z129"),10),e=parseInt(Z.Utils.getResource("z160"),10),f=parseInt(Z.Utils.getResource("z151"),10),d=Math.round(d*c),m=2*(df?f:d),e=parseInt(Z.Utils.getResource("z130"),10)*c,f=Z.Utils.createContainerElement("div","tileNameTextBox","inline-block","absolute","hidden","auto","auto","1px","1px","none","0px", "transparent","0px",e+"px","nowrap"),d=document.createTextNode(a);f.appendChild(d);k.appendChild(f);Z.Utils.setTextNodeStyle(d,"white","verdana",m+"px","none","normal","normal","normal","normal","1em","center","none");var h=Z.Utils.createContainerElement("div","tileNameTextBox2","inline-block","absolute","hidden","auto","auto","1px","1px","none","0px","transparent","0px",e+"px","nowrap"),g=document.createTextNode(a);h.appendChild(g);k.appendChild(h);Z.Utils.setTextNodeStyle(g,"black","verdana",m+ "px","none","normal","normal","normal","normal","1em","center","none");e=parseFloat(f.style.padding);k=parseFloat(Z.Utils.getElementStyleProperty(f,"width"));isNaN(k)&&(k=parseFloat(Z.Utils.getResource("z115")),k=parseFloat(f.style.fontSize)/k,k=Math.round(parseFloat(a.length*k)));a=Sa*c/2;m=Qa*c/2;f.style.left=b*c+(a-k/2-e)+"px";f.style.top=l*c+m+"px";h.style.left=1+b*c+(a-k/2-e)+"px";h.style.top=1+l*c+m+"px";Z.Utils.addEventListener(f,"contextmenu",Z.Utils.preventDefault);Z.Utils.disableTextInteraction(d); Z.Utils.addEventListener(h,"contextmenu",Z.Utils.preventDefault);Z.Utils.disableTextInteraction(g)}}function Pa(k,a){var b=ca(a,1),l=Math.floor(k.l*b/Sa),c=Math.floor(k.r*b/Sa),d=Math.floor(k.t*b/Qa),b=Math.floor(k.b*b/Qa);0>l&&(l=0);c>Ya[a]-1&&(c=Ya[a]-1);0>d&&(d=0);b>Cb[a]-1&&(b=Cb[a]-1);this.l=l;this.r=c;this.t=d;this.b=b}function na(k,a,b,l,c,d,e,f,m){"undefined"===typeof f||null===f?(this.l=k+b/e,this.r=k+l/e,this.t=a+c/e,this.b=a+d/e):(e=ea/qb[f],f=fa/Hb[f],this.l=k+b*e,this.r=k+l*e,this.t= a+c*f,this.b=a+d*f);m&&(this.l-=256-this.l%256,this.r+=256-this.r%256,this.t-=256-this.t%256,this.b+=256-this.b%256)}function ca(k,a){return qb[k]/Z.imageW*a}function la(k,a){return a/(qb[k]/Z.imageW)}function Ea(k,a,b,l,c){if(Z.constrainPan&&0==l){b="undefined"!==typeof b&&null!==b?b:Z.imageZ;l="undefined"!==typeof l&&null!==l?Math.round(l):Math.round(Z.imageR);0>l&&(l+=360);var d=k,e=a;"image"==c&&(a=m.convertImageCoordsToViewportEdgeCoords(k,a,b,l),k=a.x,a=a.y);var f=Z.imageW,h=Z.imageH,g=Math.round(f* b),n=Math.round(h*b);Math.round(f*b/2);Math.round(h*b/2);var f=ea,h=fa,q=Math.round(.1*ea),r=Math.round(.1*fa),I=Math.round(.5*ea),G=Math.round(.5*fa),U,w;U=I-kb+(Z.imageCtrX-Z.imageX)*b+k;w=G-lb+(Z.imageCtrY-Z.imageY)*b+a;var ca=U+g/2,ga=w-n/2,Q=U+g/2,v=w+n/2,A=U-g/2,Nb=w+n/2,la=Z.Utils.getPositionRotated(U-g/2,w-n/2,U,w,l),ca=Z.Utils.getPositionRotated(ca,ga,U,w,l),Q=Z.Utils.getPositionRotated(Q,v,U,w,l),Nb=Z.Utils.getPositionRotated(A,Nb,U,w,l);U=Math.min(la.x,ca.x,Q.x,Nb.x);w=Math.min(la.y,ca.y, Q.y,Nb.y);A=Math.max(la.x,ca.x,Q.x,Nb.x);la=Math.max(la.y,ca.y,Q.y,Nb.y);A-U>f||!Z.constrainPanStrict?3==Z.constrainPanLimit?k=0I?k-(U-I):A9*q?k-(U-9*q):AI-g/2?k-(U-(I-g/2)):Ah||!Z.constrainPanStrict?3==Z.constrainPanLimit?a=0G?a-(w-G):la9*r?a-(w-9*r):la G-n/2?a-(w-(G-n/2)):laZ.maxZ?(k=Z.maxZ,Z.Utils.validateCallback("zoomConstrainedMax")):k=k?k+=360: 360<=k&&(k-=360);return k}function La(){Z.comparison&&0!=Ga?Z.Navigator2&&Z.Navigator2.syncToViewport():Z.Navigator&&Z.Navigator.syncToViewport()}function Ka(k){if(0=ue;if(2==Z.debug||3==Z.debug)Z.Utils.trace("View validation-time elapsed: "+ vd),0k.l&&Gk.t&&Ua.constrainedScaleMax?a.constrainedScaleMax:e;"text"==k.mediaType?(a=new Db,e=k.z/100,hCaption=xf(k,a),qa.appendChild(hCaption),k=new Yg(hCaption,e,!0),qa.removeChild(hCaption), c=k.w/l*e,d=k.h/l*e):"shape"==k.mediaType?(c=k.w,d=k.h,c=k.xScale/100*c*e,d=k.yScale/100*d*e):"polygon"==k.media&&(a=new Z.Utils.PolygonDimensions(k.polygonPts,b),c=a.w,d=a.h,c=k.xScale/100*c*e,d=k.yScale/100*d*e);this.w=c;this.h=d}function ob(){if(Z.Utils.stringValidate(Z.geoCoordinatesPath)){var k=Z.Utils.cacheProofPath(Z.geoCoordinatesPath);(new Z.NetConnector).loadXML(k,null,"loadingGeoCoordinatesXML")}}function h(k){var a;Z.Utils.stringValidate(Bb)&&(Z.simplePath?a=Bb:(".xml"!=Bb.toLowerCase().substring(Bb.length- 4,Bb.length)&&(a=Z.tour?Z.Utils.getResource("z227"):Z.Utils.getResource("z135"),Bb=Bb+"/"+a),a=Z.Utils.cacheProofPath(Bb)));"undefined"!==typeof a&&Z.Utils.stringValidate(a)&&(vpIDTemp=Z.imageSet?k:null,k=new Z.NetConnector,-1!=a.toLowerCase().indexOf(".xml")?k.loadXML(a,vpIDTemp,"loadingAnnotationsXML"):-1!=a.toLowerCase().indexOf(".json")&&k.loadJSON(a,vpIDTemp,"loadingAnnotationsJSON"))}function U(k,a){var b=Z.Utils.arrayIndexOfObjectValue(mc,"media",k.media);if(-1!=b){var l=new Image;l.src=k.media; var c=l.width,l=l.height;mc[b].element&&(k.image=mc[b].element.cloneNode(!1));k.w=c;k.h=l;a&&(b=new Db,Pd(k,b))}else mc[mc.length]={media:k.media,element:null},b=(new Date).getTime(),c=k.media,Zg.loadImage(c,Z.Utils.createCallback(null,ve,c,b),"loadingHotspotMedia")}function I(k){var a;a=k.getAttribute("ID");this.id=""!=a?a:A("labelExternal");a=k.getAttribute("INTERNALID");this.internalID=isNaN(parseInt(a))?ua?A("hotspot"):A("label"):a;this.poiID=k.getAttribute("POIID");a=k.getAttribute("NAME");this.name= ""!=a?a:this.id;this.mediaType=k.getAttribute("MEDIATYPE");this.media=k.getAttribute("MEDIA");this.image=null;a=k.getAttribute("X");a="center"==a?Z.imageCtrX:parseFloat(a);this.x=isNaN(a)?0:a;a=k.getAttribute("Y");a="center"==a?Z.imageCtrY:parseFloat(a);this.y=isNaN(a)?0:a;a=parseFloat(k.getAttribute("ZOOM"));this.z=isNaN(a)?-1:a;a=parseFloat(k.getAttribute("XSCALE"));this.xScale=isNaN(a)?100:a;a=parseFloat(k.getAttribute("YSCALE"));this.yScale=isNaN(a)?100:a;a=parseFloat(k.getAttribute("RADIUS")); this.radius=isNaN(a)?null:a;var b=this.media,l=this.mediaType,c=!1,d=!1;Z.Utils.stringValidate(b)&&(c=-1!=b.indexOf("/circle.")||-1!=b.indexOf("/square.")||-1!=b.indexOf("/triangle.")||-1!=b.indexOf("/arrowDownLeft.")||-1!=b.indexOf("/arrowDownRight.")||-1!=b.indexOf("/arrowUpLeft.")||-1!=b.indexOf("/arrowUpRight.")||-1!=b.indexOf("/arrowUp.")||-1!=b.indexOf("/arrowDown.")||-1!=b.indexOf("/arrowLeft.")||-1!=b.indexOf("/arrowRight.")||-1!=b.indexOf("/lineHorizontal.")||-1!=b.indexOf("/lineVertical."), d="fov"==b||"arrow"==b||"line"==b||"square"==b||"rectangle"==b||"circle"==b||"ellipse"==b||"triangle"==b||"polygon"==b||"counter"==b||"polyLine"==b,isInternalMedia="External Graphics File"!=b&&(d||c&&Z.labelShapesInternal));a=parseFloat(k.getAttribute("ZMIN"));this.zMin=isNaN(a)?0:a;a=parseFloat(k.getAttribute("ZMAX"));this.zMax=isNaN(a)?0:a;a=parseFloat(k.getAttribute("ROTATION"));this.rotation=isNaN(a)?0:a;a=k.getAttribute("CLICKURL");this.clickURL="function"==a?a:Z.Utils.stringValidateURLScheme(k.getAttribute("CLICKURL")); this.urlTarget=k.getAttribute("URLTARGET");a=k.getAttribute("ROLLOVER");this.rollover="1"==a||"true"==a;this.caption=k.getAttribute("CAPTION");a=k.getAttribute("ROLLOVERCAPTION");this.rolloverCaption="1"==a||"true"==a;this.comment=k.getAttribute("COMMENT");this.tooltip=k.getAttribute("TOOLTIP");this.user=k.getAttribute("USER");this.initials=k.getAttribute("INITIALS");this.date=k.getAttribute("DATE");this.textColor=(a=k.getAttribute("TEXTCOLOR"))?Z.Utils.stringValidateColorValue(a):Z.Utils.getResource("z25"); this.backColor=(a=k.getAttribute("BACKCOLOR"))?Z.Utils.stringValidateColorValue(a):Z.Utils.getResource("z22");this.lineColor=(a=k.getAttribute("LINECOLOR"))?Z.Utils.stringValidateColorValue(a):Z.Utils.getResource("CONTENT_LABELLINECOLOR");this.fillColor=(a=k.getAttribute("FILLCOLOR"))?Z.Utils.stringValidateColorValue(a):Z.Utils.getResource("CONTENT_LABELCOLOR");a=k.getAttribute("TEXTVISIBLE");this.textVisible="false"!=a&&"0"!=a&&(Z.captionTextVisible||"text"==this.mediaType||"measure"==this.mediaType); a=k.getAttribute("BACKVISIBLE");this.backVisible="false"!=a&&"0"!=a&&(Z.captionBackVisible||"text"==this.mediaType||"measure"==this.mediaType);a=k.getAttribute("LINEVISIBLE");this.lineVisible="false"!=a&&"0"!=a&&Z.labelLineVisible;a=k.getAttribute("FILLVISIBLE");this.fillVisible="true"==a||"1"==a||Z.labelFillVisible;a=k.getAttribute("CAPTIONPOSITION");this.captionPosition="fieldofview"==this.mediaType?"5":Z.Utils.stringValidate(a)?a:Z.captionPosition?Z.captionPosition:"8";a=k.getAttribute("SAVED"); this.saved=null===a?!0:a;this.visibilityCaption=this.visibility=!0;a=k.getElementsByTagName("CAPTION");0this.w&&(this.w=400),400>this.h&&(this.h=400)):(l=parseFloat(k.getAttribute("WIDTH")), c=parseFloat(k.getAttribute("HEIGHT")),isNaN(l)&&isNaN(c)?(this.w=gg,this.h=we):(this.w=l?l:this.radius?2*this.radius:"rectangle"==b||"ellipse"==b?2*we:gg,this.h=c?c:this.radius?2*this.radius:"line"==b?we/4:we)):this.h=this.w=null;this.audio=k.getAttribute("AUDIO");Z.Utils.stringValidate(this.audio)&&(Z.audioContent=!0);a=parseFloat(k.getAttribute("SHOWFOR"));this.showFor=isNaN(a)?0:a;this.transition=k.getAttribute("TRANSITION");a=parseFloat(k.getAttribute("CHANGEFOR"));this.changeFor=isNaN(a)?0: a;this.category=k.getAttribute("CATEGORY");this.zIndex=v.length.toString();a=k.getAttribute("EDITABLE");this.editable="false"!=a&&"0"!=a;this.lineStyle=k.getAttribute("LINESTYLE");this.rolloverCaptionPrior=this.rolloverPrior=this.highlight=!1}function G(a,b,p){if(a&&b&&p){b=new Db;for(var l=0,c=v.length;l=p)){if(!Z.hotspotsDrawOnlyInView||a.x+gd>b.box.l&&a.x-gdb.box.t&&a.y-gdb.box.l&&a.xb.box.t&&a.yb.constrainedScaleMax&&(d=b.constrainedScaleMax))); p=k.xScale/100*d*k.w;var d=k.yScale/100*d*k.h,f;"placeholder"!=k.media&&k.image&&(f=k.image,f.align="top",f.width=p,f.height=d);var h=Math.round(k.x*b.currentZ-p/2-b.displayOffsetL+b.imageOffsetL),g=Math.round(k.y*b.currentZ-d/2-b.displayOffsetT+b.imageOffsetT),n=e=null;c||(Z.captionBoxes||"measure"==k.mediaType?e=xf(k,b):(n=xf(k,b,!0,!0),e=xf(k,b,!0,!1)));var q=Z.Utils.createContainerElement("div","hCloak","inline-block","absolute","visible");b="hot"+k.internalID.toString()+(Z.imageSet?"-"+a.toString(): "");var r=p,I=d;"fieldofview"==k.mediaType?(r=100*Z.imageZ,I=100*Z.imageZ):-1!=k.media.indexOf("arrow")&&(r*=.7,I*=.7,h+=(p-r)/2,g+=(d-I)/2);b=Z.Utils.createContainerElement("div",b,"inline-block","absolute","visible",r+"px",I+"px",h+"px",g+"px","none","0px","transparent","0px","0px","normal");"undefined"===typeof yf||null===yf||"TOOLTIP"==yf?b.title=Z.Utils.stringValidate(k.tooltip)?k.tooltip:"":"COMMENT"==yf&&(b.title=Z.Utils.stringValidate(k.comment)?k.comment:"");if((!Z.labelClickSelect||null=== Z.editMode)&&Z.Utils.stringValidate(k.clickURL)){if(null!==Z.editMode)Z.Utils.addEventListener(q,"mousedown",ci),Z.Utils.addEventListener(q,"touchstart",di);else if("function"==k.clickURL)Qd&&null===Y&&(Y=v.length),Z.Utils.addEventListener(b,"mousedown",ig),Z.Utils.addEventListener(b,"touchstart",ig),Z.Utils.addEventListener(b,"touchmove",ig),Z.Utils.addEventListener(b,"mouseup",jg),Z.Utils.addEventListener(b,"touchend",jg),Z.Utils.addEventListener(b,"touchcancel",jg);else{if("shape"==k.mediaType|| "polygon"==k.mediaType){var r=Z.Utils.createContainerElement("div","hClicker","inline-block","absolute","visible",r+"px",I+"px","0px","0px","none","0px","transparent","0px","0px","normal"),G=document.createElement("a");G.setAttribute("href",k.clickURL);G.setAttribute("target",k.urlTarget);G.setAttribute("outline","none");G.appendChild(r);r.style.cursor="help"}if(f){var U=document.createElement("a");U.setAttribute("href",k.clickURL);U.setAttribute("target",k.urlTarget);U.setAttribute("outline","none"); U.appendChild(f);f.style.cursor="help";f.style.border="none"}if(e){var w=document.createElement("a");w.setAttribute("href",k.clickURL);w.setAttribute("target",k.urlTarget);w.setAttribute("outline","none");n&&(w.appendChild(n),n.style.cursor="help");w.appendChild(e);e.style.cursor="help"}q.style.border="none"}null===Z.editMode&&(Z.clickZoom||Z.clickPan)&&(Z.Utils.addEventListener(b,"mousedown",ei),Z.Utils.addEventListener(b,"touchstart",fi))}Z.labelClickSelect&&null!==Z.editMode||!Z.Utils.stringValidate(k.clickURL)|| null!==Z.editMode||"function"==k.clickURL?(f&&q.appendChild(f),n&&q.appendChild(n),e&&q.appendChild(e)):(G&&q.appendChild(G),U&&q.appendChild(U),w&&q.appendChild(w));"placeholder"!=k.popup&&k.popupImage&&(w=k.popupImage,w.style.display="none",w.id="popup",G=Z.Utils.createContainerElement("div","hPopupContainer","inline-block","absolute","visible"),G.appendChild(w),q.appendChild(G),U=-(w.width/2)+p/2,w=-(w.height/2)+d/2,U=0!=k.popupOffsetX?k.popupOffsetX+U:U,w=0!=k.popupOffsetY?k.popupOffsetY+w:w, 0!=U&&0!=w&&(G.style.left=U+"px",G.style.top=w+"px"));b.appendChild(q);qa.appendChild(b);b.zIndex=k.zIndex;b.style.zIndex=k.zIndex;Z.annotationXMLAperioLoad&&!c&&Z.captionBoxes&&!k.rolloverCaption&&(U=(Z.Utils.stringValidate(k.backColor)?k.backColor:bh).toString())&&(c=Z.Utils.hexToRGB(U).r,G=Z.Utils.hexToRGB(U).g,U=Z.Utils.hexToRGB(U).b,e.style.backgroundColor="rgba("+c+","+G+","+U+","+gi+")");k.rollover&&(q.rollover=k.rollover);b.internalID=k.internalID;l?(c=!k.rollover&&k.visibility,(q=b.firstChild)&& q.style&&(q.style.visibility="visible",l=c?"visible":"hidden",q.style.backgroundColor=c?"":"#FFFFFF",Z.Utils.setOpacity(q,c?1:.01),c=b.firstChild.childNodes.length,0Ae?Ae:this.currentZ,this.constrainedScaleMax=Ae,this.constrainedScaleMin=ze,this.displayOffsetL=(Z.imageW*this.currentZ-qa.width)/2,this.displayOffsetT=(Z.imageH*this.currentZ-qa.height)/2,this.imageOffsetL=(Z.imageW/2-Z.imageX)*this.currentZ,this.imageOffsetT=(Z.imageH/2-Z.imageY)*this.currentZ)}function vb(a){if("undefined"===typeof a||null===a)a=document.getElementById("progressTextBox");var b=null;-1!=a.id.indexOf("hot")&&-1==a.id.indexOf("hotspotDisplay")?b=a:a.parentNode&&-1!= a.parentNode.id.indexOf("hot")&&-1==a.parentNode.id.indexOf("hotspotDisplay")?b=a.parentNode:a.parentNode.parentNode&&-1!=a.parentNode.parentNode.id.indexOf("hot")&&-1==a.parentNode.parentNode.id.indexOf("hotspotDisplay")?b=a.parentNode.parentNode:a.parentNode.parentNode.parentNode&&-1!=a.parentNode.parentNode.parentNode.id.indexOf("hot")&&-1==a.parentNode.parentNode.parentNode.id.indexOf("hotspotDisplay")&&(b=a.parentNode.parentNode.parentNode);return b}function eh(a,b){for(var p=b.x-a.x,l=b.y-a.y, c=a.polygonPts.slice(0),d=0,e=c.length;db.constrainedScaleMax&&(d=b.constrainedScaleMax));b=Math.round(fh*d);b="text"==a.mediaType? b:bAf?Af:b;"counter"==a.mediaType&&(b+=2);var d=pi*d,e=dhh?hh:d,f,h,d=Z.Utils.stringValidate(a.textColor)?a.textColor:kd;h=Z.Utils.stringValidate(a.backColor)?a.backColor:bh;"undefined"!==typeof p&&null!==p&&p?(f="0px",h="transparent",p="counter"!=a.mediaType?"normal":"bold"):(f="1px",p="normal");"undefined"!==typeof l&&null!==l&&l&&(d=a.backColor);a.textVisible||(d="transparent");Z.captionBoxes&&Z.captionsColorsDefault&&"measure"!=a.mediaType&&!Z.annotationXMLAperioLoad&&(d=a.backColor, h=a.textColor);d==h&&("#ffffff"==d?h="#000000":"#000000"==d&&(h="#ffffff"));l=Z.Utils.createContainerElement("div",c,"inline-block","absolute","hidden","auto","auto","1px","1px","solid",f,h,"0px",e+"px","pre");"undefined"!==typeof a.captionHTML&&Z.Utils.stringValidate(a.captionHTML)?(l.innerHTML=a.captionHTML,Z.Utils.setHTMLTextDefaultCaptionStyle(l,a.captionHTML,d,"verdana",b+"px","none","normal","normal","normal","normal","1em","center","none")):"transparent none"!=d&&"undefined"!==typeof a.caption&& Z.Utils.stringValidate(a.caption)?(a=document.createTextNode(a.caption),l.appendChild(a),Z.Utils.setTextNodeStyle(a,d,"verdana",b+"px","none","normal","normal","normal",p,"1em","center","none"),Z.Utils.disableTextInteraction(a)):"measure"==a.mediaType&&(c=new Z.Utils.Point(a.x,a.y),ih(a,c));Z.Utils.addEventListener(l,"contextmenu",Z.Utils.preventDefault);return l}function kg(a,b,p,l,c){if(b){"arrow"==a.media&&(a.captionPosition=180d&&(d+=360);var n=new Yg(b);a=(p-n.w)/2-g;f=(l-n.h)/2-g;Z.Utils.rotateElement(h,-d);if(0==d%90){h=d;e=parseInt(e,10);0>h&&(h+=360);switch(e){case 1:e=0==h?e:90==h?7:180==h?9:270==h?3:5;break;case 2:e=0==h?e:90==h?4:180==h?8:270==h?6:5;break;case 3:e=0==h?e:90==h?1:180==h?7:270==h? 9:5;break;case 4:e=0==h?e:90==h?8:180==h?6:270==h?2:5;break;case 6:e=0==h?e:90==h?2:180==h?4:270==h?8:5;break;case 7:e=0==h?e:90==h?9:180==h?3:270==h?1:5;break;case 8:e=0==h?e:90==h?6:180==h?2:270==h?4:5;break;case 9:e=0==h?e:90==h?3:180==h?1:270==h?7:5}e=e.toString();e=parseInt(e,10);p=p/2+n.w/2+g+m;l=l/2+n.h+g+m;if(90==d||270==d)d=p,p=l,l=d;switch(e){case 1:a-=p;f-=l;break;case 2:f-=l;break;case 3:a+=p;f-=l;break;case 4:a-=p;break;case 6:a+=p;break;case 7:a-=p;f+=l;break;case 8:f+=l;break;case 9:a+= p,f+=l}}if(d=new Z.Utils.Point(a,f))c=c?1:0,b.style.left=d.x+c+"px",b.style.top=d.y+c+"px"}}function Yg(a,b,p){if("undefined"===typeof b||null===b)b=1;var l=a.style,c=m.getZoom(),d=parseFloat(Z.Utils.getElementStyleProperty(a,"width"));isNaN(d)&&(d=parseFloat(Z.Utils.getResource("z115")),d=parseFloat(l.fontSize)/d,d=Math.round(parseFloat(a.firstChild.length*d)));a=parseInt(Z.Utils.getResource("z129"),10);parseFloat(l.fontSize);var l=2*parseFloat(Z.Utils.getResource("z160")),e=2*parseFloat(Z.Utils.getResource("z151")); b=1.7*a*c/b;p&&(be&&(b=e));this.w=d;this.h=b}function ih(a,b){var p=a.polyClosed,l=a.polygonPts.slice(0),c=l.length,d="",e=0,f="",h="pixels"==Z.units?0:4,m="um"!=Z.units?Z.units:"\u03bcm";0==c?(d=qi,e=Z.Utils.polygonPerimeter(l,p,b,h),captionText=d+e.toString()+" "+m):0p.constrainedScaleMax&&(d=p.constrainedScaleMax));p=Math.round(fh*d);Z.Utils.setTextNodeStyle(a.firstChild,c,"verdana",("text"==b.mediaType?p:pAf?Af:p)+"px","none","normal","normal","normal",Z.captionBoxes||"measure"==b.mediaType||"counter"!= b.mediaType?"normal":"bold","1em","center","none")}function Qg(a,b,p,c){var d=Z.imageSet?13:25;switch(a){case "0":c=a=0;break;case "1":c=a=d;break;case "2":a=p-b-d;c=Z.imageSet?32:20;break;case "3":a=p-b-d;c=0d&&(p=1)}return p}function lh(){Ma&&(Ma.width=xa.width,Ma.height=xa.height,rb.width=Aa.width,rb.height=Aa.height,rb.left=Aa.left,rb.top=Aa.top,J.restore(), J.save(),J.translate(Sb,Tb))}function ng(){if(Ma){Z.Utils.clearDisplay(Ma);J.save();J.scale($b,$b);var a=ca(Ta,1);J.translate(-(Z.imageX-Z.imageW/2)*a,-(Z.imageY-Z.imageH/2)*a);J.drawImage(sa,-sa.width/2,-sa.height/2,sa.width,sa.height);J.restore();J.drawImage(xa,-xa.width/2,-xa.height/2,xa.width,xa.height);a=J.getImageData(0,0,Ma.width,Ma.height);a=Z.Utils.filterImage(a,"grayscale","",void 0);J.putImageData(a,0,0)}}function mh(a,b){("undefined"===typeof a||null===a)&&"undefined"!==typeof Be&&null!== Be&&0l?10:l:0):(l=og/q,c.lineWidth=a.lineVisible?8>l?l:8:0),c.fillStyle=a.fillColor);c.strokeStyle=a.lineColor;c.globalAlpha=1;l=a.w;q=a.h;y=x=0;var r=a.rotation?a.rotation:0;g||Tc||!a.highlight|| (a.rollover&&(a.rolloverPrior=!0,a.rollover=!1),m.drawHighlight(c,h,l,q,x,y,r,null,null,null,null,a));m.drawShape(c,h,l,q,x,y,r,a.lineColor,a.lineStyle,a.fillColor,a.fillVisible);g&&(h=m.getZoom(),m.drawShapeEditor(a,c,l,q,x,y,h,r,1/((b+n)/2)));c.restore();b=new Db;h=a.internalID;d?drawCaptionOnCanvas(a,b,f,null,null,!0,e):Z.mouseIsDown&&"undefined"!==typeof h&&null!==h&&"undefined"!==typeof f&&!Ja&&hg(a,b,f,!0);c.restore()}d&&validateDrawLabelCount()}}function jd(a,b,c,l,d,e,h){if(Z.useCanvas&&("polygon"== a.media||l)){if(a.visibility||a.rollover||c){c=a.internalID;if("undefined"!==typeof a.polygonPts&&null!==a.polygonPts&&0q?15:q:0):h.lineWidth=a.lineVisible?sh/g/n:0,h.fillStyle=a.fillColor);q=a.lineColor==Z.Utils.getResource("CONTENT_LABELLINECOLOR");h.strokeStyle="measure"==a.mediaType&&q?"#000000":a.lineColor;q=a.x;f=a.y;h.beginPath();if(a.polygonPts){var r=a.polygonPts.slice(0);"measure"!=Z.labelMode||a.polyClosed||pc||"undefined"===typeof b||null===b||(r[r.length]={x:b.x,y:b.y});!Tc&&a.highlight&&m.drawHighlight(h,null,null,null,q,f,null,null,null,null,null,a,r,l);Fe(h,a,r,q,f,l)}else{var I=100/ a.z*a.w,G=100/a.z*a.h,q=0,f=-1==a.media.indexOf("triangle")?0:.23*a.h,I=Math.max(I,G)/2*1.2;h.arc(q,f,I,0,2*Math.PI);h.stroke()}if(!l&&"view"!=Z.labelMode&&(null===Z.editMode&&"measure"==Z.labelMode||"addLabel"==Z.editing||"editLabel"==Z.editing)&&("shape"==Z.labelMode&&4==r.length||"polygon"==Z.labelMode||"measure"==Z.labelMode)&&a.internalID==Y&&"undefined"!==typeof a&&null!==a&&"freehand"!=a.mediaType&&(!Z.narrative||Z.narrativeMode))for(g=1/g/n,n=0,I=r.length;n=e)&&(h=d.media,f=d.mediaType,-1!=h.indexOf("/circle.")||-1!=h.indexOf("/square.")||-1!=h.indexOf("/triangle.")||-1!=h.indexOf("/arrowDownLeft.")||-1!=h.indexOf("/arrowDownRight.")||-1!=h.indexOf("/arrowUpLeft.")||-1!=h.indexOf("/arrowUpRight.")||-1!=h.indexOf("/arrowUp.")||-1!=h.indexOf("/arrowDown.")|| -1!=h.indexOf("/arrowLeft.")||-1!=h.indexOf("/arrowRight.")||-1!=h.indexOf("/lineHorizontal.")||h.indexOf("/lineVertical."),e="fov"==h||"arrow"==h||"line"==h||"square"==h||"rectangle"==h||"circle"==h||"ellipse"==h||"triangle"==h||"counter"==h||"polyLine"==h,h=h&&"polygon"==h,((f="fieldofview"==f&&null!==Z.editMode)||e||h)&&d.visibility&&(a||"fieldofview"!=Z.labelMode&&"shape"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||"undefined"===typeof Y||null===Y||Y!==c))){var m=d.x,g=d.y;if(!Z.hotspotsDrawOnlyInView|| m+gd>b.box.l&&m-gdb.box.t&&g-gdd&&(d+=4);var e=b+1;3c&&(a=l?0:null)):(--a,0>a&&(a=l? c:null)),d=Z.hotspots?null!==a?v[a].transition:null:Z.slideshow?null!==a?wb[a].transition:null:null;return a}function Me(){var a=Z.imageX!=Z.priorX||Z.imageY!=Z.priorY||Z.imageZ!=Z.priorZ||Z.imageR!=Z.priorR;!Z.preventDupCall&&a&&(Z.priorX=Z.imageX,Z.priorY=Z.imageY,Z.priorZ=Z.imageZ,Z.priorR=Z.imageR);Z.preventDupCall="undefined"!==typeof called&&null!==called}function Zc(a,b,c,l,d,e){e||m.zoomAndPanAllStop();Z.maskingSelection&&Z.maskClearOnUserAction&&m.clearMask();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 l||null===l)l=Z.imageR;if("center"==a||isNaN(parseFloat(a)))a=Z.imageCtrX;if("center"==b||isNaN(parseFloat(b)))b=Z.imageCtrY;if(-1==c||isNaN(parseFloat(c)))c=Z.fitZ;"undefined"===typeof c||null===c?c=Z.fitZ:1Z.maxZ&&(c/=100);if("undefined"===typeof l||null===l)l=Z.imageR;c=Ia(c);l=ub(l);a=Ea(a,b,c,l,"image");Z.imageX=xd=a.x;Z.imageY=yd=a.y;Z.imageZ=c;l!=Z.imageR&& Z.Utils.rotateElement(M,l);Z.imageR=l;m.updateView(!0);"function"===typeof d&&d()}function Zd(){if(Wc&&(0!=Vb||0!=Wb||0!=Pb))if(Z.tracking&&0==Pb)m.zoomAndPanToView(m.getX()+Vb,m.getY()+Wb);else{var a=Vb,b=Wb,c=Pb,l=m.getZoom();0!=c&&(l=ca(ta,wa*(1+c)),l=Ia(l),l!=Z.imageZ&&$d(l));if(0!=a||0!=b)a=parseFloat(M.left)+a,b=parseFloat(M.top)+b,l=Ea(a,b,l,Z.imageR,"container"),M.left=Math.round(l.x)+"px",M.top=Math.round(l.y)+"px",b=l.x-kb,l=l.y-lb,ra&&db&&(Z.mobileDevice||Math.abs(b)>ea/2||Math.abs(l)> fa/2)&&w(ra,Zb,ib,"simple",!1,"Updating backfill oversize display");v&&30v.length,!1,!1,!1);0==be%2&&m.syncViewportRelated(!1, !1,I,G,I);r=Z.tour&&Z.tourStop&&0==Math.round(Z.imageR%90);beZ.scaleThreshold||h>Z.scaleThreshold))Xa.restore(),Xa.save(),Xa.scale(Ab,Ab),Xa.rotate(Z.imageR*Math.PI/180),w(ra,Zb,ib,"simple",!1,"Updating backfill oversize display");$b=c=la(Ta,a);e=c/tierBackfillScalePrior;c=Ac*e;e*=Bc;h=cc+(Ac-c)/2;d=dc+(Bc-e)/2;ja.width=c+"px";ja.height=e+"px";ja.left=h+"px";ja.top=d+"px"}else ra&&Z.Utils.clearDisplay(ra),e=Ac*c,h=Bc*c,f=cc+Z.imageX*(1-c)*Z.imageZ,g=dc+Z.imageY*(1-c)*Z.imageZ,ja.width=e+"px",ja.height= h+"px",ja.left=f+"px",ja.top=g+"px";else w(xa,ta,Mb,"centerOut",!1,"Scaling: non-canvas zoom"),db?(c=Tg,Ac=Ca*c,Bc=Da*c,cc=-(Ca/c),dc=-(Da/c),$f=Sb*c,ag=Tb*c,sa.width=Ac,sa.height=Bc,ja.width=sa.width+"px",ja.height=sa.height+"px"):(c=Hb[Ta],sa.width=qb[Ta],sa.height=c,c=Z.imageY*a,cc=Sb-Z.imageX*a,dc=Tb-c),ja.left=cc+"px",ja.top=dc+"px",w(sa,Ta,ib,"simple",!1,"Scaling: non-canvas zoom - backfill");c=!0}return c}function ce(){if(Ad&&0!=qc){var a=Z.Utils.arrayIndexOfObjectValue(v,"internalID",Y);if(-1!= a){var a=v[a],b=a.yScale*(1+qc);m.modifyLabel(Y,"xScale",a.xScale*(1+qc),!0,!0);m.modifyLabel(Y,"yScale",b,!1,!0);Ad=window.setTimeout(ce,th)}}}function Oe(){m.toggleFullViewMode(!1)}function de(){Bd&&0!=Cd&&(m.rotateStep(Cd,!1),Bd=window.setTimeout(de,uh),m.syncViewportRelated(!1,v&&40>v.length,!1,!0,!1))}function pb(a){a=Z.Utils.event(a);var b=a.type;if(a&&b){var c=!pc&&("polygon"==Z.labelMode||"measure"==Z.labelMode),d=Z.Utils.isRightMouseButton(a),e=a.altKey;if("mouseover"!=b&&"mouseout"!=b&& !Z.interactive||"mousedown"==b&&(!Z.interactive||Z.coordinatesVisible&&e)||d&&!c)Z.tourStop=!0;else{if("mousedown"==b||"touchstart"==b||Z.tourPlaying&&Z.tourStop)m.zoomAndPanAllStop(),Z.tour&&m.tourStop(),Z.tourStop=!0,Z.interactive=!0;Z.touchSupport&&!Z.clickZoomAndPanBlock&&"touchmove"!=b&&"gesturechange"!=b&&a.preventDefault();if("mousedown"==b)window.setTimeout(function(){m.zoomAndPanAllStop(!1,!0)},1),Z.maskingSelection&&Z.maskClearOnUserAction&&m.clearMask();else if("touchstart"==b||"gesturestart"== b)c=!1,Gb=Z.Utils.getFirstTouch(a),"undefined"!==typeof Gb&&null!==Gb&&(d=vb(Gb.target),null===d?c=!0:(d=d.id.substring(3,d.id.length),d=Z.Utils.arrayIndexOfObjectValue(v,"internalID",d),-1!=d&&(d=v[d],null!==d&&"function"==d.clickURL&&(c=!0)))),c&&a.preventDefault(),m.zoomAndPanAllStop(!1,!0),Z.maskingSelection&&Z.maskClearOnUserAction&&m.clearMask();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",pb);Z.Utils.addEventListener(document,"mouseup",pb);break;case "mouseup":("undefined"===typeof pc||pc)&&Z.Utils.removeEventListener(document,"mousemove",pb),Z.Utils.removeEventListener(document,"mouseup",pb)}Pe(a);if("mousedown"==b||"mousemove"==b)return!1}}}function Pe(b){var c=Ga.toString();Z.annotations&&(m.toggleLabelShapePicker(!1),m.toggleLabelColorPicker(!1), m.toggleLabelLineStylePicker(!1));b=Z.Utils.event(b);var d=b.type,l=b.altKey;if(b&&d){var e;if("touchstart"==d||"touchmove"==d||"touchend"==d||"touchcancel"==d){if(Gb=Z.Utils.getFirstTouch(b))e=Gb.target,nb=new Z.Utils.Point(Gb.pageX,Gb.pageY);Z.gestureSupport||(Dd=Z.Utils.getSecondTouch(b))&&(ug=new Z.Utils.Point(Dd.pageX,Dd.pageY))}else e=Z.Utils.target(b),Z.Utils.relatedTarget(b),Z.Utils.isRightMouseButton(b),"resize"!=d&&(nb=Z.Utils.getMousePosition(b));Z.smoothPan&&nb&&(Jc=nb);var h=m.getZoom(), f=(100*h).toString(),d=nb?m.getClickCoordsInImage(b,h,nb):null;ug&&!Z.gestureSupport&&m.getClickCoordsInImage(b,h,ug);var g=b.type,n=b.touches&&1=h.polygonPts.length||pc?"editControlPoint":"completeLabelPolygon");else if(0==If)"fieldofview"==Z.labelMode||"text"==Z.labelMode||"counter"==Z.labelMode?h="createLabelSimple":"shape"==Z.labelMode?h="createLabelShape":!pc||"editLabel"==Z.editing||"freehand"!=Z.labelMode&&"polygon"!=Z.labelMode&&"measure"!=Z.labelMode||(h="createLabelAndControlPoint"),"counter"!=Z.labelMode&&(If=1);else if(0!=If&& !pc)h=l?"completeLabelPolygon":"z489";else if("view"==Z.labelMode&&l&&Z.zoomRectangle)h="zoomRectangleImage";else if(Z.clickZoom||Z.clickPan||Z.mousePan)l||"view"==Z.labelMode||m.setEditModeLabel("view",null,null,null,!1,null),h="navigateImage"}Re=h;fe=new Z.Utils.Point(nb.x,nb.y);vh=(new Date).getTime();Z.mouseIsDown=!0;Z.altKeyIsDown=l;h=Z.captionPosition?Z.captionPosition:"8";Gf=Hf=!1;switch(Re){case "navigateImage":Z.comparison&&-1!=e.id.indexOf("viewportDisplay")&&Z.Viewer.viewportSelect(parseInt(e.id.substring(e.id.indexOf("viewportDisplay")+ 15,e.id.length)));Z.smoothPan?1Ha.mouseXPrior?Z.Viewer.viewportNext():b.xea/2||Math.abs(d)>fa/2)&&w(ra,Zb,ib,"simple",!1,"Updating backfill oversize display"),b=m.calculateCurrentCenterCoordinates(c, Z.imageZ,Z.imageR),Z.Navigator&&Z.Navigator.z658(b),Z.Utils.setBookmarksURL(),Z.Viewer.syncComparisonViewport(),Z.Viewer.syncOverlayViewports(null,a))));break;case "zoomRectangleImage":ge(Y,Gc,d);break;case "createLabelAndControlPoint":Vd(f,c,d);break;case "z489":"freehand"==Z.labelMode?Z.mouseIsDown&&z511(yh,zh,f,c,d):Vd(f,c,d);break;case "editLabel":Gd(b,nb,Qe);c=b;b=Ja;e=nb;d=b.id.substring(3,b.id.length);d=Z.Utils.arrayIndexOfObjectValue(v,"internalID",d);if(-1!=d){h=m.getZoom();d=v[d];l=d.media; g=d.mediaType;n=f=!1;Z.Utils.stringValidate(l)&&(f=-1!=l.indexOf("/circle.")||-1!=l.indexOf("/square.")||-1!=l.indexOf("/triangle.")||-1!=l.indexOf("/arrowDownLeft.")||-1!=l.indexOf("/arrowDownRight.")||-1!=l.indexOf("/arrowUpLeft.")||-1!=l.indexOf("/arrowUpRight.")||-1!=l.indexOf("/arrowUp.")||-1!=l.indexOf("/arrowDown.")||-1!=l.indexOf("/arrowLeft.")||-1!=l.indexOf("/arrowRight.")||-1!=l.indexOf("/lineHorizontal.")||-1!=l.indexOf("/lineVertical."),n="fov"==l||"arrow"==l||"line"==l||"square"==l|| "rectangle"==l||"circle"==l||"ellipse"==l||"triangle"==l||"polygon"==l||"counter"==l||"polyLine"==l);f=("counter"==g||"shape"==g)&&(!l||"External Graphics File"!=l)&&(n||f&&Z.labelShapesInternal);l=l&&"polygon"==l;(g="fieldofview"==g)?(c=m.getClickCoordsInImage(c,h,e),"Field Of View ("==d.tooltip.substr(0,15)&&(e=Math.round(d.x).toString(),h=Math.round(d.y).toString(),n=Math.round(d.z).toString()+"%",e="("+e+"x, "+h+"y, "+n+")",d.tooltip=Z.Utils.getResource("CONTENT_TOOLTIPFOV")+e,m.setHotspotTooltipInHTML(b, d.tooltip))):(n=e.x-=b.mouseXOffset-parseFloat(b.style.width)/2,b=e.y-=b.mouseYOffset-parseFloat(b.style.height)/2,c=m.getClickCoordsInImage(c,h,new Z.Utils.Point(n,b)));if(f||l||g)l&&eh(d,c),jb();d.x=c.x;d.y=c.y}break;case "editControlPoint":Uc(Y,Gc,d)}break;case "end":Z.mouseIsDown=!1;switch(Re){case "navigateImage":he(b,nb,h,l);break;case "zoomRectangleImage":he(b,nb,h,l);break;case "createLabelSimple":"fieldofview"==Z.labelMode&&m.setEditModeLabel("view");break;case "z489":"freehand"==Z.labelMode&& (m.setEditModeLabel("freehand"),Ie(Y,!1),yh=zh=null);break;case "completeLabelPolygon":Ie(Y,!l);break;case "editLabel":Gd(b,nb,Qe);break;case "editControlPoint":Uc(Y,Gc,d)}break;case "gesturestart":b=Z.Utils.event(b);b.preventDefault();vg=Math.round(100*b.scale)/100;ee||(ee=window.setInterval(Ve,Fi));break;case "gesturechange":vg=Math.round(100*b.scale)/100;Ve(b);break;case "gestureend":ee&&(window.clearInterval(ee),Gf=!0,ee=null);Z.mousePan&&m.updateView();break;case "pinchstart":wg=Z.Utils.calculatePointsDistance(Gb.clientX, Gb.clientY,Dd.clientX,Dd.clientY);if(d=Z.Utils.event(b))d.preventDefault(),b=Z.Utils.getFirstTouch(d),d=Z.Utils.getSecondTouch(d),"undefined"!==typeof b&&"undefined"!==typeof d&&(b=Z.Utils.calculatePointsDistance(b.clientX,b.clientY,d.clientX,d.clientY),xg=Math.round(wg/b*100)/100);Ed||(Ed=window.setInterval(ie,Gi));break;case "pinchchange":d=Z.Utils.calculatePointsDistance(Gb.clientX,Gb.clientY,Dd.clientX,Dd.clientY);xg=Math.round(d/wg*100)/100;ie(b);break;case "pinchend":Ed&&(window.clearInterval(Ed), Hf=!0,Ed=null),Z.mousePan&&m.updateView()}}}function ge(a,b,c,d,e){Tc&&(d?(b=v[a].polygonPts,v.splice(a,1),Tc=null,Y=wh,Z.measureVisible||Z.tour||Z.hotspots||Z.annotations||(Lb.display=Kb.display=Jb.display="none",Z.Utils.removeEventListener(Jd,"mousedown",Z.Utils.preventDefault)),e||m.zoomAndPanToZoomRectangle(b)):Uc(a,b,c))}function Gd(a,b,c){"start"==c?(a=m.z480(a.clientX,a.clientY),Ja.mouseXPrior=b.x,Ja.mouseYPrior=b.y,Ja.mouseXOffset=a.x-parseFloat(Ja.style.left),Ja.mouseYOffset=a.y-parseFloat(Ja.style.top), Ja.style.zIndex=v.length+1):"move"==c?(Ja.style.left=parseFloat(Ja.style.left)+b.x-Ja.mouseXPrior+"px",Ja.style.top=parseFloat(Ja.style.top)+b.y-Ja.mouseYPrior+"px",Ja.mouseXPrior=b.x,Ja.mouseYPrior=b.y):"end"==c&&(Ja.style.zIndex=Ja.zIndex,Ja=null)}function Wd(){if(null!==Z.editMode)for(var a=new Db,b=0,c=v.length;bMath.abs(hc)&&(yb=hc),Math.abs(zb)>Math.abs(ic)&&(zb=ic));c+=zb;af=b+yb;bf=c;var n,q,r,I;"motion"==Z.animator?(n="horizontal"==Z.animationAxis?yb:zb,dimensionAxis="horizontal"==Z.animationAxis?ea:fa,q=Math.round(Hi/Z.imageSetLength), r=n/40,I=0):"position"==Z.animator&&(n="horizontal"==Z.animationAxis?e:h,dimensionAxis="horizontal"==Z.animationAxis?ea:fa,q=Math.max(0,Math.round((dimensionAxis/2-Math.abs(n))/Ii)),r=0,I="horizontal"==Z.animationAxis?ea/10:fa/10);0==q&&q++;0==Z.animationCount%q&&(n<-I?Z.Viewer.viewportPrior(r):n>I&&Z.Viewer.viewportNext(r));gb&&0==Math.round(yb*g)/g&&0==Math.round(zb*g)/g&&(gb=!1)}}else if(Z.mouseIsDown||null!==gb||0==yb||0==zb)Kc(!0),bf=af=null;else if(0!=hc||0!=ic)Ze=Jc.x+hc,$e=Jc.y+ic,gb=!0}else if(h= parseFloat(M.left),e=parseFloat(M.top),Z.mouseIsDown||gb)g=(gb?Ze:Jc.x)-Se.x,n=(gb?$e:Jc.y)-Se.y,q=h-Fd.x,r=e-Fd.y,isNaN(g)||isNaN(n)||isNaN(q)||isNaN(r)||0==g&&0==n&&0==q&&0==r||(I=gb?Z.smoothPanGlide:1,b=gb?1:100,yb=Math.round((g-q)/(Z.smoothPanEasing*I)*b/b),zb=Math.round((n-r)/(Z.smoothPanEasing*I)*b/b),Z.mouseIsDown?(hc=yb,ic=zb):(Math.abs(yb)>Math.abs(hc)&&(yb=hc),Math.abs(zb)>Math.abs(ic)&&(zb=ic)),h+=yb,e+=zb,g=Ea(h,e,Z.imageZ,Z.imageR,"container"),M.left=g.x+"px",M.top=g.y+"px",yb-=h-g.x, zb-=e-g.y,ra&&db&&w(ra,Zb,ib,"simple",!1,"Updating backfill oversize display"),gb&&0==Math.round(yb*b)/b&&0==Math.round(zb*b)/b&&(gb=!1),b=m.calculateCurrentCenterCoordinates(g,Z.imageZ,Z.imageR),Z.comparison&&0!=Ga?Z.Navigator2&&Z.Navigator2.z658(b):Z.Navigator&&Z.Navigator.z658(b),Z.comparison&&Z.Viewer.syncComparisonViewport(),Z.overlays&&Z.Viewer.syncOverlayViewports(null,a),Z.Utils.validateCallback("viewChanging"),Z.Utils.validateCallback("viewPanningGetCurrentCoordinates"),Z.Utils.validateCallback("viewChangingGetCurrentCoordinatesFull")); else if(Z.mouseIsDown||null!==gb||0==yb||0==zb)Kc(!0),m.updateView();else if(g=Ea(h+hc,e+ic,Z.imageZ,Z.imageR,"container"),hc=g.x-h,ic=g.y-e,0!=hc||0!=ic)Ze=Jc.x+hc,$e=Jc.y+ic,gb=!0}function Ve(a){Z.clickZoom&&(a=ca(ta,Qb*vg),a=Ia(a),a!=Z.imageZ&&m.scaleTierToZoom(a))}function ie(a){Z.clickZoom&&(a=ca(ta,Qb*xg),a=Ia(a),a!=Z.imageZ&&m.scaleTierToZoom(a))}function Hd(a){if(a=Z.Utils.event(a)){var b;if(Z.geoCoordinatesVisible){if(b="",yg&&zg&&Ag&&Bg){var c=m.getClickCoordsInImage(a);b=c;c=cf+b.x*Math.abs(Ah/ Z.imageW);b=Cg-b.y*Math.abs(Bh/Z.imageH);var d="E",e=1;180c&&(c+=360);0>c&&(d="W",e=-1);var h=(c-c%1)*e,c=Z.Utils.roundToFixed(c%1*60*e,5),c=h+", "+c+", "+d,d="N",e=1;0>b&&(d="S",e=-1);h=(b-b%1)*e;b=Z.Utils.roundToFixed(b%1*60*e,5);b=geoCoordsString=h+", "+b+", "+d+" "+c}}else"IIIFImageServer"==Z.tileSource?(c=m.getClickCoordsInImage(a),"mousemove"==a.type?b=m.getViewCoordinatesIIIFString(null,c,"show"):"mousedown"==a.type&&a.altKey&&(b=m.getViewCoordinatesIIIFString(null,c,"save")+ "\n")):(c=Z.Utils.event(a),b=m.getZoom(),d=m.getClickCoordsInImage(c,b),c=Math.round(d.x).toString(),d=Math.round(d.y).toString(),b=(Math.round(1E3*b)/10).toString(),b='X="'+c+'" Y="'+d+'" ZOOM="'+b+'"');"mousemove"==a.type?Z.Utils.showCoordinates(b):"mousedown"==a.type&&a.altKey&&Z.Utils.saveCoordinates(b)}}var Bb,kc,sc,Rb,xd=null,yd=null,qd=0,rd=0,Ga=0;"undefined"!==typeof a&&null!==a&&(Ga=a);var tb;tb="undefined"!==typeof b&&null!==b?b:Z.imagePath;"undefined"===typeof d||null===d?kc=Bb=Z.hotspotPath: (kc=Bb=d,".xml"==kc.toLowerCase().substring(kc.length-4,kc.length)&&(kc=kc.substring(0,kc.lastIndexOf("/"))));"undefined"===typeof c||null===c?(sc=Z.annotationPath,Rb=Z.annotationFolder):(Rb=sc=c,".xml"==Rb.toLowerCase().substring(Rb.length-4,Rb.length)&&(Rb=Rb.substring(0,Rb.lastIndexOf("/"))));"undefined"===typeof e||null===e?(trackingPath=Z.trackingPath,trackingFolder=Z.trackingFolder):(trackingFolder=trackingPath=e,".xml"==trackingFolder.toLowerCase().substring(trackingFolder.length-4,trackingFolder.length)&& (trackingFolder=trackingFolder.substring(0,trackingFolder.lastIndexOf("/"))));"undefined"===typeof f||null===f?(imageListPath=Z.imageListPath,imageListFolder=Z.imageListFolder):(imageListFolder=imageListPath=f,".xml"==imageListFolder.toLowerCase().substring(imageListFolder.length-4,imageListFolder.length)&&(imageListFolder=imageListFolder.substring(0,imageListFolder.lastIndexOf("/"))));"undefined"!==typeof Bb&&Z.Utils.stringValidate(Bb)?(Z.hotspots=!0,Z.annotationPathProvided=!0,Z.imageSet&&(Z.hotspotPath= "multiple")):"undefined"!==typeof sc&&Z.Utils.stringValidate(sc)&&(Z.annotationPath=Z.Utils.stringRemoveTrailingSlash(sc),Z.annotationFolder=Z.annotationPath,".xml"==Z.annotationPath.toLowerCase().substring(Z.annotationPath.length-4,Z.annotationPath.length)&&(Z.annotationFolder=Z.annotationFolder.substring(0,Z.annotationFolder.lastIndexOf("/"))),Z.annotations=!0,Z.annotationPathProvided=!0,Z.imageSet&&(Z.annotationPath="multiple"));"undefined"!==typeof Z.narrativePath&&Z.Utils.stringValidate(Z.narrativePath)&& (Z.narrative=!0,Z.narrativePathProvided=!0);"undefined"!==typeof trackingPath&&Z.Utils.stringValidate(trackingPath)&&(Z.tracking=!0,Z.trackingPathProvided=!0);"undefined"!==typeof imageListPath&&Z.Utils.stringValidate(imageListPath)&&(Z.imageListPath=imageListPath,Z.imageList=!0);var m=this,Lc=[],Yc=-1,sd=0,jc=0,Ra=parseInt(Z.Utils.getResource("z90"),10),Md=8*Ra,Nd=4*Ra,xc=0,Sa=parseInt(Z.Utils.getResource("z221"),10),Qa=parseInt(Z.Utils.getResource("z219"),10),ke=parseFloat(Z.Utils.getResource("z218")), df=ke/2,vc=parseInt(Z.Utils.getResource("z220"),10),Ye=parseInt(Z.Utils.getResource("DEFAULT_MOUSECLICKTHRESHOLDVIEWPORT"),10),We=parseInt(Z.Utils.getResource("DEFAULT_MOUSECLICKTHRESHOLDTIMEVIEWPORT"),10),Xe=parseInt(Z.Utils.getResource("DEFAULT_TOUCHTAPTHRESHOLDVIEWPORT"),10),Td=parseInt(Z.Utils.getResource("DEFAULT_TOUCHTAPTHRESHOLDTIMEVIEWPORT"),10),tc,ra,cb,Xa,bd,ad,ud,ab,Ha,M,Mc,sa,ja,sb,oe,xa,Aa,hb,Rf,ac,cd,Kd,Sf,Ua,Nc,Jd,qa,Lb,Yf,Zf,Ch,Uf,eb,Jb,qe,Vf,Wa,Kb,Ba,yh,zh,Tf,Ma,rb,J,Wf,pe,lf,Xf; D(Ga);var Ub,td=[],ne=[],yc=[],Ng=[],$c=[],Id=[],zc=[],Og=[],jf=[],Va=[],kf=[],$a=1,ta=0,Ta=0,uc,nf,of,db=!1,Zb=0,bg=!1,wa,Qb,$b,Ab,qb=[],Hb=[],Ya=[],Cb=[],Ib=[],bc=[],ib=[],Za=[],ec=[],Dc=[],Ld=0,se=0,Ug=0,uf=0,cg=0,dg=0,fg=0,Dh,sf=0,tf=0,ue=0,dd=0,te=0,ed=0,vd=0,vf=0,Oc=[],ya=[],Mb=[],Fc=[],Pc=[],Cc=[],Od=null,wf=0,bi=parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYLIMIT"),10),Wg=parseInt(Z.Utils.getResource("DEFAULT_VALIDATEVIEWRETRYDELAY"),10),fc=[],Na=[],Qc=[],lc=[],ai=new Z.NetConnector, Eh=[],Fh=[],Gh=[],Hh=[],Nf=parseInt(Z.Utils.getResource("z81"),10),$h=parseInt(Z.Utils.getResource("z78"),10),Rg=parseInt(Z.Utils.getResource("z80"),10),re=parseInt(Z.Utils.getResource("z77"),10),Zb=re,Sg=parseInt(Z.Utils.getResource("z79"),10),pf=parseInt(Z.Utils.getResource("z76"),10),qf=parseInt(Z.Utils.getResource("z75"),10),Qf=null,Pf=null,Of=null,Ji=parseFloat(Z.Utils.getResource("z173UNCONVERTED"),10),Ki=null!==Z.panBuffer?Z.panBuffer:parseFloat(Z.Utils.getResource("z173"),10),Pg="unconverted"!= Z.tileSource?Ki:Ji,Tg=parseFloat(Z.Utils.getResource("z74"),10),Zh=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXBROWSER"),10),Yh=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXFIREFOX"),10),Xh=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXMOBILE"),10),Wh=parseFloat(Z.Utils.getResource("DEFAULT_z310SIZEMAXIMAGESET"),10),ea,fa,ff,gf,Ca,Da,Sb,Tb,kb,lb,Ac,Bc,$f,ag,cc,dc,Ih=1==Z.toolbarVisible&&Z.toolbarBackgroundVisible?null!==Z.toolbarH?Z.toolbarH:parseInt(Z.Utils.getResource("DEFAULT_TOOLBARHEIGHT"), 10):0;ea=Z.viewerW;fa=Z.viewerH-Ih;ff=0;gf=0==Z.toolbarPosition?Ih:0;var je=null,fe,vh,Qe=null,Re=null,If="counter"!=Z.labelMode?1:0,Gb=null,nb=null,ee=null,vg=null,Gf=!1,Fi=parseInt(Z.Utils.getResource("z122"),10),Dd=null,ug=null,Ed=null,wg,xg=null,Hf=!1,Gi=parseInt(Z.Utils.getResource("DEFAULT_PINCHTESTDURATION"),10),Jf=Math.round(parseFloat(Z.Utils.getResource("z176"))*Z.panSpeed),Vb=0,Wb=0,af=null,bf=null,Hi=parseInt(Z.Utils.getResource("DEFAULT_ANIMATIONOPTIMALMOTIONIMAGES"),10),Ii=parseInt(Z.Utils.getResource("DEFAULT_ANIMATIONOPTIMALPOSITIONDELTA"), 10),Xc=null,Se=null,Fd=null,Jc=null,yb=0,zb=0,hc=0,ic=0,gb=null,Ze=null,$e=null,le=parseFloat(Z.Utils.getResource("z242"))*Z.zoomSpeed;Z.mobileDevice&&(le/=2);var Pb=0,Wc=null,sg=0,tg=parseInt(Z.Utils.getResource("z238"),10),eg=parseFloat(Z.Utils.getResource("z112"))*Z.fadeInSpeed,rf=null,Jh=parseInt(Z.Utils.getResource("DEFAULT_ROTATIONSTEPDEGREES"),10),uh=parseInt(Z.Utils.getResource("DEFAULT_ROTATIONSTEPDURATION"),10),Cd=0,Bd=null,Li=parseFloat(Z.Utils.getResource("z239")),Ff=parseFloat(Z.Utils.getResource("z240")); Z.mobileDevice&&(Ff/=2);var Qd=null,be=0;if(!Z.fullScreenVisible&&!Z.fullPageVisible)var Dg,Eg,Kh,Lh,Fg,Mh,me,Gg;Z.crosshairsVisible&&Z.Utils.drawCrosshairs(Z.ViewerDisplay,ea,fa);if(Z.measureVisible||null!==Z.editMode||Z.annotations){var gi=parseFloat(Z.Utils.getResource("DEFAULT_CAPTIONBACKALPHA")),qi=Z.Utils.getResource("z431"),ri=Z.Utils.getResource("z431TOTAL"),si=Z.Utils.getResource("z433"),ui=Z.Utils.getResource("z430"),ti=Z.Utils.getResource("z434");parseInt(Z.Utils.getResource("z154"),10); parseInt(Z.Utils.getResource("z156"),10)}if(Z.geoCoordinatesVisible)var Ag,Bg,yg,zg,cf,Cg,Ah,Bh;if(Z.imageFilters)var Vg=!1;if(Z.watermarks)var fd,Xg,Nh=[],Oh=[];if(Z.imageList)var xb,Hc,Df,Hg,oc=[];if(0Z.maxZ&&(Z.fitZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fitZ=1));1Z.maxZ&&(Z.fillZ=Z.maxZ):"unconverted"==Z.tileSource&&(Z.fillZ=1));null===Z.minZ||-1==Z.minZ?Z.minZ=Z.fitZ:0==Z.minZ&&(Z.minZ=Z.fillZ);if(null===Z.maxZ||-1==Z.maxZ)Z.maxZ=1;null===Z.initialZ||-1==Z.initialZ?Z.initialZ=a:0==Z.initialZ&&(Z.initialZ= b);Z.initialZZ.maxZ&&(Z.initialZ=Z.maxZ)};this.getViewW=function(){return ea};this.getViewH=function(){return fa};this.getDisplayW=function(){return Ca};this.getDisplayH=function(){return Da};this.getImagePath=function(){return tb};this.setImagePath=function(a){tb=a};this.getViewportID=function(){return Ga};this.getTierCount=function(){return $a};this.getTileW=function(){return Sa};this.getTileH=function(){return Qa};this.getTierCurrent=function(){return ta}; this.getTierBackfill=function(){return Ta};this.getTierBackfillDynamic=function(){return db};this.getTierBackfillOversize=function(){return Zb};this.getTierScale=function(){return wa};this.getX=function(a){var b=parseFloat(M.left)-kb;a=m.getZoom(a);return xd-b/a};this.getY=function(a){var b=parseFloat(M.top)-lb;a=m.getZoom(a);return yd-b/a};this.getZoom=function(a){var b=wa;a&&(b=wa*parseFloat(Aa.width)/Ca);return ca(ta,b)};this.getRotation=function(a){return Z.imageR};this.getCoordinates=function(){new Z.Utils.Point(m.getX(), m.getY())};this.getCoordinatesBookmark=function(a,b){var c="";return c=b?"?"+m.getViewCoordinatesIIIFString(a,null,"bookmark"):"?"+m.getViewCoordinatesString(a)};this.getViewCoordinatesString=function(a){var b="x="+Math.round(m.getX(a)).toString(),c="&y="+Math.round(m.getY(a)).toString(),d="&z="+Math.round(100*m.getZoom(a)).toString();a=Math.round(m.getRotation(a));return b+c+d+(0==a?"":"&r="+a.toString())};this.getCoordinatesFull=function(a){return new Z.Utils.Coordinates(m.getX(a),m.getY(a),m.getZoom(a), m.getRotation(a))};this.getCoordinatesDisplayFull=function(){return new Z.Utils.CoordinatesDisplayStyle(M.left,M.top,Aa.width,Aa.height,Aa.left,Aa.top,ja.width,ja.height,ja.left,ja.top,Z.imageR)};this.getTiersScaleUpMax=function(){return ke};this.getTiersScaleDownMax=function(){return df};this.getTilesCacheMax=function(){return vc};this.getTierWs=function(){return qb.join(",")};this.getTierHs=function(){return Hb.join(", ")};this.getTierTileCounts=function(){return Ib.join(", ")};this.getTilesToLoad= function(){return Ld};this.getTilesLoadingNames=function(){return""==ya.join(", ")?"Current view loading complete":ya.join(", ")};this.getTilesToDraw=function(){return ed};this.getConstrainPan=function(a){return Z.constrainPan};this.setConstrainPan=function(a){Z.constrainPan="0"!=a;Z.constrainPanLimit=parseInt(a,10);Z.constrainPanStrict="3"==a;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.getSmoothZoom=function(){return Z.smoothZoom};this.setSmoothZoom=function(a){Z.smoothZoom=a};this.getSmoothZoomEasing=function(){return Z.smoothZoomEasing};this.setSmoothZoomEasing=function(a){Z.smoothZoomEasing=a};this.getImageMetadataXML=function(){return Z.imageMetadataXML};this.setCoordinatesDisplayVisibility= function(a){a?(Z.Utils.addEventListener(document,"mousemove",Hd),Z.Utils.addEventListener(document,"mousedown",Hd)):(Z.coordinatesVisible=!1,Z.Utils.removeEventListener(document,"mousemove",Hd),Z.Utils.removeEventListener(document,"mousedown",Hd))};this.setTourPath=function(a,b){m.setHotspotPath(a,b)};this.setHotspotPath=function(a,b){"undefined"===typeof a||Z.Utils.stringValidate(a)?(Z.hotspotPath=Z.Utils.stringRemoveTrailingSlash(a),Z.hotspotFolder=Z.hotspotPath,".xml"==Z.hotspotPath.toLowerCase().substring(Z.hotspotPath.length- 4,Z.hotspotPath.length)&&(Z.hotspotFolder=Z.hotspotFolder.substring(0,Z.hotspotFolder.lastIndexOf("/"))),b||(m.deleteAllHotspots(),h(Ga))):(Z.hotspotPath=null,Z.hotspotFolder=null,m.deleteAllHotspots())};this.getHotspotCurrentID=function(){return Y};this.getHotspotCurrentIDExternal=function(){var a=m.getHotspotCurrentID();return currIDExt=v[a].id};this.getHotspots=function(){return v};this.setHotspots=function(a){v=a.slice(0)};this.setVisibility=function(a,b){if(b){var c=a?1:0;tc&&Z.Utils.setOpacity(tc, c);ab&&Z.Utils.setOpacity(ab,c)}else c=a?"inline-block":"none",tc&&!cb&&(cb=tc.style),cb&&(cb.display=c),ab&&!M&&(M=ab.style),M&&(M.display=c)};this.setOpacity=function(a){Z.Utils.setOpacity(ab,2<=a?a/100:0>a?0:1Sg&&(n(pf,Za),Pf=!0,$a>Rg&&(n(re,Za),Of=!0),m.setStatus("backfillPrecachedViewport",!0));Za.sort();Za=Z.Utils.arrayUnique(Za);bc=Za.slice(0);m.traceDebugValues("tilesBackfillToPrecache",null,bc.length);C(Za,Fa,"simple","image-backfill")};this.prez581s= function(a){if(Z.imageSet)Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADINGIMAGESET-LOADINGTILES"),!1,Z.messageDurationLong,"center"),m.updateView(!0,!0);else{Z.Utils.showMessage(Z.Utils.getResource("ALERT_PRELOADINGONEIMAGE-LOADINGTILES"),!1,Z.messageDurationLong,"center");Z.Utils.arrayClear(ya);a=0;for(var b=$a;aZ.viewportCurrentID-1&&aZ.maxZ&&(Z.imageZ=Z.maxZ);e=ke;for(d=$a;0=Z.imageZ;)d--,e/=2;d=0>d-1?0:d-1;e=la(d,Z.imageZ);if(d!=ta||e!=wa)Z.useCanvas&&(hb.restore(),hb.save(),hb.scale(e,e)),ta!=d&&(bg=!0),ta=d,wa=e;Qb=wa;"unconverted"!=Z.tileSource&&(Q(),w(sa,Ta,ib,"simple",!1,"2. Updating view: changing tier - backfill"));!b&&0Z.browserVersion||0==vc)a=Z.Utils.cacheProofPath(a);e=a}else if("ZoomifyPFFFile"==Z.tileSource&&null===Z.tileHandlerPathFull){e=m.getViewportID();f="offsetLoading";h=g="loading";h=0;for(g=$a-1;g>a;g--)h+=Ib[g];h+=c*Ya[a]+b;g=Math.floor(h/Ra);n=jc+Ra*g*8;var q=n+8*Ra,I=h-g*Ra,r=8*I,G=g+","+a+","+b+","+c+","+d+",chunk",h=Z.Utils.arrayIndexOfObjectValue(Va, "chunkID",g);-1==h?(m.traceDebugValues("z531",g+","+a+","+b+","+c+","+d),-1==Z.Utils.arrayIndexOf(Na,G)&&(Na[Na.length]=G),Va[Va.length]={chunkID:g,chunk:"loading"},(new Z.NetConnector).loadByteRange(tb,n,q,"loadingPFFFileBytes","offset",null,g,e)):"loading"==Va[h].chunk?-1==Z.Utils.arrayIndexOf(Na,G)&&(Na[Na.length]=G):(g=Z.Utils.longValue(Va[h].chunk,8*(I-1),!0),h=Z.Utils.longValue(Va[h].chunk,r,!0)-g-1,"loading"==g||isNaN(g)||"loading"==h||isNaN(h)||(f=tb+"?"+g.toString()+","+h.toString()));e= f}else if("ZoomifyPFFFile"==Z.tileSource){h="offsetLoading";n=e=0;for(f=$a-1;f>a;f--)e+=Ib[f];e+=c*Ya[a]+b;f=Math.floor(e/Ra);n=-1==e-1?0:e-1;g=Math.floor(n/Ra);"undefined"===typeof Va[f]||"offsetLoading"==Va[f]||"undefined"===typeof Va[g]||"offsetLoading"==Va[g]?(e=f+","+a+","+b+","+c+","+d+",chunk",-1==Z.Utils.arrayIndexOf(Na,e)&&(Na[Na.length]=e),m.traceDebugValues("z531",f+","+a+","+b+","+c+","+d),"undefined"===typeof Va[f]&&(Va[f]="offsetLoading",a=jc+Ra*f*8,b=a+8*Ra,X(a,b,f)),"undefined"=== typeof Va[g]&&(Va[g]="offsetLoading",a=jc+Ra*g*8,b=a+8*Ra,X(a,b,f))):(d=Math.floor(Va[f][0]),h=Math.floor(Va[g][0]),g=Va[g][1],f=Va[f][1],n=n%Ra*9,g=Math.floor(parseFloat(g.substring(n,n+9))),n=e%Ra*9,f=Math.floor(parseFloat(f.substring(n,n+9))),e=0==e?jc+8*xc:h+g,d+=f,h=01+h?f=ca(c,1):0c&&(c+=360);if("undefined"===typeof b||null===b)b=m.getZoom();var d=Math.round(Z.imageX-(a.x-kb)/b);a=Math.round(Z.imageY-(a.y-lb)/b);c=Z.Utils.getPositionRotated(d,a,Z.imageX,Z.imageY,-c);return new Z.Utils.Point(c.x, c.y)};this.z542=function(a,b,c,d){if("undefined"===typeof a||null===a)a=ta;if("undefined"===typeof b||null===b)b=!1;return new Pa(m.z541(b,c?a:null,d),a)};this.z541=function(a,b,c){var d=parseFloat(M.left)-kb,e=parseFloat(M.top)-lb;if(Z.useCanvas)var h=parseFloat(M.width)/Ha.width,d=d/h,e=e/h;h=m.getZoom();0!=d&&(d/=h);0!=e&&(e/=h);var f=a?ea:Ca;a=a?fa:Da;return new na(Z.imageX-d,Z.imageY-e,-(f/2),f/2,-(a/2),a/2,h,b,c)};this.HotspotsAllBoundingBoxInPixels=function(){for(var a=new Db,b=Z.imageCtrX, c=Z.imageCtrX,d=Z.imageCtrY,e=Z.imageCtrY,h=0,f=v.length;hc&&(c=q);re&&(e=g)}a=parseInt(Z.Utils.getResource("DEFAULT_SAVEIMAGELABELMARGIN"),10);b-=a;d-=a;c+=a;e+=a;this.l=b;this.r=c;this.t=d;this.b=e;this.x=b+(c-b)/2;this.y=d+(e-d)/2};this.z480=function(a,b){var c=m.z479(a,b);return new Z.Utils.Point(c.x-kb,c.y-lb)};this.convertViewportDisplayCoordsToPageCoords=function(a,b){var c=m.convertViewportCoordsToPageCoords(a+ kb,b+lb);return new Z.Utils.Point(c.x,c.y)};this.z479=function(a,b){var c=Z.Utils.getElementPosition(oe);return new Z.Utils.Point(a-c.x+kb,b-c.y+lb)};this.convertViewportCoordsToPageCoords=function(a,b){var c=Z.Utils.getElementPosition(oe);return new Z.Utils.Point(a+c.x-kb,b+c.y-lb)};this.convertPageCoordsToImageCoords=function(a,b){var c=m.z479(a,b),c=m.z485(c.x,c.y,Z.imageZ);return new Z.Utils.Point(c.x,c.y)};this.convertImageCoordsToPageCoords=function(a,b,c,d){a=m.z478(a,b,c,d);a=m.convertViewportCoordsToPageCoords(a.x, a.y,Z.imageZ);return new Z.Utils.Point(a.x,a.y)};this.z485=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);var e=parseFloat(M.left)+Sb,h=parseFloat(M.top)+Tb;a-=e;b-=h;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,d),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(a/c+Z.imageX,b/c+Z.imageY)};this.z478=function(a,b,c,d){if("center"==a||isNaN(parseFloat(a)))a=Z.imageCtrX;if("center"==b||isNaN(parseFloat(b)))b= Z.imageCtrY;if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);a=(a-Z.imageX)*c;b=(b-Z.imageY)*c;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);d=parseFloat(M.left)+Sb;c=parseFloat(M.top)+Tb;return new Z.Utils.Point(a+d,b+c)};this.convertImageCoordsToViewportEdgeCoords=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360); a=(Z.imageX-a)*c;b=(Z.imageY-b)*c;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(kb+a,lb+b)};this.convertViewportEdgeCoordsToImageCoords=function(a,b,c,d){if("undefined"===typeof c||null===c)c=Z.imageZ;if("undefined"===typeof d||null===d)d=Z.imageR;0>d&&(d+=360);a-=kb;b-=lb;0!=Z.imageR&&(viewportClickPt=Z.Utils.rotatePoint(a,b,-d),a=viewportClickPt.x,b=viewportClickPt.y);return new Z.Utils.Point(Z.imageX-a/c,Z.imageY-b/c)}; this.z468=function(a,b,c){if("undefined"===typeof a||null===a)a=Z.imageW;if("undefined"===typeof b||null===b)b=Z.imageH;var d=a/b>ea/fa?ea/a:fa/b;if(90==c||270==c)d=a/b>ea/fa?ea/b:fa/a;return d};this.calculateZoomToFill=function(a,b,c){if("undefined"===typeof a||null===a)a=Z.imageW;if("undefined"===typeof b||null===b)b=Z.imageH;var d=a/b>ea/fa?fa/b:ea/a;if(90==c||270==c)d=a/b>ea/fa?fa/a:ea/b;return d};this.calculateZoomForResize=function(a,b,c,d,e){var h=a,f=Z.imageW*a,g=Z.imageH*a;b=d/b;c=e/c;f< d&&gd&&g<=e?h=a*b:f<=d&&g>e?h=a*c:f>d&&g>e&&(d=1,1<=b&&1<=c?d=b>c?b:c:1>=b&&1>=c&&(d=bZ.maxZ&&(h=Z.maxZ);return h};this.z482=function(a,b){return ca(a,b)};this.syncViewportToNavigator=function(b){var c=Z.imageR;0>c&&(c+=360);var d=Ea(b.x,b.y,Z.imageZ,c,"image"),e=Z.imageX,h=Z.imageY;if(0==c){var f=d.x;b=d.y}else f=b.x,b=b.y;e=dX=e-f;h=dY=h-b;0!=c&&(270<=c?(e=dY,h=-dX):180<=c?(e=-dX,h=-dY):90<=c&&(e=-dY,h=dX));c=e*Z.imageZ; h*=Z.imageZ;e=h+lb;M.left=c+kb+"px";M.top=e+"px";ra&&db&&(Z.mobileDevice||Math.abs(c)>ea/2||Math.abs(h)>fa/2)&&w(ra,Zb,ib,"simple",!1,"Updating backfill oversize display");Z.Viewer.syncComparisonViewport();Z.Viewer.syncOverlayViewports(null,a)};this.getStatus=function(a){a=Z.Utils.arrayIndexOfObjectValue(Lc,"state",a);return-1==a?!1:Lc[a].status};this.setStatus=function(a,b){var c=!1,d=Z.Utils.arrayIndexOfObjectValue(Lc,"state",a);-1==d?(c=b,Lc[Lc.length]={state:a,status:b}):(!Lc[d].status&&b&&(c= !0),Lc[d].status=b);c&&(Z.Utils.validateCallback(a),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":sf=c;te=dd=ue=tf=0;ed=c;vd=0;tilesTimeStart=(new Date).getTime();vf=0;window.clearTimeout(Od);Od=null;Od=window.setTimeout(q,Wg);break;case "tilesInCache":tf=c;break;case "z581-image-display":ue+=1;break;case "onTileLoad":dd+=1;vd=((new Date).getTime()-c)/1E3;vf=dd/vd;break;case "z507":c= Z.Utils.arrayIndexOf(Oc,b);-1!=c&&(Oc.splice(c,1),te+=1,--ed);break;case "tilesBackfillToPrecache":Ug=c;break;case "onTileBackfillPrecache":uf+=1;break;case "tilesBackfillToDisplay":Dh=cg=c;break;case "z599":dg+=1;break;case "z507Backfill":c=Z.Utils.arrayIndexOf(bc,b),-1!=c&&(bc.splice(c,1),fg+=1,--Dh)}2!=Z.debug&&3!=Z.debug||Z.Utils.traceTileStatus(sf,tf,ue,dd,te,ed);if(2==Z.debug){var e="undefined"!==typeof d&&null!==d&&0").getElementsByTagName("HOTSPOTSETUP")[0]));if(c){var d=c.getAttribute("AUTOSTART");Z.Utils.stringValidate(d)&&(Ig="0"!=d&&"false"!=d);d=c.getAttribute("AUTOLOOP");Z.Utils.stringValidate(d)&&(qg="0"!=d&&"false"!=d);d=c.getAttribute("CHOICELIST");Z.Utils.stringValidate(d)&&(mf=d);d=c.getAttribute("LISTSOURCE");Z.Utils.stringValidate(d)&& (Lf=d);d=Z.Utils.xmlUnescapeMinimal(unescape(c.getAttribute("LISTTITLE")));Z.Utils.stringValidate(d)&&(hotspotListTitle=d);d=c.getAttribute("INITIALVISIBILITY");Z.Utils.stringValidate(d)&&(Lg="1"==d||"true"==d);d=parseFloat(c.getAttribute("MINSCALE"));isNaN(d)||(ze=0!=d?d:1E-5);c=parseFloat(c.getAttribute("MAXSCALE"));isNaN(c)||(Ae=0!=c?c:1E4)}Lb.visibility=Lg?"visible":"hidden";Z.Utils.stringValidate(Z.hotspotListTitle)?hotspotListTitle=Z.hotspotListTitle:Z.Utils.stringValidate(hotspotListTitle)&& (Z.hotspotListTitle=hotspotListTitle);vi(mf,hotspotListTitle,rc,a);b=b.getElementsByTagName("HOTSPOT");c=0;for(d=b.length;c').getElementsByTagName("HOTSPOT")[0]; null===a.getAttribute("INTERNALID")&&a.setAttribute("INTERNALID",A("hotspot"));b=Z.Utils.xmlConvertTextToDoc("");Z.Utils.stringValidate(c[34])&&(E=Z.Utils.xmlConvertTextToDoc(E).getElementsByTagName("CAPTION")[0].innerHTML,d=b.createElement("CAPTION"),d.innerHTML=E,a.appendChild(d));Z.Utils.stringValidate(c[35])&&(E=Z.Utils.xmlConvertTextToDoc(D).getElementsByTagName("TOOLTIP")[0].innerHTML,D=b.createElement("TOOLTIP"),D.innerHTML=E,a.appendChild(D));if(Z.Utils.stringValidate(c[37])){D= b.createElement("POLYGON");D.setAttribute("CLOSED",c[33]);E=0;for(c=M.length;Eb-1?b-1:a))))}};this.deleteAllHotspots=function(){v&&0h&&I.xg&&I.yrd?(rd++,window.setTimeout(function(){m.setHotspotsVisibility(b,c)},100)):rd=0};this.setHotspotPopupVisibility=function(a,b){var c=Z.Utils.getChildElementByID(a,"popup");c&&c.style&&(c.style.display=b?"inline-block":"none",c.style.visibility=b?"visible":"hidden",Uh++,a.style.zIndex= Uh.toString())};this.setHotspotVisibility=function(a,b){if("undefined"!==typeof a){var c=a.firstChild;if(c&&c.style){c.style.visibility="visible";var d=b?"visible":"hidden";c.style.backgroundColor=b?"":"#FFFFFF";Z.Utils.setOpacity(c,b?1:.01);c=a.firstChild.childNodes.length;0qd?(qd++, window.setTimeout(function(){m.setHotspotsVisibilityByFilter(b,c,d)},100)):qd=0;return d};this.getHotspotVisibilityByID=function(a,b){var c=null;if(0');b=a.getElementsByTagName("LABEL")[0];Z.Utils.stringValidate(b.getAttribute("INTERNALID"))|| b.setAttribute("INTERNALID",A("label"));Z.Utils.stringValidate(D)&&(D=Z.Utils.xmlConvertTextToDoc(D).getElementsByTagName("CAPTION")[0].innerHTML,c=a.createElement("CAPTION"),c.innerHTML=D,b.appendChild(c));D=B;Z.Utils.stringValidate(D)&&(D=Z.Utils.xmlConvertTextToDoc(D).getElementsByTagName("TOOLTIP")[0].innerHTML,B=a.createElement("TOOLTIP"),B.innerHTML=D,b.appendChild(B));if(null!=aa){B=a.createElement("POLYGON");D=0;for(c=aa.length;D=Z.maskOpacity&&(Z.maskOpacity=0,"outIn"==a?a="In":(Z.maskingSelection=!1,Z.Utils.clearDisplay(Ma),rb.display="none",a=null,Z.Utils.validateCallback("maskClear")));Z.Utils.setOpacity(Ma,Z.maskOpacity);null!==a&&0Z.maskOpacity?Z.maskFadeTimeout=window.setTimeout(function(){Z.Viewport.maskFadeTimeoutHandler(a)},50):(window.clearTimeout(Z.maskFadeTimeout),Z.maskFadeTimeout=null)}else a=null,Z.maskingSelection=!1};this.setLabelHighlightByDisplayID=function(a,b,c){var d=[];d[0]=a;m.setHotspotHighlightByDisplayList(d,b,c)};this.setLabelHighlightByDisplayList=function(a,b,c){m.setHotspotHighlightByDisplayList(a,b,c)};this.setHotspotHighlightByDisplayList=function(a,b,c){if("undefined"!==typeof a&&null!==a&&0< a.length){if("undefined"===typeof b||null===b)b=!1;var d=null;b=b?"internalID":"id";for(var e=0,h=v.length;eZ.imageX-a&&(a+=500,a>Z.imageW&&(a-=1E3));500>Z.imageY-b&&(b+=500, b>Z.imageH&&(b-=1E3));.3>Z.imageZ-c&&(c+=.3,c>Z.maxZ&&(c-=.6));d=0;var h=0Z.slideOpacity&&!Z.audioStopped&&(Z.audioStopped=!0,Z.Utils.stopAudio())):(Z.slideOpacity=0,a="in",Z.setCallback("viewUpdateComplete",function(){Z.slideTransitionTimeout=window.setTimeout(function(){Z.Viewport.slideTransitionTimeoutHandler(a,b,c)},e)}),Z.Viewer.setImage(b,c,null)):(0==Z.slideOpacity&&Z.clearCallback("viewUpdateComplete",function(){Z.slideTransitionTimeout=window.setTimeout(function(){Z.Viewport.slideTransitionTimeoutHandler(a, b,c)},e)}),1>=Z.slideOpacity?(Z.slideOpacity+=Sh,a="in",.1=Pb&&(Pb+=le);break;case "stop":Pb=0}Z.zooming=0==Pb? "stop":0Pb&&Z.imageZ>Z.minZ||0=Vb&&(Vb+=Jf);break;case "up":0>=Wb&&(Wb+= Jf);break;case "down":0<=Wb&&(Wb-=Jf);break;case "right":0<=Vb&&(Vb-=Jf);break;case "horizontalStop":Vb=0;break;case "verticalStop":Wb=0;break;case "stop":Wb=Vb=0}Z.panningX=0==Vb?"stop":0Z.maxZ?c=Z.maxZ:cZ.maxZ-.01&&(c=Z.maxZ);b=Ea(a,b,c,d,"image");a=b.x;b=b.y;c=Ia(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.interactive=!1,be=0,Z.zoomAndPanInProgressID= a.toString()+"-"+b.toString()+"-"+c.toString()+"-"+d.toString(),ae(a,b,c,d,e,h,f)}else Z.clickZoomAndPanBlock=!1};this.zoomAndPanAllStop=function(a,b){Z.interactive&&((null!==Z.zoomAndPanInProgressID||Qd)&&zd(),Z.tourPlaying&&b&&(m.tourStop(),a=!1),Z.slideshowPlaying&&b&&(m.slideshowStop(),a=!1),Z.smoothPan&&null!==Xc&&(Z.mouseIsDown||Kc(!0),a=!0),a||m.updateView(null,null,!0))};this.syncViewportRelated=function(b,c,d,e,h,f,g,n,q,r,I){Z.expressParamsEnabled&&(Z.sliderZoomVisible&&("undefined"===typeof d|| null===d||d)&&(Z.Toolbar&&Z.ToolbarDisplay&&Z.Toolbar.getInitialized()&&(d=m.getZoom(),Z.Toolbar.syncSliderToViewportZoom(d)),Z.Utils.validateCallback("viewZoomingGetCurrentZoom")),Z.Navigator&&("undefined"===typeof e||null===e||e)&&La());Z.proParamsEnabled&&(Z.watermarks&&("undefined"===typeof b||null===b||b)&&Ua&&(Z.Utils.clearDisplay(Ua),Nb()),v&&("undefined"===typeof c||null===c||c)&&Eb(),Z.Ruler&&("undefined"===typeof h||null===h||h)&&Z.Ruler&&Z.Ruler.getInitialized()&&Z.Ruler.syncToViewport(), Z.sliderImageSetVisible&&"undefined"!==typeof f&&f&&Z.Viewer.syncToolbarImageSetSliderToViewport(Z.viewportCurrentID),Z.comparison&&("undefined"===typeof g||null===g||g)&&Z.Viewer.syncComparisonViewport(g),Z.overlays&&("undefined"===typeof n||null===n||n)&&Z.Viewer.syncOverlayViewports(n,a),Z.bookmarksSet&&"undefined"!==typeof q&&null!==q&&q&&Z.Utils.setBookmarksURL());Z.Utils.validateCallback("viewChanging");Z.Utils.validateCallback("viewPanningGetCurrentCoordinates");Z.Utils.validateCallback("viewChangingGetCurrentCoordinatesFull")}; this.scaleTierToZoom=function(a,b){$d(a,b)&&m.syncViewportRelated()};this.reset=function(a){Z.maskingSelection&&Z.maskClearOnUserAction&&m.clearMask();a?(Z.Utils.setButtonDefaults(buttonReset),m.zoomAndPanToView(Z.priorX,Z.priorY,Z.priorZ,Z.priorR)):m.zoomAndPanToView(Z.initialX,Z.initialY,Z.initialZ,Z.initialR);Me(!0)};this.labelScale=function(a){switch(a){case "down":0<=qc&&(qc-=Mf);break;case "up":0>=qc&&(qc+=Mf);break;case "stop":qc=0}0!=qc?Ad||(Ad=window.setTimeout(ce,th)):(Ad&&(window.clearTimeout(Ad), Ad=null),qc=0)};this.toggleWatermarks=function(a){if(Nc){var b="inline-block"==Nc.display;Nc.display=("undefined"!==typeof a&&null!==a?a:!b)?"inline-block":"none"}};this.toggleConstrainPan=function(a){Z.constrainPan="undefined"!==typeof a&&null!==a?a:!Z.constrainPan;if(Z.constrainPan){a=parseFloat(Aa.left);var b=parseFloat(Aa.top);a=Ea(a,b,Z.imageZ,Z.imageR,"container");M.left=a.x+"px";M.top=a.y+"px";m.updateView()}};this.toggleSmoothPan=function(){Kc();Z.smoothPan=!Z.smoothPan};this.toggleSmoothZoom= function(){zd();Z.smoothZoom=!Z.smoothZoom};this.buttonToggleBackfillHandler=function(){m.toggleBackfill()};this.toggleBackfill=function(a){var b=document.getElementById("viewportBackfillDisplay"+Ga.toString());if(b){var b=b.style,c="inline-block"==b.display;b.display=("undefined"!==typeof a&&null!==a?a:!c)?"inline-block":"none"}};this.buttonToggleDisplayHandler=function(){m.toggleDisplay()};this.toggleDisplay=function(a){var b=document.getElementById("viewportDisplay"+Ga.toString());b&&(Aa=b.style, b="inline-block"==Aa.display,Aa.display=("undefined"!==typeof a&&null!==a?a:!b)?"inline-block":"none")};this.toggleDisplaysOther=function(a){a=a?"inline-block":"none";cb&&(cb.display=a);ja&&(ja.display=a);cd&&(cd.display=a);Nc&&(Nc.display=a);Jb&&(Jb.display=a);Kb&&(Kb.display=a);Lb&&(Lb.display=a);lf&&(lf.display=a)};this.zoomAndPanToZoomRectangle=function(a){var b=Math.min(a[0].x,a[1].x,a[2].x,a[3].x),c=Math.max(a[0].x,a[1].x,a[2].x,a[3].x),d=Math.min(a[0].y,a[1].y,a[2].y,a[3].y);a=Math.max(a[0].y, a[1].y,a[2].y,a[3].y);c-=b;a-=d;var b=b+c/2,d=d+a/2,e=m.getRotation(),c=m.z468(c,a,e);m.zoomAndPanToView(b,d,c)};this.toggleFullViewModeExternal=function(){Gg=!0;m.toggleFullViewMode()};this.toggleFullViewMode=function(a,b){Z.maskingSelection&&Z.maskClearOnUserAction&&m.clearMask();Z.ToolbarDisplay&&Z.Toolbar&&Z.Toolbar.show(!1);var c=null,d=null;Z.fullViewPrior=Z.fullView;Z.fullView="undefined"!==typeof a&&null!==a?a:!Z.fullView;var e=document.body.style,h=document.documentElement.style,f=Z.ViewerDisplay.style, c=Z.Utils.getElementStyle(Z.pageContainer);Z.fullView?(d=Z.Utils.getContainerSize(Z.pageContainer,Z.ViewerDisplay),Dg=d.x,Eg=d.y,Kh=e.overflow,Lh=h.overflow,Fg=Z.Utils.stringValidate(c.backgroundColor)&&"transparent"!=c.backgroundColor?c.backgroundColor:Z.Utils.stringValidate(e.backgroundColor)&&"transparent"!=e.backgroundColor?e.backgroundColor:Z.Utils.getResource("z120"),Mh=f.zIndex,Z.fullScreenSupported&&!Z.fullPageVisible?(d=Z.Utils.getScreenSize(),Z.fullScreenEntering=!0,Z.Utils.fullScreenView(Z.ViewerDisplay, !0),Z.Utils.validateCallback("fullscreenEntered")):(d=Z.Utils.getWindowSize(),Z.mobileDevice?(e.width=d.x,e.height=d.y):(e.width="100%",e.height="100%"),Z.Utils.validateCallback("fullpageEntered")),c=d.x,d=d.y,e.overflow="hidden",h.overflow="hidden",f.backgroundColor=Fg,f.position="fixed",f.zIndex="99999999",Z.autoResize&&Z.Utils.removeEventListener(window,"resize",Z.Viewer.viewerEventsHandler)):(e.overflow=Kh,h.overflow=Lh,f.backgroundColor=Fg,f.position="relative",f.zIndex=Mh,Z.fullScreenSupported&& !Z.fullPageVisible?(Z.Utils.fullScreenView(Z.ViewerDisplay,!1,b),Z.Utils.validateCallback("fullscreenExited")):Z.Utils.validateCallback("fullpageExited"),e.width=Dg,e.height=Eg,c=Dg,d=Eg,isNaN(c)&&(c=Z.ViewerDisplay.clientWidth),isNaN(d)&&(d=Z.ViewerDisplay.clientHeight),Gg=!1,Z.autoResize&&Z.Utils.addEventListener(window,"resize",Z.Viewer.viewerEventsHandler));Z.initialFullPage&&m.setSizeAndPosition(c,d);e=Z.viewportCurrent.calculateZoomForResize(Z.viewportCurrent.getZoom(),Z.viewerW,Z.viewerH,c, d);Z.Viewer.resizeViewer(c,d,e);e=null;if(Z.slideshow)Z.Toolbar.gallerySizeAndPositionReset();else if(Z.comparison)(e=0==m.getViewportID()?Z.Viewport1:Z.Viewport0)&&e.syncViewportResize(Z.imageX,Z.imageY,Z.imageZ,Z.imageR);else if(Z.overlays)for(h=0,f=Z.imageSetLength-1;ha?"out":"stop",m.scaleTierToZoom(constrainedZ))}else if("imageSet"==Z.sliderFocus||b)0a&&Z.Viewer.viewportPrior()}}; Z.ZoomifyToolbar=function(a){function b(){parseFloat(Z.Utils.getResource("UI_TOOLBARINTERNALBACKGROUNDALPHA"));var a=Z.Utils.getResource("UI_TOOLBARINTERNALBACKGROUNDCOLOR"),b=Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONUPCOLOR"),c=Z.viewerW/2-50,d=Z.viewerH-25-10,f=Math.round(25),g=Math.round(25/1.5),n=(100-3*f)/4,q=(25-g)/2;Z.ToolbarDisplay=Z.Utils.createContainerElement("div","ToolbarDisplay","inline-block","absolute","visible","100px","25px",c+"px",d+"px","none","0px","transparent none","0px", "0px","normal");H=Z.ToolbarDisplay.style;c=Z.Utils.createContainerElement("div","buttonZoomOutInternal","inline-block","absolute","visible",f+"px",g+"px",n+1+"px",q+1+"px","none","0px",b,"0px","0px","normal");Z.Utils.setOpacity(c,.6,a);c.setAttribute("title",Z.Utils.getResource("z400"));d=document.createTextNode(Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONZOOMOUTTEXT"));c.appendChild(d);Z.ToolbarDisplay.appendChild(c);ka=c.style;ka.borderRadius="3px";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",f+"px",g+"px",2*n+f+1+"px",q+1+"px","none","0px",b,"0px","0px","normal");Z.Utils.setOpacity(d,.6,a);d.setAttribute("title",Z.Utils.getResource("z378"));var r=document.createTextNode(Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONRESETTEXT"));d.appendChild(r);Z.ToolbarDisplay.appendChild(d);ba=d.style; ba.borderRadius="3px";Z.Utils.setTextNodeStyle(r,"blue","verdana","15px","none","normal","normal","normal","bold","1em","center","none");Z.Utils.disableTextInteraction(r);b=Z.Utils.createContainerElement("div","buttonZoomInInternal","inline-block","absolute","visible",f+"px",g+"px",3*n+2*f+1+"px",q+1+"px","none","0px",b,"0px","0px","normal");Z.Utils.setOpacity(b,.6,a);b.setAttribute("title",Z.Utils.getResource("z399"));a=document.createTextNode(Z.Utils.getResource("UI_TOOLBARINTERNALBUTTONZOOMINTEXT")); b.appendChild(a);Z.ToolbarDisplay.appendChild(b);C=b.style;C.borderRadius="3px";Z.Utils.setTextNodeStyle(a,"black","verdana","15px","none","normal","normal","normal","bold","1em","center","none");Z.Utils.disableTextInteraction(a);Z.Utils.addEventListener(c,"mouseover",R);Z.Utils.addEventListener(c,"mousedown",R);Z.Utils.addEventListener(c,"mouseup",R);Z.Utils.addEventListener(c,"mouseout",R);Z.Utils.addEventListener(c,"touchstart",R);Z.Utils.addEventListener(c,"touchend",R);Z.Utils.addEventListener(c, "touchcancel",R);Z.Utils.addEventListener(d,"mouseover",R);Z.Utils.addEventListener(d,"mousedown",R);Z.Utils.addEventListener(d,"mouseup",R);Z.Utils.addEventListener(d,"mouseout",R);Z.Utils.addEventListener(d,"touchstart",R);Z.Utils.addEventListener(d,"touchend",R);Z.Utils.addEventListener(d,"touchcancel",R);Z.Utils.addEventListener(b,"mouseover",R);Z.Utils.addEventListener(b,"mousedown",R);Z.Utils.addEventListener(b,"mouseup",R);Z.Utils.addEventListener(b,"mouseout",R);Z.Utils.addEventListener(b, "touchstart",R);Z.Utils.addEventListener(b,"touchend",R);Z.Utils.addEventListener(b,"touchcancel",R);H.zIndex=(Z.baseZIndex+2).toString();Z.ViewerDisplay.appendChild(Z.ToolbarDisplay);Z.Utils.addEventListener(Z.ToolbarDisplay,"mouseover",Z.Utils.stopPropagation);e(!0)}function c(){Z.Gallery&&Z.Gallery.getInitialized()?Z.Gallery.setSizeAndPosition():window.setTimeout(c,100)}function d(){window.clearInterval(Pa);Pa=null;var a=document.getElementById("progressTextBoxCenteredDiv");a&&(a=a.firstChild)&& (a.nodeValue="")}function e(a){!S&&a&&(S=!0,Z.Utils.validateCallback("toolbarInitialized"),Z.Viewer.validateViewerReady("toolbarInitialized"))}function f(a){4>Z.toolbarVisible&&!Z.mobileDevice||8==Z.toolbarVisible||Z.toolbarInternal?g(a):t(!a)}function g(a){H&&(H.display=a?"inline-block":"none")}function t(a){Z.ToolbarMinimized=a;if(H){var b=document.getElementById("buttonContainer"),c=document.getElementById("toolbarBackground"),d=document.getElementById("buttonMinimize"),e=document.getElementById("buttonExpand"), f=document.getElementById("logoDivider"),g=0;e&&!Ea&&(g=parseFloat(e.style.left)+parseFloat(e.style.width)+4);if(Z.imageFilters)var n=document.getElementById("imageFilterPanelBackground"),q=document.getElementById("buttonContainerImageFilter");var r=Z.toolbarCurrentW;a?(b&&(b.style.display="none"),d&&e&&!Ea&&(f&&(f.style.display="none"),d.style.display="none",e.style.display="inline-block"),H.width=g+"px",c&&(c.style.width=g+"px"),n&&q&&(n.style.width="0px",q.style.display="none")):(b&&(b.style.display= "inline-block"),d&&e&&!Ea&&(f&&(f.style.display="inline-block"),d.style.display="inline-block",e.style.display="none"),H.width=r+"px",c&&(c.style.width=r+"px"),n&&q&&imageFilterPanelVisible&&(n.style.width=imageFilterPanelW+"px",q.style.display="inline-block"))}}function u(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"}}function B(a){"undefined"!== typeof btsZ&&(T=!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)+(pa.x-btsZ.mouseXPrior);dc?d=c:btsZ.mouseXPrior=pa.x;btszS.left=d+"px";b=Z.minZ+(d-b)/(c-b)*(Z.maxZ-Z.minZ);c=b-a.getZoom();Z.zooming=0c?"out":"stop";a.scaleTierToZoom(b)}} function D(a){if("undefined"!==typeof trsisS&&"undefined"!==typeof btsisS){a=Z.viewportCurrentID/(Z.imageSetLength-1);var b=parseFloat(trsisS.left),c=parseFloat(trsisS.left)+parseFloat(trsisS.width)-parseFloat(btsisS.width)-b;btsisS.left=a*c+b+"px"}}function O(a){btsiS&&(Ka=!0,a=Z.Utils.getMousePosition(a),btsiS.mouseXPrior=a.x,btsiS.mouseYPrior=a.y)}function ha(){if(trsiS&&btsiS&&btsiS){var a=parseFloat(trsisS.left),b=parseFloat(trsisS.left)+parseFloat(trsisS.width)-parseFloat(btsisS.width),c=parseFloat(btsisS.left)+ (ga.x-btsiS.mouseXPrior);cb?c=b:btsiS.mouseXPrior=ga.x;btsisS.left=c+"px";a=Math.round((c-a)/(b-a)*(Z.imageSetLength-1));a!=Z.viewportCurrentID&&Z.Viewer.viewportSelect(a,!0)}}function oa(a){ga=new Z.Utils.Point(a.clientX,a.clientY)}function da(a){(a=Z.Utils.getFirstTouch(a))&&(ga=new Z.Utils.Point(a.pageX,a.pageY))}function R(b){if(b=Z.Utils.event(b)){var c=b.type,d=Z.Utils.target(b);if(d){ka.background=E;ba.background=E;C.background=E;var e=d.id;b=b.altKey;if("mousedown"==c||"touchstart"== c)c="start";if("mouseup"==c||"touchend"==c||"touchcancel"==c)c="end";switch(c){case "mouseover":d.style.background=K;break;case "start":d.style.background=va;"buttonZoomInInternal"==e?b||a.zoom("in"):"buttonZoomOutInternal"==e&&(b||a.zoom("out"));break;case "end":d.style.background=K,a.zoom("stop"),"buttonResetInternal"==e&&a.reset(b)}}}}function F(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 f=e;tbID=e.id}}d=Z.Utils.relatedTarget(b)}"mousedown"==c&& a&&"buttonMinimize"!=tbID&&"buttonExpand"!=tbID&&"buttonAudioOn"!=tbID&&"buttonAudioMuted"!=tbID&&(a.zoomAndPanAllStop(!1,!0),Z.maskingSelection&&Z.maskClearOnUserAction&&a.clearMask());if((Z.interactive||"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")||T||Ob||Ka)T?e= document.getElementById("buttonSliderZoom"):Ka&&(e=document.getElementById("buttonSliderImageSet")),e&&(tbID=e.id);W(e,c);if(tbID&&"buttonBackground"!=tbID&&c)switch(c){case "click":c=-1!=tbID.toLowerCase().indexOf("checkbox");a&&c&&n(b,tbID);break;case "mouseover":if("trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID)if(Z.Utils.removeEventListener(e.childNodes[0],"mouseover",F),Z.Utils.addEventListener(e.childNodes[1],"mousedown",F),Z.Utils.addEventListener(e.childNodes[1],"mouseout",F),T&&f&& Z.Utils.addEventListener(f.childNodes[0],"mouseup",F),Ka&&f&&Z.Utils.addEventListener(f.childNodes[0],"mouseup",F),"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",F),Z.sliderFocus="trackSliderImageSet"==tbID?"imageSet":"zoom";break;case "mousedown":Z.buttonIsDown=!0;!Z.fullView&&document.activeElement&& document.activeElement.blur();"trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID&&-1==tbID.indexOf("trackSliderFilter")?(Z.Utils.removeEventListener(e.childNodes[1],"mousedown",F),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",F),Z.Utils.addEventListener(e.childNodes[2],"mouseup",F),Z.Utils.addEventListener(e.childNodes[2],"mouseout",F),"buttonSliderZoom"==tbID?(B(b),r(b),Z.Utils.addEventListener(document,"mousemove",r),ia||(ia=window.setInterval(N,Fa)),Z.Utils.addEventListener(document, "mouseup",F)):-1!=tbID.indexOf("buttonSliderFilter")?(imageFilterEventsManager(b,tbID,"sliderStart"),sliderMouseMoveHandlerFilter(b,tbID),Z.Utils.addEventListener(document,"mousemove",sliderMouseMoveHandlerFilter),ob||(ob=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},mb)),Z.Utils.addEventListener(document,"mouseup",F)):"buttonSliderImageSet"==tbID&&(O(b),oa(b),Z.Utils.addEventListener(document,"mousemove",oa),q||(q=window.setInterval(ha,La)),Z.Utils.addEventListener(document, "mouseup",F))):Z.Utils.addEventListener(document,"mouseup",F);a&&n(b,tbID);break;case "mouseup":Z.buttonIsDown=!1;"trackSliderZoom"!=tbID&&"trackSliderImageSet"!=tbID&&-1==tbID.indexOf("trackSliderFilter")?(Z.Utils.removeEventListener(e.childNodes[2],"mouseup",F),Z.Utils.removeEventListener(e.childNodes[2],"mouseout",F),Z.Utils.addEventListener(e.childNodes[1],"mousedown",F),Z.Utils.addEventListener(e.childNodes[1],"mouseout",F),f&&(T||Ob||Ka)&&Z.Utils.removeEventListener(f.childNodes[0],"mouseup", F)):Z.Utils.addEventListener(document,"mouseup",F);a&&n(b,tbID);break;case "mouseout":if("trackSliderZoom"!=tbID&&-1==tbID.indexOf("trackSliderFilter")&&"trackSliderImageSet"!=tbID){if(Z.Utils.removeEventListener(e.childNodes[1],"mousedown",F),Z.Utils.removeEventListener(e.childNodes[1],"mouseout",F),Z.Utils.addEventListener(e.childNodes[0],"mouseover",F),a&&n(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",F),Z.sliderFocus=2==Z.mouseWheel?"imageSet":"zoom";break;case "touchstart":"buttonSliderZoom"==tbID?(B(b),w(b),Z.Utils.addEventListener(document,"touchmove",w),ia||(ia=window.setInterval(N,Fa))):-1!=tbID.indexOf("buttonSliderFilter")?(imageFilterEventsManager(b,tbID,"sliderStart"),sliderTouchMoveHandlerFilter(b,tbID),Z.Utils.addEventListener(document, "touchmove",sliderTouchMoveHandlerFilter),ob||(ob=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},mb))):"buttonSliderImageSet"==tbID&&(O(b),da(b),Z.Utils.addEventListener(document,"touchmove",da),q||(q=window.setInterval(ha,La)));Z.Utils.addEventListener(e,"touchend",F);Z.Utils.addEventListener(e,"touchcancel",F);a&&n(b,tbID);break;case "touchend":Z.Utils.addEventListener(e,"touchstart",F);a&&n(b,tbID);break;case "touchcancel":Z.Utils.addEventListener(e,"touchstart", F);a&&n(b,tbID);break;case "MSPointerDown":"buttonSliderZoom"==tbID?(B(b),w(b),Z.Utils.addEventListener(document,"MSPointerMove",w),ia||(ia=window.setInterval(N,Fa))):-1!=tbID.indexOf("SliderFilter")?(imageFilterEventsManager(b,tbID,"sliderStart"),sliderTouchMoveHandlerFilter(b,tbID),Z.Utils.addEventListener(document,"MSPointerMove",sliderTouchMoveHandlerFilter),ob||(ob=window.setInterval(function(){imageFilterEventsManager(b,tbID,"sliderSlide")},mb))):"buttonSliderImageSet"==tbID&&(O(b),da(b),Z.Utils.addEventListener(document, "MSPointerMove",da),q||(q=window.setInterval(ha,La)));Z.Utils.addEventListener(e,"MSPointerUp",F);a&&n(b,tbID);break;case "MSPointerUp":Z.Utils.addEventListener(e,"MSPointerDown",F),a&&n(b,tbID)}}}function n(b,c){var d=b.type,e=b.altKey;if("click"==d)Z.comparison&&-1!=c.indexOf("Sync")&&(e=Z.Utils.target(b),Z.syncComparison=e.checked,Z.Viewer.syncComparisonViewport(!0));else if("mousedown"==d||"touchstart"==d)switch(d=document.activeElement.id,!Z.Utils.stringValidate(d)||d!="poiNameTextElement"+P&& d!="labelNameTextElement"+P&&"captionTextElement"!=d&&"commentTextElement"!=d&&"tooltipTextElement"!=d&&"clickURLTextElement"!=d&&d!="noteNameTextElement"+P&&d!="noteTextElement"+P||document.getElementById(d).blur(),aa.positionButtonBorder(c),Z.tracking&&-1!=c.indexOf("buttonCounterListShow")&&(c="buttonCounterListShow"),c){case "buttonMinimize":e?a.setHotspotsVisibility(!a.getHotspotsVisibility()):(aa.minimize(!0),Z.Navigator&&(Z.Navigator.setVisibility(!1),Z.comparison&&Z.Navigator2.setVisibility(!1)), Z.Ruler&&Z.Ruler.setVisibility(!1),Z.viewportCurrent&&Z.viewportCurrent.showLists(!1),Z.Gallery&&Z.Gallery.setVisibility(!1));break;case "buttonExpand":e?a.setHotspotsVisibility(!a.getHotspotsVisibility()):(aa.minimize(!1),Z.Navigator&&(Z.Navigator.setVisibility(!0),Z.comparison&&Z.Navigator2.setVisibility(!0)),Z.Ruler&&Z.Ruler.setVisibility(!0),!Z.viewportCurrent||Z.narrative&&!Z.narrativeMode||Z.viewportCurrent.showLists(!0),Z.Gallery&&Z.Gallery.setVisibility(!0));break;case "buttonZoomOut":e|| a.zoom("out");break;case "buttonZoomIn":e||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(e);break;case "buttonFullView":break;case "buttonFullViewExit":break;case "buttonMeasure":a.toggleEditModeMeasure(!0);break;case "buttonMeasureExit":a.toggleEditModeMeasure(!1);break;case "buttonHelp":Z.annotations&&null===Z.editMode?Z.Utils.showHelp(Z.Utils.getResource("z32")+ Z.Utils.getResource("z30")+Z.Utils.getResource("z29")):Z.Utils.showHelp(Z.Utils.getResource("z32"));break;case "buttonRotateClockwise":a.rotate("clockwise",e);break;case "buttonRotateCounterwise":a.rotate("counterwise",e);break;case "buttonTourPrior":a.priorDestination(!0);break;case "buttonTourNext":a.nextDestination(!0);break;case "buttonTourStart":a.tourStart();break;case "buttonTourStop":a.tourStop();break;case "buttonSlideshowPrior":a.priorSlide(!0);break;case "buttonSlideshowNext":a.nextSlide(!0); break;case "buttonSlideshowStart":a.slideshowStart();break;case "buttonSlideshowStop":a.slideshowStop();break;case "buttonAudioOn":a.audioMute(!0);break;case "buttonAudioMuted":a.audioMute(!1);break;case "buttonImageSetPrior":Z.animation&&Z.Viewer.viewportChange("backward");break;case "buttonImageSetNext":Z.animation&&Z.Viewer.viewportChange("forward");break;case "buttonPreload":Z.imageSet?Z.Viewer.prez581s():Z.Viewport.prez581s();break;default:"buttonColor"==c.substr(0,11)&&a.setDrawingColor(c)}else"mouseup"== d||"touchend"==d||"touchcancel"==d?"buttonSliderZoom"==c||T?(ia&&(window.clearInterval(ia),ia=null),Q(),T=!1,Z.zooming="stop",a.updateView()):"trackSliderZoom"==c?"undefined"!==typeof trsZ&&"undefined"!==typeof trszS&&(e=Z.Utils.getElementPosition(trsZ),e=Z.Utils.getMousePosition(b).x-e.x,d=parseFloat(trszS.width),e=Z.minZ+(e-0)/(d-0)*(Z.maxZ-Z.minZ),eZ.maxZ-.1&&(e=Z.maxZ),d=e-a.getZoom(),Z.zooming=0d?"out":"stop",a.scaleTierToZoom(e),Z.zooming="stop",a.updateView()): -1!=c.indexOf("buttonSliderFilter")||Ob?(ob&&(window.clearInterval(ob),ob=null),Q(),imageFilterEventsManager(b,c,"sliderEnd")):-1!=c.indexOf("trackSliderFilter")?imageFilterEventsManager(b,c,"sliderSnap"):"buttonImageFilterPlus"==c||"buttonImageFilterMinus"==c?imageFilterEventsManager(b,c):"buttonSliderImageSet"==c||Ka?(q&&(window.clearInterval(q),q=null),Q(),Ka=!1,Z.Viewer.viewportSelect(Z.viewportCurrentID,!0)):"buttonZoomOut"==c||"buttonZoomIn"==c?(a.zoom("stop"),"buttonZoomOut"==c&&e&&a.toggleSmoothZoom(), "buttonZoomIn"==c&&e&&a.toggleEditMode()):"buttonPanLeft"==c||"buttonPanRight"==c?(Z.tracking?"buttonPanLeft"==c?Z.viewportCurrent.goToNextCell("left"):Z.viewportCurrent.goToNextCell("right"):a.pan("horizontalStop"),"buttonPanLeft"==c&&e&&a.toggleSmoothPan()):"buttonPanUp"==c||"buttonPanDown"==c?Z.tracking?"buttonPanUp"==c?Z.viewportCurrent.goToNextCell("up"):Z.viewportCurrent.goToNextCell("down"):a.pan("verticalStop"):"buttonHelp"==c?0==Z.debug&&e&&Z.Utils.showGlobals():"buttonRotateClockwise"== c||"buttonRotateCounterwise"==c?Z.rotationFree&&a.rotate("stop"):"buttonFullView"==c?a.toggleFullViewMode(!0):"buttonFullViewExit"==c?a.toggleFullViewMode(!1):"buttonRulerSettingsShow"==c?Z.Ruler.showRulerSettings(!0):"buttonRulerSettingsCancel"==c?Z.Ruler.showRulerSettings(!1):"buttonRulerSettingsSave"==c?Z.Ruler.showRulerSettings(!1,!0):"buttonNarrativePreview"==c?Z.Narrative.toggleNarrativeMode(!1):"buttonNarrativeEdit"==c?Z.Narrative.toggleNarrativeMode(!0):"buttonNarrativeToolsShow"==c?Z.Narrative.showFileManagerPanel(!1): "buttonFileManagerShow"==c?Z.Narrative.showFileManagerPanel(!0):"trackSliderImageSet"==c?Z.slidestack&&trsiS&&trsisS&&(e=Z.Utils.getElementPosition(trsiS),e=Z.Utils.getMousePosition(b).x-e.x,d=parseFloat(trsisS.width),e=Math.round((e-0)/(d-0)*(Z.imageSetLength-1)),0>e&&(e=0),e>Z.imageSetLength-1&&(e=Z.imageSetLength-1),e!=Z.viewportCurrentID&&Z.Viewer.viewportSelect(e,!0),D(e)):"buttonImageSetPrior"==c||"buttonImageSetNext"==c?Z.animation?Z.Viewer.viewportChange("stop"):Z.slidestack&&("buttonImageSetPrior"== c?Z.Viewer.viewportChange("backward"):"buttonImageSetNext"==c&&Z.Viewer.viewportChange("forward")):"buttonImageFilterClear"==c?a.clearImageFilterLast():"buttonImageFiltersClearAll"==c?a.clearImageFiltersAll():"buttonImageFilterPanelShow"==c?aa.showImageFilterPanel(!0):"buttonImageFilterPanelHide"==c?aa.showImageFilterPanel(!1):"buttonImageFilterPanelHideOnPanel"==c&&aa.showImageFilterPanel(!1):"mouseout"==d&&("buttonZoomOut"==c||"buttonZoomIn"==c?a.zoom("stop"):"buttonPanLeft"==c||"buttonPanRight"== c?a.pan("horizontalStop"):"buttonPanUp"==c||"buttonPanDown"==c?a.pan("verticalStop"):"buttonRotateClockwise"==c||"buttonRotateCounterwise"==c?Z.rotationFree&&a.rotate("stop"):"buttonImageSetPrior"!=c&&"buttonImageSetNext"!=c||Z.Viewer.viewportChange("stop"))}function Q(){T?(Z.Utils.removeEventListener(document,"mousemove",r),Z.Utils.removeEventListener(document,"mouseup",F),Z.Utils.removeEventListener(document,"touchmove",w)):Ob?(Z.Utils.removeEventListener(document,"mousemove",sliderMouseMoveHandlerFilter), Z.Utils.removeEventListener(document,"mouseup",F),Z.Utils.removeEventListener(document,"touchmove",sliderTouchMoveHandlerFilter)):Ka&&(Z.Utils.removeEventListener(document,"mousemove",oa),Z.Utils.removeEventListener(document,"mouseup",F),Z.Utils.removeEventListener(document,"touchmove",da));for(var a=Z.ToolbarDisplay.childNodes,b=0,c=a.length;bf&&(ca=!0,da-mb>f&&(la=!0,da-mb-D>f&&(Ea=!0,da-mb-D-ia>f&&(ub=!0,da-mb-D-ia-oa>f&&(Ia=!0,ba-=na,da-mb-D-ia-oa-na>f&&(overrideZoom=!0,ba-=pa)),ba-=oa),ia=0),D=0),ba-=mb);var va=(f-ba)/2-20+3,Fa=document.getElementById("toolbarBackground");Fa&&(Fa.style.width=f+"px",Fa.style.height=g+"px",Fa.firstChild.style.width=f+"px",Fa.firstChild.style.height=g+"px");var za= document.getElementById("buttonContainer");za&&(za.style.width=ba+40+"px",za.style.height=g+"px",za.style.left=va+"px");var Oa=document.getElementById("buttonBackground");Oa&&(Oa.style.width=f+"px",Z.Utils.graphicSize(Oa,parseFloat(za.style.width),parseFloat(za.style.height)),Oa.style.left="0px");var Pa=document.getElementById("toolbarLogo");if(Pa){var Rc=Pa.style;if(Rc)if(Ea)Rc.display="none";else{Rc.display="inline-block";Z.Utils.graphicSize(Pa,n,q);Rc.left=A+"px";Rc.top=ka+"px";var A=A+(n+5),jd= document.getElementById("logoDivider");if(jd){Z.Utils.graphicSize(jd,r,w);var Fe=jd.style;Fe.left=A+"px";Fe.top=E+"px"}}}if(0!=Z.toolbarVisible&&1!=Z.toolbarVisible){var Yb=document.getElementById("buttonMinimize"),Vd=document.getElementById("buttonExpand");if(Yb&&Vd){var jb=Yb.style,Uc=Vd.style;jb&&Uc&&(Ea?(jb.display="none",Uc.display="none"):(jb.display="inline-block",Uc.display="inline-block",Z.Utils.buttonSize(Yb,ga,Q),Z.Utils.buttonSize(Vd,ga,Q),jb.left=A+Ob+"px",jb.top=aa+"px",Uc.left=A+R+ "px",Uc.top=aa+"px"))}}A=20;if(!overrideZoom){var Vc=document.getElementById("buttonZoomOut");if(Vc){Z.Utils.buttonSize(Vc,ga,Q);var He=Vc.style;He.left=A+"px";He.top=B+"px";A+=t}trsZ=document.getElementById("trackSliderZoom");btsZ=document.getElementById("buttonSliderZoom");trsZ&&btsZ&&(trszS=trsZ.style,btszS=btsZ.style,trszS&&btszS&&(ca?(trszS.display="none",btszS.display="none"):(trszS.display="inline-block",btszS.display="inline-block",Z.Utils.graphicSize(trsZ,u,W),trszS.left=A-2+"px",trszS.top= N+"px",Z.Utils.buttonSize(btsZ,C,F),btszS.left=parseFloat(trszS.left)+"px",btszS.top=ob+"px",A+=mb)));var md=document.getElementById("buttonZoomIn");if(md){Z.Utils.buttonSize(md,ga,Q);var Ie=md.style;Ie.left=A+"px";Ie.top=B+"px";A+=t+1}}if(!Ia){var od=document.getElementById("panDivider");if(od){Z.Utils.graphicSize(od,r,w);var Xd=od.style;Xd.left=A+"px";Xd.top=E-5+"px";A+=O}var Je=document.getElementById("buttonPanLeft");if(Je){Z.Utils.buttonSize(Je,ga,Q);var Ef=Je.style;Ef.left=A+"px";Ef.top=B+"px"; A+=t}var Ke=document.getElementById("buttonPanUp");if(Ke){Z.Utils.buttonSize(Ke,ga,Q);var Le=Ke.style;Le.left=A+"px";Le.top=B+"px";A+=t}var pd=document.getElementById("buttonPanDown");if(pd){Z.Utils.buttonSize(pd,ga,Q);var Me=pd.style;Me.left=A+"px";Me.top=B+"px";A+=t}var Zc=document.getElementById("buttonPanRight");if(Zc){Z.Utils.buttonSize(Zc,ga,Q);var Zd=Zc.style;Zd.left=A+"px";Zd.top=B+"px";A+=t}}if(!ub){var ae=document.getElementById("buttonReset");if(ae){Z.Utils.buttonSize(ae,ga,Q);var Ne=ae.style; Ne.left=A+"px";Ne.top=B+"px";A+=t+1}}var zd=document.getElementById("fullViewDivider");if(zd){Z.Utils.graphicSize(zd,r,w);var $d=zd.style;$d.left=A+"px";$d.top=E+"px";A+=O}var ce=document.getElementById("buttonFullViewExit");if(ce){Z.Utils.buttonSize(ce,ga,Q);var Oe=ce.style;Oe.left=A+"px";Oe.top=B+"px";Oe.display=Z.fullView?"inline-block":"none"}var de=document.getElementById("buttonFullView");if(de){Z.Utils.buttonSize(de,ga,Q);var pb=de.style;pb.left=A+"px";pb.top=B+"px";A+=t+1;pb.display=Z.fullView? "none":"inline-block"}var Pe=document.getElementById("measureDivider");if(Pe){Z.Utils.graphicSize(Pe,r,w);var ge=Pe.style;ge.left=A+"px";ge.top=E+"px";A+=O}if(null===Z.editMode){var Gd=document.getElementById("buttonMeasureExit");if(Gd){Z.Utils.buttonSize(Gd,ga,Q);var Wd=Gd.style;Wd.left=A+"px";Wd.top=B+"px";Wd.display="measure"==Z.labelMode?"inline-block":"none"}}if(Yb=document.getElementById("buttonMeasure"))Z.Utils.buttonSize(Yb,ga,Q),jb=Yb.style,jb.left=A+"px",jb.top=B+"px",A+=t+1,jb.display= "measure"==Z.labelMode?"none":"inline-block";var hd=document.getElementById("rotateDivider");if(hd){Z.Utils.graphicSize(hd,r,w);var Ue=hd.style;Ue.left=A+"px";Ue.top=E+"px";var A=A+O,he=document.getElementById("buttonRotateCounterwise");if(he){Z.Utils.buttonSize(he,ga,Q);var Kc=he.style;Kc.left=A+"px";Kc.top=B+"px";A+=t}var Te=document.getElementById("buttonRotateClockwise");if(Te){Z.Utils.buttonSize(Te,ga,Q);var Ve=Te.style;Ve.left=A+"px";Ve.top=B+"px";A+=t+1}}if(Z.tour){var ie=document.getElementById("tourDivider"); if(ie){Z.Utils.graphicSize(ie,r,w);var Hd=ie.style;Hd.left=A+"px";Hd.top=E+"px";var A=A+O,Bb=document.getElementById("buttonTourPrior");if(Bb){Z.Utils.buttonSize(Bb,ga,Q);var kc=Bb.style;kc.left=A+"px";kc.top=B+"px";A+=t+1}var sc=document.getElementById("buttonTourNext");if(sc){Z.Utils.buttonSize(sc,ga,Q);var Rb=sc.style;Rb.left=A+"px";Rb.top=B+"px";A+=t+1}var xd=document.getElementById("buttonTourStop");if(xd){Z.Utils.buttonSize(xd,ga,Q);var yd=xd.style;yd.left=A+"px";yd.top=B+"px";yd.display=Z.tourPlaying? "inline-block":"none"}var qd=document.getElementById("buttonTourStart");if(qd){Z.Utils.buttonSize(qd,ga,Q);var rd=qd.style;rd.left=A+"px";rd.top=B+"px";A+=t+1;rd.display=Z.tourPlaying?"none":"inline-block"}}}else if(Z.slideshow&&Z.slideButtonsVisible){var Ga=document.getElementById("slideshowDivider");if(Ga){Z.Utils.graphicSize(Ga,r,w);var tb=Ga.style;tb.left=A+"px";tb.top=E+"px";var A=A+O,m=document.getElementById("buttonSlideshowPrior");if(m){Z.Utils.buttonSize(m,ga,Q);var Lc=m.style;Lc.left=A+ "px";Lc.top=B+"px";A+=t+1}var Yc=document.getElementById("buttonSlideshowNext");if(Yc){Z.Utils.buttonSize(Yc,ga,Q);var sd=Yc.style;sd.left=A+"px";sd.top=B+"px";A+=t+1}var jc=document.getElementById("buttonSlideshowStop");if(jc){Z.Utils.buttonSize(jc,ga,Q);var Ra=jc.style;Ra.left=A+"px";Ra.top=B+"px";Ra.display=Z.slideshowPlaying?"inline-block":"none"}var Md=document.getElementById("buttonSlideshowStart");if(Md){Z.Utils.buttonSize(Md,ga,Q);var Nd=Md.style;Nd.left=A+"px";Nd.top=B+"px";A+=t+1;Nd.display= Z.slideshowPlaying?"none":"inline-block"}}}else if(null!==Z.imageSetPath&&!Z.comparison){var xc=document.getElementById("imageSetDivider");if(xc){Z.Utils.graphicSize(xc,r,w);var Sa=xc.style;Sa.left=A+"px";Sa.top=E+"px";A+=O}var Qa=document.getElementById("buttonImageSetPrior");if(Qa){Z.Utils.buttonSize(Qa,ga,Q);var ke=Qa.style;ke.left=A+"px";ke.top=B+"px";A+=t+1}trsiS=document.getElementById("trackSliderImageSet");btsiS=document.getElementById("buttonSliderImageSet");trsiS&&btsiS&&(trsisS=trsiS.style, btsisS=btsiS.style,trsisS&&btsisS&&(Nb?(trsisS.display="none",btsisS.display="none"):(trsisS.display="inline-block",btsisS.display="inline-block",Z.Utils.graphicSize(trsiS,ha,Ka),trsisS.left=A-2+"px",trsisS.top=N+"px",Z.Utils.buttonSize(btsiS,C,F),btsisS.left=parseFloat(trsisS.left)+"px",btsisS.top=ob+"px",A+=La)));var df=document.getElementById("buttonImageSetNext");if(df){Z.Utils.buttonSize(df,ga,Q);var vc=df.style;vc.left=A+"px";vc.top=B+"px";A+=t+1}}if(Z.tour||Z.slideshow){var Ye=document.getElementById("buttonAudioMuted"); if(Ye){Z.Utils.buttonSize(Ye,ga,Q);var We=Ye.style;We.left=A+"px";We.top=B+"px";We.display="none"}var Xe=document.getElementById("buttonAudioOn");if(Xe){Z.Utils.buttonSize(Xe,ga,Q);var Td=Xe.style;Td.left=A+"px";Td.top=B+"px";A+=t+1;Td.display="none"}a.initializeAudioMuteButtons()}if(Z.preloadVisible){var tc=document.getElementById("preloadDivider"),ra=document.getElementById("buttonPreload");if(tc&&ra){Z.Utils.graphicSize(tc,r,w);var cb=tc.style;cb.top=E+"px";Z.imageSet||(cb.left=A+"px",A+=O);Z.Utils.buttonSize(ra, ga,Q);var Xa=ra.style;Xa.left=A+"px";Xa.top=B+"px";A+=t;Z.imageSet&&(cb.left=A+"px",A+=O);A+=8}}if(1==Z.helpVisible||3==Z.helpVisible){var bd=document.getElementById("buttonHelp");if(bd){Z.Utils.buttonSize(bd,ga,Q);var ad=bd.style;ad.left=A+"px";ad.top=B+"px";A+=t+8}}if(Z.comparison&&Z.syncVisible){var ud=parseInt(Z.Utils.getResource("DEFAULT_TOOLBARLABELFONTSIZE"),10),ab=document.getElementById("labelSyncTextBox"),Ha=document.getElementById("containerFor-checkboxSyncComparison"),M=document.getElementById("checkboxSyncComparison"); if(ab&&Ha&&M){var Mc=ab.style;Mc.width="28px";Mc.height="20px";Mc.left=A+"px";Mc.top=B+6+"px";Mc.visibility="visible";Z.Utils.setTextNodeStyle(ab,"black","verdana",ud+"px","none","normal","normal","normal","normal","1em","left","none");var sa=Ha.style;sa.width=1.5*ga+"px";sa.height=1.5*Q+"px";sa.left=A+28+3+"px";sa.top=B+2+"px";M.width=ga;M.height=Q;M.checked=Z.initialSync}}var ja=document.getElementById("progressTextBox");if(ja){var sb=ja.style;sb&&(la?sb.display="none":(sb.display="inline-block", sb.width=D+"px",sb.height=S+"px",sb.left=f-parseFloat(za.style.left)-parseFloat(sb.width)+"px",sb.top=(g-parseFloat(sb.height))/2+"px"))}};this.syncSliderToViewportZoom=function(a){u(a)};this.syncSliderToViewportImageSet=function(a){D(a)};this.z457=function(a){F(a)};this.backgroundEventsHandler=function(a){a=Z.Utils.event(a);if(a=Z.Utils.relatedTarget(a)){var b=a.parentNode;b&&(b=b.id)&&(T||Ob||Ka||-1==b.indexOf("button")||-1!=b.indexOf("buttonContainer")||Z.Utils.setButtonDefaults(a.parentNode))}}; this.positionButtonBorder=function(a){var b=Z.annotationFileShared?"0":P;if("buttonColor"==a.substr(0,11))var c=document.getElementById("buttonBorderSm"+b);else if(a=="buttonViewMode"+b||a=="buttonEditModeFieldOfView"+b||a=="buttonEditModeText"+b||a=="buttonEditModeShape"+b||a=="buttonEditModeFreehand"+b||a=="buttonEditModePolygon"+b||a=="buttonEditModeMeasure"+b)c=document.getElementById("buttonBorderLg"+b);var d=document.getElementById(a);c&&d&&(a=="buttonClearAll"+b&&(d=document.getElementById("buttonViewMode"+ tbViewportID)),a=c.style,d=d.style,a.left=parseFloat(d.left)-2+"px",a.top=parseFloat(d.top)-2+"px")};this.showImageFilterPanel=function(a){var b=document.getElementById("imageFilterPanelBackground"),c=document.getElementById("buttonContainerImageFilter"),d=document.getElementById("buttonImageFilterPanelShow"),e=document.getElementById("buttonImageFilterPanelHide");b&&c&&d&&e&&(b.style.width=a?imageFilterPanelW+"px":"0px",c.style.display=a?"inline-block":"none",d.style.display=a?"none":"inline-block", e.style.display=a?"inline-block":"none");imageFilterPanelVisible=a};this.addFilterToImageFilterList=function(a,b,c,d){var e=document.getElementById("imageFilterList");if(e){var f=Z.Utils.stringUpperCaseFirstLetter(a),g=Z.Utils.arrayIndexOfObjectValueSubstring(e.options,"text",f),n="\u00a0\u00a0"+f;"\u00a0\u00a0None"==e.options[e.options.length-1].text&&e.options.remove(e.options.length-1);f="";"undefined"!==typeof b&&null!==b&&(f=Z.Utils.roundToFixed(b,3).toString());b="";"undefined"!==typeof c&& null!==c&&(b="-"+Z.Utils.roundToFixed(c,3).toString());d?(a=e.options[g].text,a=a.substring(0,a.indexOf(":\u00a0\u00a0")+3),e.options[g].text=a+f+b):-1==e.options[e.options.length-1].text.toLowerCase().indexOf(a.toLowerCase())?(e.options[e.options.length]=new Option(n,a),Z.Utils.stringValidate(f)&&(e.options[e.options.length-1].text+=":\u00a0\u00a0"+f+b)):(a=e.options[e.options.length-1].text,a=a.substring(0,a.indexOf(":\u00a0\u00a0")+3),e.options[e.options.length-1].text=a+f+b)}}}; Z.ZoomifyNavigator=function(a){function b(){"undefined"===typeof za&&(Z.clearCallback(Z.comparison&&"0"!=W?"navigator2TileLoaded":"navigatorTileLoaded",b),c(),w||(w=!0,Z.Utils.validateCallback("navigatorInitialized"),Z.Viewer.validateViewerReady("navigatorInitialized")),u())}function c(b){"unconverted"!=Z.tileSource?za="undefined"!==typeof b&&null!==b?b:a.getNavigatorImage():Z.useCanvas&&(za=a.createUnconvertedImageThumbnail(b));if(K&&za){b=Z.Utils.createContainerElement("div","testImageContainer", "inline-block","absolute","hidden",T+"px",ia+"px","0px","0px","none","0px","transparent","0px","0px","normal",null,!0);b.appendChild(za);b.removeChild(za);b=za.width;var c=za.height;0!=b&&0!=c?(K.innerHTML="",K.appendChild(za),za.alt=Oa,za.id="navigatorImage",E=za,e(T,ia,pa,Pa,na,b,c)):window.setTimeout(r.drawNavigatorImage,100)}else window.setTimeout(r.drawNavigatorImage,100)}function d(){w&&(aa&&(window.clearInterval(aa),aa=null),P&&C&&ba&&ka&&K&&va&&E&&X&&H||(P=S,C=P.style,ba=S.firstChild,ka=ba.style, K=S.childNodes[1],va=K.style,E=S.childNodes[1].firstChild,X=S.childNodes[2],H=X.style))}function e(b,c,d,e,g,n,r){g||(g=na);if("undefined"===typeof b||null===b)b=Z.navigatorW;if("undefined"===typeof c||null===c)c=Z.navigatorH;if("undefined"===typeof d||null===d)d=0;if("undefined"===typeof e||null===e)e=0;P||(P=S);C||(C=P.style);"undefined"!==typeof n&&null!=n&&"undefined"!==typeof r&&null!=r&&(E=P.childNodes[1].firstChild);E&&(0==E.width&&"undefined"!==n&&null!==n&&(E.width=n),0==E.height&&"undefined"!== r&&null!==r&&(E.height=r));P&&C&&E&&(Z.tracking&&(g=0),"undefined"!==typeof g&&null!==g&&(n=E.width/E.height,r=Z.viewerW/Z.viewerH,g=0==g?r:n,1b&&(b+=360);var c=parseFloat(E.width),d=parseFloat(E.height),b=Z.Utils.rotatePoint(c/ Z.imageW*a.x-c/2,d/Z.imageH*a.y-d/2,-b);a=b.x-parseFloat(H.width)/2;c=b.y-parseFloat(H.height)/2;b=parseFloat(C.width)/2;c=parseFloat(C.height)/2+c-1;H.left=b+a+(Z.comparison?-1:0)+"px";H.top=c+"px"}}function O(b){if(E&&H&&va){b=Z.imageR;0>b&&(b+=360);var c=parseFloat(H.left),d=parseFloat(H.top),e=parseFloat(C.width)/2,f=parseFloat(C.height)/2,d=d-f,c=c-e+parseFloat(H.width)/2,e=d+parseFloat(H.height)/2;b=Z.Utils.rotatePoint(c,e,b);c=parseFloat(E.width);e=parseFloat(E.height);d=c/Z.imageW;b=new Z.Utils.Point((b.x+ c/2)/d,(b.y+e/2)/d);a.syncViewportToNavigator(b)}}function ha(b){Z.interactive&&(a.zoomAndPanAllStop(!1,!0),Z.mouseIsDown=!0,Z.comparison&&Z.Viewer.viewportSelect(parseInt(W,10)),Z.maskingSelection&&Z.maskClearOnUserAction&&a.clearMask(),P&&X&&H&&(b=Z.Utils.event(b),X.mouseXPrior=b.clientX,X.mouseYPrior=b.clientY,dragPtStart=new Z.Utils.Point(b.clientX,b.clientY),Z.Utils.addEventListener(P,"mousemove",oa),Z.Utils.addEventListener(P,"mouseup",da),Z.Utils.addEventListener(document,"mouseup",da)))}function oa(a){if(Z.interactive&& X&&H){var b=parseFloat(H.left),c=parseFloat(H.top);H.left=b+(a.clientX-X.mouseXPrior)+"px";H.top=c+(a.clientY-X.mouseYPrior)+"px";X.mouseXPrior=a.clientX;X.mouseYPrior=a.clientY;O(!1);return!1}}function da(b){if(Z.interactive&&(Z.mouseIsDown=!1,P&&X&&H)){document.mousemove=null;document.mouseup=null;Z.Utils.removeEventListener(P,"mousemove",oa);Z.Utils.removeEventListener(P,"mouseup",da);Z.Utils.removeEventListener(document,"mouseup",da);b=Z.Utils.event(b);var c=new Z.Utils.Point(b.clientX,b.clientY); if(c=Z.Utils.calculatePointsDistance(dragPtStart.x,dragPtStart.y,c.x,c.y)a?"1":4>a?"2":10>a?"4":16>a?"10":25>a?"16":40>a?"25":60>a?"40":100>a?"60":"INFINITY")))};this.z682=function(){w?d(): aa=window.setInterval(d,300)};this.setSizeAndPosition=function(a,b,c,d,f,g,n){e(a,b,c,d,f,g,n)};this.getSizeAndPositionNavigatorImage=function(){E||(E=S.childNodes[1].firstChild);var a=null;"undefined"!==typeof E.parentNode&&null!==E.parentNode&&(a=E.parentNode.style,a={width:E.width,height:E.height,left:parseFloat(a.left)-1,top:parseFloat(a.top)-1});return a}}; Z.ZoomifyGallery=function(a){function b(a){Fa=Z.viewportCurrent.getSlides();for(var b=0,c=Fa.length;bMath.abs(ub)&&(smoothPanDeltaX=ub);a+=Ia;b=P(a);gspS.left=b+"px";Ia-=a-b;a=Z.GalleryScrollPanel.childNodes[va].style;ma.left=parseFloat(gspS.left)+parseFloat(a.left)-1+"px";La&&0==Math.round(Ia*d)/d&&(La=!1)}}else Z.mouseIsDownGallery||null!==La||0==Ia?aa():(b=P(a+ub),ub=b-a,0!=ub&&(Ka=Ea+ub,La=!0))}function P(a){parseFloat(Z.GalleryScrollPanel.childNodes[va].style.width);var b=parseFloat(X.width),c=parseFloat(gspS.width);ca?a=0:a>=b-c?a=b-c:Z.mouseIsDownGallery|| La||(a=(b-c)/2):0d+c&&(n=-d+1);d+f+c>b&&(console.log(b,c,d,f),n=-(d+f+1-b));n!=d&&(b=P(n),gspS.left=b+"px",c=b,d=parseFloat(a.left));ma.width=f-2+"px";ma.height=g-3+"px";ma.left=d-1+c+"px";ma.top=e+"px"}};this.setViewport=function(b){a=b;a.getViewportID()};this.validateGalleryGlobals=function(){ba?t():ka=window.setInterval(t,300)};this.setSizeAndPosition=function(a,b,c,d){u(a, b,c,d)}}; Z.ZoomifyRuler=function(a){function b(){var a=2*parseFloat(Z.Utils.getResource("z82MORE")),b=Z.Utils.getResource("z83NOALPHA"),c=Z.Utils.getResource("z83"),c=Z.Utils.createContainerElement("div","buttonContainerRulerSettings","inline-block","absolute","visible","0px","0px","0px","0px","none","0px",c,"0px","0px","normal","default",!0);Z.Utils.setOpacity(c,a,b);Z.RulerDisplay.appendChild(c);Z.Utils.addEventListener(c,"mouseover",Z.Toolbar.backgroundEventsHandler);a=Z.Utils.createContainerElement("div","rulerSettingsPanelLabelTextBox", "inline-block","absolute","hidden","1px","1px","0px","0px","none","0px","transparent","0px","0px","nowrap",null,!0);b=document.createTextNode(Z.Utils.getResource("UI_RULERSETTINGSPANELLABEL"));a.appendChild(b);c.appendChild(a);for(var d=Z.Utils.getResource("CONTENT_RULERUNITSCHOICELISTTITLE"),e=Z.Utils.getResource("CONTENT_RULERUNITSCHOICELISTVALUES").split(","),f=[],a=0,b=e.length;a=e;)na=Z.Utils.arraySplice(na,na.length-1,1);na=Z.Utils.arraySplice(na,0,0,{text:d.toString()+f+(d==b?"":"~")+"",value:d});na[na.length]={text:e.toString()+f+(e==c?"":"~")+"",value:c}; Z.Utils.updateSelectElement(aa,na);aa.selectedIndex=0}function e(){Z.Toolbar.getSkinArray();Z.Toolbar.getSkinSizes();parseInt(Z.Utils.getResource("z63"),10);var a=Z.rulerW,b=Z.rulerH,c=-1==Z.rulerL&&Z.Navigator?Z.navigatorL:Z.rulerL,d=-1==Z.rulerT&&Z.Navigator?Z.navigatorT+Z.navigatorH+1:Z.rulerT,e=(b-15)/2-1,g=Z.narrativeMode?23:0;La=0!=Z.rulerListType?a-59-16-g-1:a-10-g;var h=(b-1+5)/2,t=La/2-5,B=h-10,D="pixels"==Z.units?7:0;oa&&R&&rsbnlS&&rsbnrS&&F&&n&&Q&&r&&w&&W&&(f(a,b,c,d),oa.width=a+"px",oa.height= b+"px",oa.left="0px",oa.top="0px",S&&(S.width="59px",S.left=a-59-4-g+"px",S.top=(b-20)/2+"px",S.visibility="visible"),R.width=La+"px",R.height="1px",R.left="6px",R.top=h+3+"px",rsbnlS.width="1px",rsbnlS.height="6px",rsbnlS.left="6px",rsbnlS.top=h+"px",rsbnrS.width="1px",rsbnrS.height="6px",rsbnrS.left=6+La+"px",rsbnrS.top=h+"px",n.width=La+"px",n.height="15px",n.left="13px",n.top=B+"px",r.width=t+"px",r.height="15px",r.left=16-D+"px",r.top=B+"px",W.width=t+"px",W.height="15px",W.left=La/2+15-D+"px", W.top=B+"px");if(Z.narrativeMode){if(b=document.getElementById("buttonRulerSettingsShow"))c=b.style,Z.Utils.buttonSize(b,15,15),c.left=a-15-5-1+"px",c.top=e+"px",b.style.display="inline-block";oa&&P&&C&&ba&&K&&va&&E&&X&&H&&za&&Oa&&ma&&Fa&&T&&ia&&(b=parseInt(Z.Utils.getResource("DEFAULT_RULERSETTINGSLABELFONTSIZE"),10),d=parseInt(Z.Utils.getResource("DEFAULT_RULERSETTINGSTEXTFONTSIZE"),10),g=parseInt(Z.Utils.getResource("DEFAULT_RULERSETTINGSTEXTPADDINGSMALL"),10),a=parseInt(oa.width,10),h=parseInt(Z.Utils.getResource("DEFAULT_RULERSETTINGSHEIGHT"), 10),c=Z.Utils.getResource("black"),e=h-15-8+2,t=P.style,t.width=a+"px",t.height=h+"px",t.left="0px",t.top="0px",h=C.style,h.width="160px",h.height="20px",h.left="9px",h.top="9px",Z.Utils.setTextNodeStyle(C.firstChild,c,"verdana",b+1+"px","none","normal","normal","normal","normal","1em","left","none"),h=ba.style,h.width="67px",h.height="20px",h.left="8px",h.top="29px",h=ka.style,h.width="50px",h.height="20px",h.left=a-50-60+"px",h.top="33px",Z.Utils.setTextNodeStyle(ka.firstChild,c,"verdana",b+"px", "none","normal","normal","normal","normal","1em","left","none"),h=K.style,h.width="60px",h.height="18px",h.left=a-60-8-2+"px",h.top="29px",Z.Utils.setTextAreaStyle(K,"black","verdana",d+"px","none","normal","normal","normal","normal","1em","left","none",g+"px"),d=E.style,d.width="80px",d.height="20px",d.left="10px",d.top="57px",Z.Utils.setTextNodeStyle(E.firstChild,c,"verdana",b+"px","none","normal","normal","normal","normal","1em","left","none"),d=X.style,d.width="19px",d.height="19px",d.left="81px", d.top="53px",d=H.style,d.width="80px",d.height="20px",d.left="110px",d.top="57px",Z.Utils.setTextNodeStyle(H.firstChild,c,"verdana",b+"px","none","normal","normal","normal","normal","1em","left","none"),b=za.style,b.width="19px",b.height="19px",b.left=a-19-8-3+"px",b.top="53px",b=Oa.style,b.width="109px",b.height="20px",b.left="8px",b.top="76px",b=ma.style,b.width="69px",b.height="20px",b.left="123px",b.top="76px",b=Fa.style,b.width=a-16+"px",b.height="1px",b.left="8px",b.top=e-6+"px",Z.Utils.buttonSize(T, 15,15),b=T.style,b.left=a-30-5-8-3+"px",b.top=e+"px",Z.Utils.buttonSize(ia,15,15),b=ia.style,b.left=a-15-8-3+"px",b.top=e+"px");showRulerSettings(!1,!1)}else if(b=document.getElementById("buttonRulerSettingsShow"))b.style.display="none"}function f(a,b,c,d){if("undefined"===typeof a||null===a)a=Z.rulerW;if("undefined"===typeof b||null!==b)b=Z.rulerH;if("undefined"===typeof c||null!==c)c=-1==Z.rulerL&&Z.Navigator?Z.navigatorL:Z.rulerL;if("undefined"===typeof d||null!==d)d=-1==Z.rulerT&&Z.Navigator? Z.navigatorT+Z.navigatorH+1:Z.rulerT;O.width=a+"px";O.height=b+"px";Z.narrative&&(c+=Z.narrativeW+15,d+=15);O.left=c+"px";O.top=d+"px"}function g(a){O||(O=Z.RulerDisplay.style);O&&(O.display=a?"inline-block":"none")}function t(b){if(a&&a.getStatus("initializedViewport")){var e=a.getZoom(),f="pixels"==Z.units?0:4;if(S){S.visibility="visible";var g;g=0!=pa?pa*e:100*e;1>g?Math.round(100*g):Math.round(g)}g=0;for(var n=Ia.length;g na[e].value;)e++;b&&d();insertIndex=e;if(insertIndex"),c=Z.Utils.xmlConvertTextToDoc(c),u(c,b)):t(c,b,"loadingAnnotationsJSON"))}else"IIIFImageServer"== Z.tileSource&&a.responseText&&t(a.responseText,b,"loadingIIIFJSON");else Z.Utils.showMessage(Z.Utils.getResource("z272"),!1,Z.messageDurationShort,"center")}function g(a,b,c,d,e,f){if(Z.Viewport)if(Z.useLocalFile||(f=a.zChunkNumber,e=a.zTile),a=new Z.Utils.createUint8Array(Z.useLocalFile?a:a.response,0),"header"==d)if(null===Z.tileSourceMultiple||"undefined"===typeof b||null===b)"ZoomifyZIFFile"==Z.tileSource?Z.Viewport.parseZIFHeader(a):"ZoomifyPFFFile"==Z.tileSource&&Z.Viewport.parsePFFHeader(a); else{c=0;for(var g=Z.imageSetLength;c',a=Z.Utils.xmlConvertTextToDoc(a), "undefined"===typeof b||null===b||null===Z.imageSetLength)Z.Viewport&&Z.Viewport.z602(a);else for(c=0,d=Z.imageSetLength;cc||b==Z.browsers.CHROME&&2>c),B=B&&D,D=!(b==Z.browsers.CHROME&& 2>c),t=g||t?"high":null,g=B&&!!ha.getContext("2d").ellipse,oa=(document.documentElement||{}).style||{},ha=!1,da=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],R,F;for(;R=da.shift();)if("undefined"!==typeof oa[R]){ha=!0;F=/webkit/i.test(R);break}var oa=ha,da="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||0Z.browserVersion||Z.browser==Z.browsers.OPERA&&15>Z.browserVersion||Z.browser==Z.browsers.CHROME&&25>Z.browserVersion&&Z.browser==Z.browsers.FIREFOX&&20>Z.browserVersion&&Z.browser==Z.browsers.SAFARI&&5>Z.browserVersion);Z.platform=a;Z.browser=b;Z.browserVersion=c;Z.scaleThreshold=d;Z.localFilesSupported=e;Z.xmlHttpRequestSupport= N;Z.responseArraySupported=f;Z.canvasSupported=B;Z.useCanvas=Z.canvasSupported;Z.imageFilters=!Z.useCanvas&&Z.imageFilters?!1:Z.imageFilters;Z.cssTransformsSupported=ha;Z.cssTransformProperty=R;Z.cssTransformNoUnits=F;Z.alphaSupported=D;Z.renderQuality=t;Z.ellipseDrawingSupported=g;Z.rotationSupported=oa;Z.fullScreenSupported=Q;Z.arrayMapSupported=r;Z.arraySpliceSupported=w;Z.float32ArraySupported=W;Z.uInt8ArraySupported=aa;Z.definePropertySupported=S;Z.touchSupport=da;Z.gestureSupport=n&&da;Z.mobileDevice= u;Z.localUse=P;Z.singleFileSupported=C},getBookmarksURL:function(){if(Z.bookmarksGet){var a=window.location.href,b=a.indexOf("?");if(-1!=b){var c="",d=-1,e=-1,f=-1,g=-1,t=Z.imageW/2,u=Z.imageH/2,B=-1,N=0,c=a.substring(b+1,a.length);if("IIIFImageServer"!=Z.tileSource)d=c.indexOf("x="),e=c.indexOf("y="),f=c.indexOf("z="),g=c.indexOf("r="),-1==g&&(g=c.length+1),-1!=d&&(t=parseFloat(c.substring(d+2,e-1))),-1!=e&&(u=parseFloat(c.substring(e+2,f-1))),-1!=f&&(B=parseFloat(c.substring(f+2,g-1))),g!=c.length+ 1&&(N=parseFloat(c.substring(g+2,c.length)));else{for(var D,O,ha,a=c.split("/"),b=a.length-1;-1ha||360=Z.initialZ&&(Z.initialZ/=100));break;case "zMinZoom":"fit"==pValue&&(pValue="-1");"fill"==pValue&&(pValue="0");isNaN(parseFloat(pValue))||(Z.minZ=parseFloat(pValue),Z.minZ&&0=Z.minZ&&(Z.minZ/=100));break;case "zMaxZoom":isNaN(parseFloat(pValue))||(Z.maxZ=parseFloat(pValue),Z.maxZ&&-1!=Z.maxZ&&(Z.maxZ/=100));break;case "zNavigatorVisible":Z.navigatorVisible=parseInt(pValue,10);break;case "zNavigatorRectangleColor":Z.navigatorRectangleColor=pValue;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 "zToolbarBackgroundVisible":"0"==pValue&&(Z.toolbarBackgroundVisible=!1);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 "zZoomButtonsVisible":"0"== pValue&&(Z.zoomButtonsVisible=!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 "zSkinPath":Z.skinPath=pValue;break;case "zTooltipsVisible":"0"==pValue&&(Z.tooltipsVisible=!1);break;case "zHelpVisible":Z.helpVisible=parseInt(pValue,10);break;case "zHelpPath":Z.helpPath=pValue;Z.helpCustom=!0;break;case "zHelpWidth":isNaN(parseInt(pValue,10))||(Z.helpW=parseInt(pValue,10));break;case "zHelpHeight":isNaN(parseInt(pValue,10))||(Z.helpH= parseInt(pValue,10));break;case "zHelpLeft":isNaN(parseInt(pValue,10))||(Z.helpL=parseInt(pValue,10));break;case "zHelpTop":isNaN(parseInt(pValue,10))||(Z.helpT=parseInt(pValue,10));break;case "zProgressVisible":"0"==pValue&&(Z.progressVisible=!1);break;case "zMessagesVisible":"0"==pValue&&(Z.messagesVisible=!1);break;case "zTileSource":"dzi"==pValue.toLowerCase()&&(Z.tileSource="DZIFolder");break;case "zUsingDirectoryExtensions":"1"==pValue&&(Z.usingDirectoryExtensions=!0);break;default:if(Z.proParamsEnabled)switch(g){case "zXMLParametersPath":Z.xmlParametersPath= Z.Utils.stringRemoveTrailingSlash(pValue);Z.loadParametersXML();break;case "zZoomSpeed":Z.zoomSpeed=parseInt(pValue,10);break;case "zPanSpeed":Z.panSpeed=parseInt(pValue,10);break;case "zFadeInSpeed":Z.fadeInSpeed=parseInt(pValue,10);Z.fadeIn=0=f&&(Z.smoothPanEasing=f);break;case "zSmoothPanGlide":f=parseInt(pValue,10);1<=f&&5>=f&&(Z.smoothPanGlide=f);break;case "zSmoothZoom":"0"==pValue&&(Z.smoothZoom=!1);break;case "zSmoothZoomEasing":f=parseInt(pValue,10);1<=f&&4>=f&&(Z.smoothZoomEasing=f);break;case "zAutoResize":"1"==pValue&&(Z.autoResize=!0);break;case "zCanvas":"0"==pValue&&(Z.canvas=!1);Z.canvasSupported&&Z.canvas||(Z.useCanvas=!1);break;case "zBaseZIndex":Z.baseZIndex= parseInt(pValue,10);break;case "zDebug":Z.debug=parseInt(pValue,10);break;case "zHideOverlayBackfill":"1"==pValue&&(Z.hideOverlayBackfill=!0);break;case "zImageProperties":Z.imageProperties=pValue;break;case "zNavigatorWidth":!isNaN(parseInt(pValue,10))&&(Z.navigatorW=parseInt(pValue,10),0';d[d.length]='
';d[d.length]='
';c.innerHTML=d.join("");for(var d=c=c.firstChild, e=c.getElementsByTagName("div");0Z.browserVersion?(b=a.screenX,c=a.screenY):"number"===typeof a.pageX?(b=a.pageX,c=a.pageY):"number"===typeof a.clientX?(b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,c=a.clientY+document.body.scrollTop+ document.documentElement.scrollTop):console.log(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,f,g,t,u,B,N,D,O,ha,oa,da,R,F,n,Q){a=Z.Utils.createContainerElement("span",a,"inline-block","absolute","hidden",g,t,u,B,ha,oa,da,R,F,n,Q);if(Z.Utils.stringValidate(b)){var r=document.createTextNode(b);a.appendChild(Z.Utils.createCenteredElement(r));Z.Utils.setTextNodeStyle(r,"black","verdana","13px","none","normal","normal","normal","normal","1em","center","none")}else{c=Z.Utils.stringRemoveTrailingSlash(c);var w=Z.Utils.createGraphicElement(c+ "/"+d),W=Z.Utils.createGraphicElement(c+"/"+e),aa=Z.Utils.createGraphicElement(c+"/"+f);w.style.width=W.style.width=aa.style.width=g;w.style.height=W.style.height=aa.style.height=t;w.style.position=W.style.position=aa.style.position="absolute";Z.browser==Z.browsers.FIREFOX&&3>Z.browserVersion&&(w.style.top=W.style.top=aa.style.top="");W.style.visibility=aa.style.visibility="hidden";w.alt=W.alt=aa.alt="";"undefined"!==typeof O&&Z.Utils.stringValidate(O)&&(w.alt=Z.Utils.getResource(O));a.appendChild(w); a.appendChild(W);a.appendChild(aa)}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(w,"contextmenu",Z.Utils.preventDefault),Z.Utils.addEventListener(W,"contextmenu",Z.Utils.preventDefault), Z.Utils.addEventListener(aa,"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(r),Z.Utils.addEventListener(a,"contextmenu",Z.Utils.preventDefault));Z.tooltipsVisible&&Z.Utils.stringValidate(O)&&(a.title=Z.Utils.getResource(O));Z.Utils.setButtonHandler(a,N,D);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.Toolbar&&(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)},Checkbox:function(a,b,c,d,e,f,g,t,u){var B=Z.Utils.createContainerElement("div","containerFor-"+a,"inline-block","absolute","hidden",c,d,e,f,"none","0px","transparent","0px","0px","normal"),N=document.createElement("input"); B.appendChild(N);N.type="checkbox";N.id=a;N.value=b;N.width=c;N.height=d;a=B.style;a.width=c+"px";a.height=d+"px";a.left=e+"px";a.top=f+"px";Z.Utils.addEventListener(N,g,t);Z.Utils.addEventListener(N,"touchstart",t);Z.tooltipsVisible&&Z.Utils.stringValidate(u)&&(N.title=Z.Utils.getResource(u));return B},Graphic:function(a,b,c,d,e,f,g,t){b=Z.Utils.stringRemoveTrailingSlash(b);b=Z.Utils.createGraphicElement(c?b+"/"+c:b);c=b.style;c.width=d;c.height=e;"undefined"!==typeof t&&Z.Utils.stringValidate(t)? b.alt=Z.Utils.getResource(t):b.alt="";c=Z.Utils.createContainerElement("span",a,"inline-block","absolute","hidden",d,e,f,g,"none","0px","transparent","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"},Radiobutton:function(a,b,c,d,e,f,g,t,u,B){var N= Z.Utils.createContainerElement("div","containerFor-"+a,"inline-block","absolute","hidden",d,e,f,g,"none","0px","transparent","0px","0px","normal"),D=document.createElement("input");N.appendChild(D);D.type="radio";D.id=a;D.name=b;D.value=c;D.width=d;D.height=e;a=N.style;a.width=d+"px";a.height=e+"px";a.left=f+"px";a.top=g+"px";null!==t&&null!==u&&(Z.Utils.addEventListener(D,t,u),Z.Utils.addEventListener(D,"radioEvnt",u));Z.tooltipsVisible&&Z.Utils.stringValidate(B)&&(D.title=Z.Utils.getResource(B)); return N},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},Coordinates:function(a,b,c,d){this.x="number"===typeof a?a:0;this.y="number"===typeof b?b:0;this.z="number"===typeof c?c:0;this.r="number"===typeof d?d:0},CoordinatesDisplayStyle:function(a,b,c,d,e,f,g,t,u,B,N){this.cLeft=a;this.cTop=b;this.vWidth=c;this.vHeight=d;this.vLeft=e;this.vTop=f; this.bWidth=g;this.bHeight=t;this.bLeft=u;this.bTop=B;this.cRotation=N},Pair:function(a,b){this.a=a;this.b=b},Trio:function(a,b,c){this.a=a;this.b=b;this.c=c},Range:function(a,b){this.start="number"===typeof a?a:0;this.end="number"===typeof b?b:0},RangeScale:function(a,b){this.min="number"===typeof a?a:0;this.max="number"===typeof b?b:0},swapZIndices:function(a,b){var c=Z.Utils.getElementStylePropertyZIndex(a),d=Z.Utils.getElementStylePropertyZIndex(b);if("auto"==c||"auto"==d)c=(Z.baseZIndex-101).toString(), d=(Z.baseZIndex-100).toString();a.style.zIndex=d;b.style.zIndex=c},stringValidate:function(a){return"undefined"!==typeof a&&null!==a&&""!==a&&"null"!==a},stringEscapeSpaces:function(a){var b=RegExp("_","g");a=a.replace(b,"__");b=RegExp(" ","g");return a=a.replace(b,"_")},stringUnescapeSpaces:function(a){var b=RegExp("__","g");a=a.replace(b,"_");b=RegExp("_","g");return a=a.replace(b," ")},stringGetInitials:function(a){var b="";a&&(b=a.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g).join("").toUpperCase()); return b},stringGetRelativePath:function(a,b){var c=a;a&&b&&(c="/"==a.slice(0,1)?0:a.split("/").length-1,c=Z.Utils.stringMultiply("../",c)+b);return c},stringLowerCaseFirstLetter:function(a){return a.charAt(0).toLowerCase()+a.slice(1)},stringUpperCaseFirstLetter:function(a){return a.charAt(0).toUpperCase()+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)},stringPadFront:function(a,b,c){return a=Z.Utils.stringMultiply(c, b-a.length)+a},stringRemoveLeadingZeros:function(a){var b="";"undefined"!==typeof a&&null!==a&&(b=1'+c+"",a=a.substring(0,b)+d+a.substring(b+c.length));return a},htmlClearLinkFromSelection:function(){var a=Z.Utils.htmlGetSelection();if(Z.Utils.stringValidate(a)){var b= null;-1!=a.indexOf(".zif');\">")?b=a.indexOf("zif');\">")+8:-1!=a.indexOf('_blank">')?b=a.indexOf('_blank">')+8:-1!=a.indexOf('clearLabelHighlightsAll(true)">')&&(b=a.indexOf('clearLabelHighlightsAll(true)">')+23);if(b){var c=a.indexOf("");Z.Utils.htmlReplaceSelection(a.substring(b,c))}}},htmlReplaceSelection:function(a){if(a){var b;if(window.getSelection&&window.getSelection().getRangeAt){b=window.getSelection().getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML= a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)a.appendChild(d);b.insertNode(a)}else document.selection&&document.selection.createRange&&(b=document.selection.createRange(),b.pasteHTML(a))}},htmlClearSelection:function(){document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges()},htmlGetSelectionParagraphNode:function(){var a=null,b=window.getSelection?window.getSelection():document.selection?document.selection.createRange():null;if(b){for(b= b.anchorNode;null!=b&&"p"!=b.localName&&"P"!=b.localName;)b=b.parentNode;b&&(a=b)}return a},htmlGetSelectionParagraphText:function(){var a="";Z.Utils.htmlGetSelectionParagraphNode()&&(a=parent.innerText||parent.textContent);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(c){this.showMessage(c.name+this.getResource("z244")+c.message)}else this.showMessage(this.getResource("z294"));return b},xmlConvertDocToText:function(a){var b=null;if(window.ActiveXObject)try{b=a.xml}catch(c){this.showMessage(c.name+this.getResource("z243")+c.message)}else if(window.DOMParser)try{b=(new XMLSerializer).serializeToString(a)}catch(c){this.showMessage(c.name+this.getResource("z243")+c.message)}else this.showMessage(this.getResource("z294"));return b},xmlEscapeMinimal:function(a){var b= null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\r?\n/g,"%0A"));return b},xmlUnescapeMinimal:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/%0A/g,"\n").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&"));return b},xmlEscapeMore:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/&/g, "&").replace(/;/g,";").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\r?\n/g,"%0A").replace(/,/g,",").replace(/:/g,":"));return b},xmlUnescapeMore:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/:/g,":").replace(/,/g,",").replace(/%0A/g,"\n").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<").replace(/;/g,";").replace(/&/g,"&"));return b},xmlEscapingConvertURIToHTML:function(a){var b= null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/%0A/g,"\n").replace(/%40/g,"@").replace(/%23/g,"#").replace(/%24/g,"$").replace(/%25/g,"%").replace(/%5E/g,"^").replace(/%26/g,"&").replace(/%3D/g,"=").replace(/%2B/g,"+").replace(/%3A/g,":").replace(/%3B/g,";").replace(/%22/g,""").replace(/%5C/g,"\").replace(/%2F/g,"/").replace(/%3F/g,"?").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%7B/g, "{").replace(/%7D/g,"}").replace(/%60/g,"`").replace(/%27/g,"'"));return b},xmlEscapingConvertHTMLToURI:function(a){var b=null;"undefined"!==typeof a&&null!==a&&(b=a.replace(/\n/g,"%0A").replace(/'/g,"%27").replace(/"/g,"%22").replace(/>/g,"%3E").replace(/</g,"%3C").replace(/&/g,"%26").replace(/@/g,"%40").replace(/#/g,"%23").replace(/$/g,"%24").replace(/%/g,"%25").replace(/^/g,"%5E").replace(/&/g,"%26").replace(/=/g,"%3D").replace(/+/g, "%2B").replace(/:/g,"%3A").replace(/;/g,"%3B").replace(/"/g,"%22").replace(/\/g,"%5C").replace(///g,"%2F").replace(/?/g,"%3F").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[/g,"%5B").replace(/]/g,"%5D").replace(/{/g,"%7B").replace(/}/g,"%7D").replace(/`/g,"%60").replace(/'/g,"%27"));return b},jsonConvertObjectToDataProvider:function(a){for(var b=[],c=0,d=a.length;c";if(t)for(u in a)"#text"==u?d+=a[u]:"object"===typeof a[u]&&(d+=b(a[u],u));d+=""}else d+="<"+c+">"+a.toString()+"";return d},c="",d;for(d in a)c+=b(a[d], d);return c.replace(/&/g,"&").replace(/\t|\n/g,"")},jsonConvertXMLTextToJSONText:function(a){var b={convertToObject:function(a){var d={};if(1==a.nodeType){if(a.attributes.length)for(var e=0,f=a.attributes.length;ee)for(b.reduceWhitespace(a),g=a.firstChild;g;g=g.nextSibling)3== g.nodeType?d["#text"]=b.escapeMinimal(g.nodeValue):d[g.nodeName]?d[g.nodeName]instanceof Array?d[g.nodeName][d[g.nodeName].length]=b.convertToObject(g):d[g.nodeName]=[d[g.nodeName],b.convertToObject(g)]:d[g.nodeName]=b.convertToObject(g);else a.attributes.length?d["#text"]=b.escapeMinimal(b.innerXML(a)):d=b.escapeMinimal(b.innerXML(a));else e&&(a.attributes.length?d["#text"]=b.escapeMinimal(b.innerXML(a)):d=b.escapeMinimal(b.innerXML(a)))}a.attributes.length||a.firstChild||(d=null)}else 9==a.nodeType? d=b.convertToObject(a.documentElement):alert("This node type not supported : "+a.nodeType);return d},convertToJSONText:function(a,d){var e=d?'"'+d+'"':"";if(a instanceof Array){for(var f=0,g=a.length;f"}else b+="/>"}else 3==a.nodeType&&(b+=a.nodeValue);return b};for(a=a.firstChild;a;a=a.nextSibling)b+=e(a)}return b}};9==a.nodeType&&(xml=xml.documentElement);return jsonTextOut= "{\n "+b.convertToJSONText(b.convertToObject(b.reduceWhitespace(a)),a.nodeName,"\t").replace(/\t/g," ")+"\n}"},arrayClear:function(a){if(a)for(;0c&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;cd&&(d=Math.max(0,a.length+d)):d=0;for(var e=a.length;d< e;d++)if(a[d][b]===c)return d}return-1},arrayIndexOfObjectTwoValues:function(a,b,c,d,e,f){if("undefined"!==typeof a){d?0>d&&(d=Math.max(0,a.length+d)):d=0;for(var g=a.length;dc&&(c=Math.max(0,a.length+c)):c=0;for(var d=a.length;cd&&(d=Math.max(0,a.length+d)):d=0;for(var f=a.length;d< f;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},arrayIntersect:function(a,b){for(var c,d,e,f=[],g=0,t=a.length;g=(d=b[u]);u++)if(d==c){e=!0;break}e&&(f[f.length]=a[g])}return f},arrayMap:function(a,b){var c=[];if(Z.arrayMapSupported)c=a.map(b);else for(var d=0,e=a.length;dc&&(c=0);var f=[];if(3c[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=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=(elmt2=b[t]);t++)if(elmt2==f){g=!0;break}g&&(c=Z.Utils.arraySplice(c,d--,1))}return c},arrayToArrayOfStrings:function(a){for(var b=[],c=0,d=a.length;ca?1.25:2>a?1.5:2.5>a?2:4>a?2.5: 5>a?4:10>a?5:16>a?10:20>a?16:25>a?20:32>a?25:40>a?32:50>a?40:60>a?50:100>a?60:150>a?100:250>a?150:250);return a},calculatePointsDistance:function(a,b,c,d){return Math.sqrt((a-=c)*a+(b-=d)*b)},convertPixelsToUnits:function(a,b,c){var d=1;"undefined"!==typeof b&&null!==b&&0!=b?d=b:"undefined"!==typeof c&&null!==c&&0!=c&&(d=Z.imageW/c);return a/d},polygonArea:function(a,b,c,d){if("undefined"===typeof d||null===d)d=4;a=a.slice(0);b?a[a.length]={x:a[0].x,y:a[0].y}:"undefined"!==typeof c&&null!==c&&(a[a.length]= {x:c.x,y:c.y});for(var e=c=b=0,f=a.length-1;ef&&(f=c[t].x),c[t].yg&&(g=c[t].y);c=f-e;d=g-d}this.w=c;this.h=d},polygonPerimeter:function(a,b,c,d){if("undefined"===typeof d||null===d)d=5;a=a.slice(0);b?a[a.length]={x:a[0].x,y:a[0].y}:"undefined"!==typeof c&&null!==c&&(a[a.length]={x:c.x,y:c.y});c=b=0;for(var e= a.length-1;ce&&(e+=360);e=e*Math.PI/180;a-=c;var f=b-d;b=a*Math.cos(e)-f*Math.sin(e);e=a*Math.sin(e)+f*Math.cos(e);c=Math.round(b+c);d=Math.round(e+d);return new Z.Utils.Point(c,d)},getDisplayPositionRotated:function(a,b){if("undefined"===typeof b||null===b)b=Z.imageR;0>b&&(b+=360);var c=parseFloat(a.left),d=parseFloat(a.top),e=parseFloat(a.width),f=parseFloat(a.height);return Z.Utils.getPositionRotated(c,d,c+e/2,d+f/2,b)},translateElement:function(a, b,c){b="translate("+b.toString()+"px,"+c.toString()+"px)";a.transform=b;a.msTransform=b;a.mozTransform=b;a.webkitTransform=b;a.oTransform=b},scaleElement:function(a,b){var c="scale("+b.toString()+")";a.transform=c;a.msTransform=c;a.mozTransform=c;a.webkitTransform=c;a.oTransform=c},updateRotationForLegacyMedia:function(a){var b=0;switch(a){case "arrowDownLeft":b+=45;break;case "arrowLeft":b+=90;break;case "arrowUpLeft":b+=135;break;case "arrowUp":b+=180;break;case "arrowUpRight":b+=225;break;case "arrowRight":b+= 270;break;case "arrowDownRight":b+=315;break;case "lineHorizontal":b+=90}return b},filterImage:function(a,b,c,d){if(b)switch(c=a.data,"2"==b.substring(b.length-1)&&(b=b.substring(0,b.length-1)),b){case "grayscale":for(b=0,d=c.length;be;e++)d+=a[b+7-e]*c,c*=256}else d=(a[b]+(a[b+1]<<8)|a[b+2]<<16)+16777216*a[b+3],0!=a[b+4]&&(d+=4294967296*a[b+4]);return d},shortValue:function(a,b){return a[b]+(a[b+1]<<8)},createUint8Array:function(a,b){return Z.uInt8ArraySupported?new Uint8Array(a,b):new Z.Utils.TypedArray(a,b)},TypedArray:function(a){var b;if("number"===typeof a){b=Array(a);for(var c=0;carguments.length&&(b=0);for(var c=0,d=a.length;c>18&63,c=e>>12&63,d=e>>6&63,e&=63,t[g++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e);while(fa.getUTCMonth()+1?"0":"")+(a.getUTCMonth()+ 1),d=(10>a.getUTCDate()?"0":"")+a.getUTCDate(),e=(10>a.getUTCHours()?"0":"")+a.getUTCHours(),f=(10>a.getUTCMinutes()?"0":"")+a.getUTCMinutes(),a=(10>a.getUTCSeconds()?"0":"")+a.getUTCSeconds();return b+c+d+"-"+e+f+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,e){if("undefined"===typeof e||null===e)e=Z.smoothZoomEasing;var f=b;if(Z.smoothZoom&&1(c/=d/2)?b/2*c*c*c*c*c+a:b/2*((c-=2)*c*c*c*c+2)+a}return f},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},pointIsInViewer:function(a){var b=!1,c=document.getElementById(Z.pageContainerID);if(c){var d=parseFloat(Z.Utils.getElementStyleProperty(c,"width")),e=parseFloat(Z.Utils.getElementStyleProperty(c, "height")),f=Z.Utils.getElementPosition(c);isNaN(d)||isNaN(e)||isNaN(f.x)||isNaN(f.y)||(c=f.x,f=f.y,a.x>c&&a.xf&&a.yc?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},drawCrosshairs:function(a,b,c,d){if("undefined"===typeof a||null===a)a=Z.ViewerDisplay;if("undefined"===typeof b||null=== b)b=Z.viewportCurrent.getViewW();if("undefined"===typeof c||null===c)c=Z.viewportCurrent.getViewH();if("undefined"===typeof d||null===d)d="#696969";var e=document.getElementById("viewportCenterLineHorizontal"),f=document.getElementById("viewportCenterLineVertical");(f||e)&&Z.Utils.hideCrosshairs();e=Z.Utils.createContainerElement("div","viewportCenterLineHorizontal","inline-block","absolute","visible",b+"px","1px","0px",c/2+"px","solid","1px","transparent","0px","0px","normal",null,!0,d);f=Z.Utils.createContainerElement("div", "viewportCenterLineVertical","inline-block","absolute","visible","1px",c+"px",b/2+"px","0px","solid","1px","transparent","0px","0px","normal",null,!0,d);a.appendChild(e);a.appendChild(f)},hideCrosshairs:function(a){if("undefined"===typeof a||null===a)a=Z.ViewerDisplay;var b=document.getElementById("viewportCenterLineHorizontal"),c=document.getElementById("viewportCenterLineVertical");b&&a.removeChild(c);c&&a.removeChild(b)},configureHelpDisplay:function(){var a=Z.helpW,b=Z.helpH;a>=Z.viewerW&&(a= Z.viewerW-80);b>=Z.viewerH&&(b=Z.viewerH-80);var c=Z.helpL?Z.helpL:(Z.viewerW-a)/2,d=Z.helpT?Z.helpT:(Z.viewerH-b)/2,e=this.getResource("UI_HELPSCREENCOLOR"),f=this.getResource("UI_HELPBUTTONCOLOR");Z.HelpDisplay=this.createContainerElement("div","HelpDisplay","inline-block","absolute","hidden",a+"px",b+"px",c+"px",d+"px","solid","1px",e,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.HelpDisplay);c=Z.Utils.createContainerElement("div","helpTextBox","inline-block","absolute","auto",a- 50+"px",b-74+"px","4px","4px","solid","1px","white","0px","20px",null);c.style.overflowY=Z.mobileDevice?"scroll":"auto";Z.HelpDisplay.appendChild(c);Z.help=document.getElementById("helpTextBox");Z.HelpDisplay.style.zIndex=(Z.baseZIndex+38).toString();b=b-18-5;a-=66;c=this.getResource("z423");f=new Z.Utils.Button("buttonHelpOk",c,null,null,null,null,"56px","18px",a+"px",b+"px","mousedown",this.helpOkButtonHandler,"z342OK","solid","1px",f,"0px","0px");Z.HelpDisplay.appendChild(f.elmt);Z.HelpDisplay.style.display= "none"},helpOkButtonHandler:function(a){Z.Utils.hideHelp();return!0},showHelp:function(a){Z.HelpDisplay||Z.Utils.configureHelpDisplay();Z.help&&(Z.help.innerHTML=Z.helpCustom?Z.helpContent:unescape(a),Z.HelpDisplay.style.display="inline-block"!=Z.HelpDisplay.style.display?"inline-block":"none",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.Utils.getMessageDisplayCoords("6",a,Z.viewerW,Z.viewerH),d=this.getResource("z159"),e=this.getResource("z158");Z.MessageDisplay=this.createContainerElement("div","MessageDisplay","inline-block","absolute","auto",a+"px",b+"px",c.x+"px",c.y+"px","solid","1px",d,"0px","0px","normal",null,!0);Z.ViewerDisplay.appendChild(Z.MessageDisplay);Z.MessageDisplay.style.zIndex=(Z.baseZIndex+40).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)},getMessageDisplayCoords:function(a,b,c,d){switch(a){case "1":d=a=40;break;case "2":a=c/2- b/2;d=40;break;case "3":a=c-b-80;d=40;break;case "4":a=c-b-40;d=0