var iZoomBarCurrent=new ZoomBarW();var iZoomBar=null;function ZoomBarW(){var h=null;var i=13;var k=19;var m=10;this.setZoomLevels=function(a){i=a};this.adjustZoomLevels=function(a){k=a};this.getZoomBarParent=function(){return h};iFirstTimeLoadListener.addListener(this);this.onFirstTimeLoad=function(){var a=25;var b=m*(i);var c=iWidth-a-5;var d=iHeight-b-5;iZoomBar=new ZoomBarH(a,b,i,k,m);setTimeout(function(){o(c,d,a,b)},1000)};this.zoomIn=function(){iZoomBar.onZoomOut()};this.zoomOut=function(){iZoomBar.onZoomIn()};function o(a,b,c,d){var f=iZoomBar.getElementH();h=iDoc.createElement("div");h.style.position="absolute";h.style.left=a+"px";h.style.top=b+"px";if(!Browser.SVG){h.appendChild(f)}else{var g=iDrawingTools.createElement("svg");g.setAttribute("width",c+"px");g.setAttribute("height",d+"px");g.appendChild(f);h.appendChild(g)}iGraphicsDiv.appendChild(h)}}function ZoomBarH(T,U,V,W,X){var C=T;var Y=U;var t=null;var j=0;var D=V;var E=W;var l=X;var r=0;var s=l*(D-1);var F=new Date();var G=0;var H=0;var I=0;var Z=300;var v=null;var J=4;var K=50;var w=false;this.getElementH=function(){var a=iDrawingTools.createGroup("zoomBarG",1000,1000);var b=ba();a.appendChild(b);var c=bb();a.appendChild(c);t=bc();a.appendChild(t);L(iVbWidth);return a};function bb(){var a=Y;var b=C-5;var c=iDrawingTools.createRectangle(5,0,b,a,null,null,0,0);c.style.cursor='pointer';c.onmousedown=bd;return c}function bc(){var a=iDrawingTools.createGroup(null,1000,1000);var b=null;var c=iDrawingTools.createRectangle(6,1,18,8,"white","#818181","1","0.5",null,null,null,"crispEdges");c.setAttribute("id","cursor");a.appendChild(c);return a}function ba(){var a=iDrawingTools.createGroup(null,1000,1000);var b=15;var c=0;for(c=0;c0){b=b-l}x(b);z(null,null,true)}function A(a,b){if(js){c=s}x(c);z(a,b)}}function B(a,b){if(j>r){if(isNaN(Number(a))||isNaN(Number(b))){a=null;b=null}var c=0;var d=j%l;var f=j;if(d===0){c=j-l}else{c=j-d}if(cZ){f=getXFromEvent(a,false);g=getYFromEvent(a,false);d=b;I=d;G=f;H=g}else{d=I;f=G;g=H;if((b>0&&d<0)||(b<0&&d>0)){i=false}}F=h;h=null;if(i){if(d>0){M(f,g)}else{bf(f,g)}}};this.newZoomIn=function(a,b){M(a,b)};function M(a,b){B(a,b)}function bf(a,b){A(a,b)}function z(a,b,c){var d=iMap.checkForVEMap();if(!d){var f=0;var g=0;var h=iWidth*Math.pow(2,N());var i=parseInt(h/(iWidth/iHeight),10);var k=null;var m=null;if(!a||!b){k=iVbX+iVbWidth/2;m=iVbY+iVbHeight/2;f=parseInt(k-h/2,10);g=parseInt(m-i/2,10)}else{var o=iVbWidth/iWidth;var n=iVbHeight/iHeight;var p=parseInt(a*o,10);var q=parseInt(b*n,10);k=iVbX+p;m=iVbY+q;var u=h/iVbWidth;var O=i/iVbHeight;f=parseInt(k-p*u,10);g=parseInt(m-q*u,10)}if(!c){P(f,g,h,i,a,b)}else{iXmlTools.removeChilds(iZoomEffectDiv);iXmlTools.removeChilds(iMapRoot);iBasic.setViewBox(f,g,h,i,true);iGlobalZoomListener.notifyListeners()}}else{bg(a,b,c)}}function bg(a,b,c){var d=Math.round((iWidth/256)*(iVENormalMap.VE_maxWdt()/Math.pow(2,Q())));var f=Math.round(d/(iWidth/iHeight));var g=0;var h=0;var i=null;var k=null;if(!a||!b){i=iVbX+iVbWidth/2;k=iVbY+iVbHeight/2;g=parseInt(i-d/2,10);h=parseInt(k-f/2,10)}else{var m=iVbWidth/iWidth;var o=iVbHeight/iHeight;var n=parseInt(a*m,10);var p=parseInt(b*o,10);i=iVbX+n;k=iVbY+p;var q=d/iVbWidth;var u=f/iVbHeight;g=parseInt(i-n*q,10);h=parseInt(k-p*q,10)}if(!c){P(g,h,d,f,a,b)}else{iXmlTools.removeChilds(iZoomEffectDiv);iXmlTools.removeChilds(iMapRoot);iBasic.setViewBox(g,h,d,f,true);iGlobalZoomListener.notifyListeners()}}function P(a,b,c,d,f,g){iPointData.clearTimeouts();iPointData.hideIcons();bh(a,b,c,d,f,g)}function bh(b,c,d,f,g,h){w=false;iXmlTools.removeChilds(iZoomEffectDiv);var i=0;var k=1.185854122494;if(d>iVbWidth){k=0.838525491562}if(!g||!h){g=Math.round(iWidth/2);h=Math.round(iHeight/2)}var m=Number(iMapRoot.style.left.split("px")[0]);var o=Number(iMapRoot.style.top.split("px")[0]);g-=m;h-=o;R(g,h,i,k);if(v){clearTimeout(v);v=null}v=setTimeout(function(){w=true;iZoomEffectDiv.style.left=iMapRoot.style.left;iZoomEffectDiv.style.top=iMapRoot.style.top;if(iMapRoot.hasChildNodes()){var a=iMapRoot.firstChild;while(a){iZoomEffectDiv.appendChild(a);a=iMapRoot.firstChild}}iBasic.setViewBox(b,c,d,f,true);iGlobalZoomListener.notifyListeners()},(K*(J))+200)}function R(a,b,c,d){try{var f=iMapRoot.getElementsByTagName("img");var g=f.length;if(g>0&&!w){var h=d;var i=Number(f.item(0).style.width.split("px")[0]);var k=Number(f.item(0).style.height.split("px")[0]);var m=Math.round(i*h);var o=Math.round(k*h);var n=0;for(n=0;n0){c=a-b;for(d=0;ds){c=s}else if(cc){y(c,0)}else{iPointData.setDoNotShowParam(false)}}else if(b>iVbWidth){if(ja&&j>r){setTimeout(function(){y(a,b)},50)}}else{iZoomBar.onZoomIn();if(j