/*! * Joao Kho Map JavaScript Library v0.1.5 * http://www.street-directory.com.au/jsmap/ * * Copyright 2010, Joao Kho * Dual licensed under the MIT or GPL Version 2 licenses. * http://js.street-directory.com.au * * Copyright Partly by * 1. dom-drag.js - 09.25.2001 - www.youngpup.net * Script featured on Dynamic Drive (http://www.dynamicdrive.com) 12.08.2005 * 2. PPK SimpleEvent * 3. Advanced DOM Scripting for camelize & uncamilize function * 4. Raphael Vector Library * 5. JSON library (http://www.JSON.org/json2.js) * 6. Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2010 * * Date: Mon Feb 08 09:45:00 2010 +0700 * Update: Wed May 26 08:25:04 2010 +0700 * Update: Mon Jun 28 15:21:38 2010 +0700 * Update: Tue Jan 25 14:27:32 2011 +0700 * Update: Wed Sep 25 08:21:32 2013 +0700 * Update: Tue Jun 27 13:45:00 2023 +0700 * - change version from v0.1.2 to v0.15 * - all url / request service using HTTPS * * Deploy method: Use YUICompressor to produce jmap-min.js * Use Dean Edward Packer Base62 to Pack to produce jmap-deploy.js */ (function(){var joaokho={};if(window.joaokho||(joaokho=window.joaokho={}),!joaokho.maps)var maps=joaokho.maps={};if(!joaokho.util)var util=joaokho.util={};if(!joaokho.geo)var geo=joaokho.geo={};util.$=function(){for(var t=new Array,e=0;e=1;)e.removeChild(e.firstChild)},getMousePos:function(t){var e=0,i=0;if(!t)t=window.event;return t.pageX||t.pageY?(e=t.pageX,i=t.pageY):(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,i=t.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:e,y:i}},captureMouseMove:function(t){var e=0,i=0;if(!t)t=window.event;return t.pageX||t.pageY?(e=t.pageX,i=t.pageY):(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft-document.body.clientLeft,i=t.clientY+document.body.scrollTop-document.body.clientTop),{x:e,y:i}},getPosition:function(t){for(var e=0,i=0;t.offsetParent;)e+=t.offsetLeft,i+=t.offsetTop,t=t.offsetParent;return{x:e+=t.offsetLeft,y:i+=t.offsetTop}}},dom=joaokho.dom,joaokho.geo={getCoordSysDistance:function(t){function e(t){return t*Math.PI/180}var i=t,o=t,n=e(o-i),r=e(55.02166356938001),s=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e(i))*Math.cos(e(o))*Math.sin(r/2)*Math.sin(r/2);return 6371*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}},geo=joaokho.geo,JSONP=function(){var me=this,_queue=[],_current=null,_nextRequest=function(){_current=null,_queue.length&&((_current=_queue.shift()).script.src=_current.url+"?"+_current.params,document.getElementsByTagName("head")[0].appendChild(_current.script))},ua=navigator.userAgent.toLowerCase(),check=function(t){return t.test(ua)},isOpera=check(/opera/),isIE=!isOpera&&check(/msie/),isIE7=isIE&&check(/msie 7/),isIE8=isIE&&check(/msie 8/);return me.urlEncode=function(t,e){var i,o=[],n=encodeURIComponent;for(i in t)each(t[i]||i,(function(t,e){o.push("&",n(i),"=",t!=i?n(t):"")}));return e||(o.shift(),e=""),e+o.join("")},me.each=function(t,e,i){if(!isEmpty(t,!0)){void 0!==t.length&&"string"!=typeof t||(t=[t]);for(var o=0,n=t.length;o=0;e--)t.removeOverlay(t.getTileContainer().items[e]);t.addOverlay(new maps.TileMap(J_STREETVIEW_MAP)),t.addOverlay(new maps.TileMap(J_AUSWAY_MAP))}}if(n.maptypes.psma){var d=new maps.Button3D(h,"Map",null,{MozUserSelect:"none",width:"60px",position:"absolute",right:70*(r-c)+"px",opacity:"0.9",filter:"alpha(opacity=90)"});c+=1,d.onclick=function(){for(var e=t.getTileContainer().items.length-1;e>=0;e--)t.removeOverlay(t.getTileContainer().items[e]);t.addOverlay(new maps.TileMap(J_PSMA_MAP))}}if(n.maptypes.ausway){var m=new maps.Button3D(h,"HybridAus",null,{MozUserSelect:"none",width:"60px",position:"absolute",right:70*(r-c)+"px",opacity:"0.9",filter:"alpha(opacity=90)"});c+=1,m.onclick=function(){for(var e=t.getTileContainer().items.length-1;e>=0;e--)t.removeOverlay(t.getTileContainer().items[e]);t.addOverlay(new maps.TileMap(J_AUSWAY_MAP))}}if(n.maptypes.satellite){var f=new maps.Button3D(h,"Satellite",null,{MozUserSelect:"none",width:"60px",right:70*(r-c)+"px",top:"0px",opacity:"0.9",filter:"alpha(opacity=90)"});c+=1,f.onclick=function(){t.clearOverlays(),t.addOverlay(new maps.TileMap(J_SATELLITE_MAP))}}this.div_=h},maps.MapTypeControl.prototype.remove=function(){for(var t=this.div_,e=t.childNodes,i=0;i=0;i--){e[i].onclick&&(e[i].onclick=null);var o=e[i].parentNode;o.removeChild(e[i].nextSibling),o.removeChild(e[i].nextSibling),o.removeChild(e[i])}},maps.MapLayerControl.prototype.remove=function(){for(var t=this.div_,e=t.childNodes,i=e.length-1;i>=0;i--){e[i].onmouseover&&(e[i].onmouseover=null),e[i].onmouseout&&(e[i].onmouseout=null);var o=e[i].childNodes,n=o.length;if(0!=n){for(var r=n-1;r>=0;r--)o[r].onclick&&(o[r].onclick=null),e[i].removeChild(o[r]);t.removeChild(e[i])}}t.parentNode.removeChild(t),this.div_=null,this.map_=null},JMapLayerControl=maps.MapLayerControl,maps.StreetViewControl=function(){this.map_=null,this.div_=null,this.position=new maps.ControlPosition(J_ANCHOR_TOPRIGHT,new maps.Size(5,5))};var F=function(){};F.prototype=maps.Control.prototype,maps.StreetViewControl.prototype=new F,maps.StreetViewControl.constructor=maps.StreetViewControl,maps.StreetViewControl.prototype.name="StreetViewControl",maps.StreetViewControl.prototype.initialize=function(t,e){this.map_=t;var i="{"+(e||this.position).anchorPosition()+',"width":"70px","height":"18px"}',o=JSON.parse(i),n=t.getContainer(),r=new maps.Container(n,"StreetViewControl",o),s=t.getDefaultUI().maptypes.streetview,a="#DCDCDC",l=util.hex2dec(a.substr(1,7)),p="#"+util.dec2hex(l+-64+-16384+-4194304),h=new maps.Button3D(r,"StreetView",null,{MozUserSelect:"none",width:"60px",position:"absolute",right:"0px",opacity:"0.9",filter:"alpha(opacity=90)"});s&&(h.style.backgroundColor=p,h.style.borderStyle="inset",h.style.padding="1px 3px 2px 5px"),h.onmouseover=null,h.onmouseout=null;var c=t.getTileContainer();h.onclick=function(){if(s=!s){h.style.backgroundColor=p,h.style.borderStyle="inset",h.style.padding="1px 3px 2px 5px",t.getDefaultUI().maptypes.streetview=!0;var e=[];for(var i in c.items)e[i]=c.items[i].maptype;for(i=c.items.length;i>=1;i--)t.removeOverlay(c.items[i-1]);t.addOverlay(new maps.TileMap(J_STREETVIEW_MAP));for(i=0;i=0;i--)c.items[i].maptype==J_STREETVIEW_MAP&&t.removeOverlay(c.items[i])}},this.div_=r},maps.StreetViewControl.prototype.remove=function(){for(var t=this.div_,e=t.childNodes,i=0;i=1;e--)t.removeOverlay(t.getTileContainer().items[e-1]);t.getDefaultUI().maptypes.streetview&&t.addOverlay(new maps.TileMap(J_STREETVIEW_MAP)),t.addOverlay(new maps.TileMap(J_AUSWAY_MAP)),o.anchor==J_ANCHOR_TOPLEFT||o.anchor==J_ANCHOR_BOTTOMLEFT?(N.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",N.style.backgroundPosition="0px -390px",U.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",U.style.backgroundPosition="0px -390px",O.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",O.style.backgroundPosition="0px -390px",J.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",J.style.backgroundPosition="0px -390px",R.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",R.style.backgroundPosition="0px -390px",E.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",E.style.backgroundPosition="0px -390px",P.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",P.style.backgroundPosition="0px -390px",A.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",A.style.backgroundPosition="0px -390px",L.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",L.style.backgroundPosition="0px -390px",S.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",S.style.backgroundPosition="0px -390px",k.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",k.style.backgroundPosition="0px -390px",T.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",T.style.backgroundPosition="0px -390px",M.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",M.style.backgroundPosition="0px -390px"):(N.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",N.style.backgroundPosition="49px -390px",U.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",U.style.backgroundPosition="49px -390px",O.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",O.style.backgroundPosition="49px -390px",J.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",J.style.backgroundPosition="49px -390px",R.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",R.style.backgroundPosition="49px -390px",E.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",E.style.backgroundPosition="49px -390px",P.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",P.style.backgroundPosition="49px -390px",A.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",A.style.backgroundPosition="49px -390px",L.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",L.style.backgroundPosition="49px -390px",S.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",S.style.backgroundPosition="49px -390px",k.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",k.style.backgroundPosition="49px -390px",T.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",T.style.backgroundPosition="49px -390px",M.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",M.style.backgroundPosition="49px -390px")}function B(){for(var e=t.getTileContainer().items.length;e>=1;e--)t.removeOverlay(t.getTileContainer().items[e-1]);t.getDefaultUI().maptypes.streetview&&t.addOverlay(new maps.TileMap(J_STREETVIEW_MAP)),t.addOverlay(new maps.TileMap(J_PSMA_MAP)),o.anchor==J_ANCHOR_TOPLEFT||o.anchor==J_ANCHOR_BOTTOMLEFT?(N.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",N.style.backgroundPosition="0px -379px",U.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",U.style.backgroundPosition="0px -379px",O.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",O.style.backgroundPosition="0px -379px",J.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",J.style.backgroundPosition="0px -379px",R.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",R.style.backgroundPosition="0px -379px",E.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",E.style.backgroundPosition="0px -379px",P.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",P.style.backgroundPosition="0px -379px",A.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",A.style.backgroundPosition="0px -379px",L.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",L.style.backgroundPosition="0px -379px",S.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",S.style.backgroundPosition="0px -379px",k.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",k.style.backgroundPosition="0px -379px",T.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",T.style.backgroundPosition="0px -379px",M.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",M.style.backgroundPosition="0px -379px"):(N.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",N.style.backgroundPosition="49px -379px",U.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",U.style.backgroundPosition="49px -379px",O.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",O.style.backgroundPosition="49px -379px",J.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",J.style.backgroundPosition="49px -379px",R.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",R.style.backgroundPosition="49px -379px",E.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",E.style.backgroundPosition="49px -379px",P.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",P.style.backgroundPosition="49px -379px",A.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",A.style.backgroundPosition="49px -379px",L.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",L.style.backgroundPosition="49px -379px",S.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",S.style.backgroundPosition="49px -379px",k.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",k.style.backgroundPosition="49px -379px",T.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",T.style.backgroundPosition="49px -379px",M.style.backgroundImage="url("+J_STATIC_IMG_URL+"largemapcontrol.png)",M.style.backgroundPosition="49px -379px")}1==z&&D.items[0].maptype==J_PSMA_MAP&&(G=!G,B()),2==z&&D.items[1].maptype==J_PSMA_MAP&&(G=!G,B()),N.onclick=function(){t.setZoom(3),b.style.top=f+_*(y-3)+"px",(G=!G)?W():B()},U.onclick=function(){t.setZoom(4),b.style.top=f+_*(y-4)+"px",(G=!G)?W():B()},O.onclick=function(){t.setZoom(5),b.style.top=f+_*(y-5)+"px",(G=!G)?W():B()},J.onclick=function(){t.setZoom(6),b.style.top=f+_*(y-6)+"px",(G=!G)?W():B()},R.onclick=function(){t.setZoom(7),b.style.top=f+_*(y-7)+"px",(G=!G)?W():B()},E.onclick=function(){t.setZoom(8),b.style.top=f+_*(y-8)+"px",(G=!G)?W():B()},P.onclick=function(){t.setZoom(9),b.style.top=f+_*(y-9)+"px",(G=!G)?W():B()},A.onclick=function(){t.setZoom(10),b.style.top=f+_*(y-10)+"px",(G=!G)?W():B()},L.onclick=function(){t.setZoom(11),b.style.top=f+_*(y-11)+"px",(G=!G)?W():B()},S.onclick=function(){t.setZoom(12),b.style.top=f+_*(y-12)+"px",(G=!G)?W():B()},k.onclick=function(){t.setZoom(13),b.style.top=f+_*(y-13)+"px",(G=!G)?W():B()},T.onclick=function(){t.setZoom(14),b.style.top=f+_*(y-14)+"px",(G=!G)?W():B()},M.onclick=function(){t.setZoom(15),b.style.top=f+_*(y-15)+"px",(G=!G)?W():B()},lmc_event=function(){var e=t.getMapRef();e.lvl_3_4?(N.style.display="block",U.style.display="block"):(N.style.display="none",U.style.display="none"),e.lvl_5?O.style.display="block":O.style.display="none",e.lvl_6?J.style.display="block":J.style.display="none",e.lvl_7?R.style.display="block":R.style.display="none",e.lvl_8?E.style.display="block":E.style.display="none",e.lvl_9?P.style.display="block":P.style.display="none",e.lvl_10?A.style.display="block":A.style.display="none",e.lvl_11?L.style.display="block":L.style.display="none",e.lvl_12_13?(S.style.display="block",k.style.display="block"):(S.style.display="none",k.style.display="none"),e.lvl_14?T.style.display="block":T.style.display="none",e.lvl_15?M.style.display="block":M.style.display="none"},t.EventEx.addListener(t,"zoomend",(function(t,e){e[0];var i=e[1];w=f+(y-i)*_,b.style.top=w+"px"})),t.EventEx.addListener(t.getMapRef(),"onMapRef",lmc_event),lmc_event(),this.div_=a},maps.LargeMapControl.prototype.remove=function(){for(var t=this.div_,e=t.childNodes,i=0;i25?(p.style.top="1px",c.style.fontSize="7px"):(c.style.top="1px",c.style.fontSize="8px");var u=dom.ct(n.grid);dom.ac(c,u);new maps.Image(l,"ScaleImage",{position:"absolute",bottom:"3px",left:"5px",border:"0px none"},{src:J_STATIC_IMG_URL+"dimholder.gif"});var d=new maps.Container(l,"MapScale",{position:"absolute",padding:"0px",margin:"0px",left:"9px",top:"4px",width:"63px",height:"13px",color:"black",font:"900 10px verdana",whiteSpace:"nowrap",textAlign:"center"});d.title="Map Scale";var m=dom.ct(r);dom.ac(d,m),t.EventEx.addListener(t,"zoomend",(function(e,i){t.getLevel(),r=t.getScaleLabel(),d.innerHTML=r})),t.EventEx.addListener(t.getMapRef(),"onMapRef",(function(){var e="";""!=(n=t.getMapRef()).grid&&(e=n.grid),""!=e?(p.title=n.tip,h.src=J_STATIC_IMG_URL+n.icon,n.grid.length<10?(c.style.top="20%",c.style.fontSize="14px"):n.grid.length>25?(p.style.top="1px",c.style.fontSize="7px"):(c.style.top="1px",c.style.fontSize="8px"),c.innerHTML=n.grid):(p.title="PSMA Map",h.src=J_STATIC_IMG_URL+"psma-limited.gif",c.innerHTML="")})),this.div_=l},maps.MapReferenceControl.prototype.remove=function(t,e){},JMapReferenceControl=maps.MapReferenceControl,maps.MagnifyingControl=function(){this.map_=null,this.div_=null,this.zoom_=0};var F=function(){};F.prototype=maps.Control.prototype,maps.MagnifyingControl.prototype=new F,maps.MagnifyingControl.constructor=maps.MagnifyingControl,maps.MagnifyingControl.prototype.name="CopyrightControl",maps.MagnifyingControl.prototype.initialize=function(t){this.map_=t;var e=t.getContainer(),i=new maps.Container(e,"magnifying",{position:"absolute",left:"300px",top:"300px",width:"130px",height:"100px",visibility:"hidden",border:"medium none",MozUserSelect:"none",zIndex:0});new maps.Container(i,"tl_corner",{position:"absolute",left:"0px",top:"0px",width:"6px",height:"4px",lineHeight:"1px",fontSize:"1px",borderWidth:"2px 0px 0px 2px",borderStyle:"solid none none solid",borderColor:"#FF0000 transparent transparent #FF0000"}),new maps.Container(i,"tr_corner",{position:"absolute",right:"0px",top:"0px",width:"6px",height:"4px",lineHeight:"1px",fontSize:"1px",borderWidth:"2px 2px 0px 0px",borderStyle:"solid solid none none",borderColor:"#FF0000 #FF0000 transparent transparent"}),new maps.Container(i,"bl_corner",{position:"absolute",left:"0px",bottom:"0px",width:"6px",height:"4px",lineHeight:"1px",fontSize:"1px",borderWidth:"0px 0px 2px 2px",borderStyle:"none none solid solid",borderColor:"transparent transparent #FF0000 #FF0000"}),new maps.Container(i,"br_corner",{position:"absolute",right:"0px",bottom:"0px",width:"6px",height:"4px",lineHeight:"1px",fontSize:"1px",borderWidth:"0px 2px 2px 0px",borderStyle:"none solid solid none",borderColor:"transparent #FF0000 #FF0000 transparent"});this.div_=i},maps.MagnifyingControl.prototype.animate=function(t,e){var i=this.div_,o=i.childNodes,n=o[0],r=o[1],s=o[2],a=o[3],l=null;function p(t,e){var i=t.style.borderWidth,o=t.style.borderStyle,n=t.style.borderColor;t.style.borderWidth=e.style.borderWidth,t.style.borderStyle=e.style.borderStyle,t.style.borderColor=e.style.borderColor,e.style.borderWidth=i,e.style.borderStyle=o,e.style.borderColor=n}i.style.visibility="visible",1==e&&(i.style.width="130px",i.style.height="100px",i.style.top=t.y-Math.round(50)+"px",i.style.left=t.x-Math.round(65)+"px",e!=this.zoom_&&(p(n,a),p(r,s),this.zoom_=e)),0==e&&(i.style.width="50px",i.style.height="20px",i.style.top=t.y-Math.round(10)+"px",i.style.left=t.x-Math.round(25)+"px",e!=this.zoom_&&(p(n,a),p(r,s),this.zoom_=e)),l=setInterval((function(){1==e&&(i.style.top=parseInt(i.style.top)+5+"px",i.style.left=parseInt(i.style.left)+5+"px",i.style.width=parseInt(i.style.width)-10+"px",i.style.height=parseInt(i.style.height)-10+"px",parseInt(i.style.width)<=50&&(clearInterval(l),i.style.visibility="hidden")),0==e&&(i.style.top=parseInt(i.style.top)-5+"px",i.style.left=parseInt(i.style.left)-5+"px",i.style.width=parseInt(i.style.width)+10+"px",i.style.height=parseInt(i.style.height)+10+"px",parseInt(i.style.width)>=130&&(clearInterval(l),i.style.visibility="hidden"))}),50)},maps.MagnifyingControl.prototype.remove=function(){},JMagnifyingControl=maps.MagnifyingControl;var J_TILE_SIZE_DEF=[0,200,200,200,200,200,200,200,200,200,200,200,200,200,200,300,400],J_MAP_WIDTH_DEF=[0,525,1050,2115,4230,8460,16925,33850,67700,135405,270810,541620,1083239,2166478,4334014,8668028,15720475],J_SCALE_LABEL_DEF=["0","614.4 KM","307.2 KM","153.6 KM","76.8 KM","38.4 KM","19.2 KM","9.6 KM","4.8 KM","2.4 KM","1.2 KM","600M","300M","150M","75M","37.5M","18.75M"],J_PRECALC_SCALE_DEF=[0,9.541696233,19.083392466,38.439404824,76.878809647,153.757619295,307.606111887,615.212223773,1230.424447547,2460.939768391,4921.879536783,9843.759073565,19687.499972471,39374.999944942,78769.228679626,157538.457359252,285714.280163225],J_MIN_ZOOM_DEF=1,J_MAX_ZOOM_DEF=16,J_COORD_SYS_DEF=new maps.LonLatBounds(new maps.LonLat(106.720409792149,-8.75833753905317),new maps.LonLat(161.742073361529,-44.7196259244811));function getTileImg(t,e,i,o){return J_ONLINE_STATE?J_MULTI_SUBDOMAIN_WSGI_URL=(e+i)%2==0?"https://m0.street-directory.com.au/wsgi/":"https://m1.street-directory.com.au/wsgi/":J_MULTI_SUBDOMAIN_WSGI_URL=J_WSGI_URL,i<=0||e<=0?J_WATER_IMG:t==J_TRANS_MAP?J_TRANS_IMG:t==J_PSMA_MAP?J_MULTI_SUBDOMAIN_WSGI_URL+"sdtile/gettile?l="+o+"&r="+i+"&c="+e+"&t=psma&s=Intimap":t==J_AUSWAY_MAP?J_MULTI_SUBDOMAIN_WSGI_URL+"sdtile/gettile?l="+o+"&r="+i+"&c="+e+"&t=ausway&s=Intimap":t==J_STREETVIEW_MAP?J_MULTI_SUBDOMAIN_WSGI_URL+"sdtile/gettile?l="+o+"&r="+i+"&c="+e+"&t=sv&s=Intimap":t==J_SATELLITE_MAP?J_MULTI_SUBDOMAIN_WSGI_URL+"sdtile/gettile?l="+o+"&r="+i+"&c="+e+"&t=sat&s=Intimap":void 0}function encodeNum(t,e){var i=null;e?0==e?i=J_MAGIC_STR[0]:1==e&&(i=J_MAGIC_STR[1]):i=J_MAGIC_STR[1];for(var o=t.toString(),n="",r=0;rh?p:h,u=Math.ceil(r.y/o),d=Math.ceil(r.x/o),m=Math.round(r.y%o),f=Math.round(r.x%o),g=0,y=1,x=0,_=0,v=new maps.Point(Math.round(i.w/2),Math.round(i.h/2));x=v.y-m,_=v.x-f,x-=a,_-=s;var w=t.getLayerContainer();dom.ac(w,e),e.imgs=[];var b=J_GENTILE_URL+l+"/c"+d+"r"+u+".png?"+1e6*Math.random(1e6),C=createTileImg(e,d,u,_,x,o,b);createOnErrorEvt(C,0,d,u,n);for(;gh?p:h,u=Math.ceil(r.y/o),d=Math.ceil(r.x/o),m=Math.round(r.y%o),f=Math.round(r.x%o),g=0,y=1,x=0,_=0,v=new maps.Point(Math.round(i.w/2),Math.round(i.h/2));for(var w in x=v.y-m,_=v.x-f,x-=a,_-=s,e.imgs)e.imgs[w].onerror=null,e.removeChild(e.imgs[w]);e.imgs=[];var b=J_GENTILE_URL+l+"/c"+d+"r"+u+".png?"+1e6*Math.random(1e6),C=createTileImg(e,d,u,_,x,o,b);createOnErrorEvt(C,0,d,u,n);for(;gthis.tileCols?this.tileRows:this.tileCols,p=Math.ceil(r.y/i),h=Math.ceil(r.x/i),c=Math.round(r.y%i),u=Math.round(r.x%i);0==c&&(p+=1),0==u&&(h+=1);var d=new maps.Point(Math.round(e.w/2),Math.round(e.h/2)),m=d.y-c,f=d.x-u;m-=a,f-=s;var g=dom.ce("div");g=new maps.Container(null,"",{position:"absolute",left:"0px",top:"0px",zIndex:0});switch(t.getTileContainer().insertBefore(g,t.getTileContainer().firstChild),this.maptype){case J_TRANS_MAP:g.id="TransTileDiv",t.getDefaultUI().maptypes.psma=!0,J_TRANS_IMG;break;case J_PSMA_MAP:g.id="PsmaTileDiv",t.getDefaultUI().maptypes.ausway=!0,J_WATER_IMG;break;case J_AUSWAY_MAP:g.id="AuswayTileHybrid",t.getDefaultUI().maptypes.ausway=!0,J_TRANS_IMG;break;case J_STREETVIEW_MAP:g.id="StreetviewTileMap",J_TRANS_IMG;break;case J_SATELLITE_MAP:g.id="SatelliteTileMap",t.getDefaultUI().maptypes.satellite=!0,J_TRANS_IMG}this.imgs_=g.imgs=[];createTileImg(g,h,p,f,m,i,getTileImg(this.maptype,h,p,o));this.tileRows%2==0?(this.minRow=p-Math.ceil(this.tileRows/2)+1,this.maxRow=p+Math.ceil(this.tileRows/2)):(this.minRow=p-Math.ceil(this.tileRows/2)+1,this.maxRow=p+Math.ceil(this.tileRows/2)-1),this.tileCols%2==0?(this.minCol=h-Math.ceil(this.tileCols/2)+1,this.maxCol=h+Math.ceil(this.tileCols/2)):(this.minCol=h-Math.ceil(this.tileCols/2)+1,this.maxCol=h+Math.ceil(this.tileCols/2)-1),this.lessCol=0,this.lessRow=0;for(var y=1;y<=l;y++){for(var x=1;x<=y;x++){var _=y%2==0?-1:1;f+=i*_,(h+=_)>=this.minCol&&h<=this.maxCol&&p>=this.minRow&&p<=this.maxRow&&createTileImg(g,h,p,f,m,i,getTileImg(this.maptype,h,p,o))}for(var v=1;v<=y;v++){var w=y%2==0?-1:1;m+=i*w,p+=w,h>=this.minCol&&h<=this.maxCol&&p>=this.minRow&&p<=this.maxRow&&createTileImg(g,h,p,f,m,i,getTileImg(this.maptype,h,p,o))}}this.div_=g},maps.TileMap.prototype.remove=function(){switch(window.stop,this.maptype){case J_PSMA_MAP:this.map_.getDefaultUI().maptypes.psma=!1;break;case J_AUSWAY_MAP:case J_STREETVIEW_MAP:this.map_.getDefaultUI().maptypes.ausway=!1;break;case J_SATELLITE_MAP:this.map_.getDefaultUI().maptypes.satellite=!1}var t=this.div_;for(var e in t.imgs)t.imgs[e].onerror=null,t.removeChild(t.imgs[e]),t.imgs[e]=null;t.imgs=null,t.parentNode.removeChild(t),this.map_.EventEx.fireEvent(null,this,"TileMapRemove"),this.div_=null,this.map_=null},maps.TileMap.prototype.copy=function(){},maps.TileMap.prototype.redraw=function(t){if(t){var e=new maps.Point(this.map_.getDragDistance().x,this.map_.getDragDistance().y),i=this.map_.getTileSize(),o=this.map_.getLevel(),n=this.div_.imgs;for(e.x=e.x+this.lessCol,e.y=e.y+this.lessRow;e.x>=i||e.x<=-i;){if("+"==(s=e.x>0?"+":"-")){for(var r=0;r=i||e.y<=-i;){var s;if("+"==(s=e.y>0?"+":"-")){for(r=0;r=0;e--)this.removeOverlay(this.getTileContainer().items[e]);this.addOverlay(new maps.TileMap(t))},this.addMapType=function(t){},this.removeMapType=function(t){},this.isLoaded=function(){},this.getCenter=function(){return T=N(k)},this.getBounds=function(){var t=this.fromContainerPixelToLonLat(new maps.Point(0,0)),e=this.fromContainerPixelToLonLat(new maps.Point(A.w,A.h));return new maps.LonLatBounds(t,e)},this.getBoundsZoomLevel=function(t){for(var e=t.tl,i=t.br,o=U(e),n=U(i),r=this.maxZoom;r>this.minZoom;r--){var s=G(o,M,r),a=G(n,M,r);if(a.x-s.x=1;i--)this.removeOverlay(l.items[i-1]);for(i=0;i=100&&t!=D&&(D=parseInt(t))};var z=null;this.setZoom=function(t){if("number"!=typeof t||t>16||t<1)return!1;var e=M;M=t,k=U(T);var i=[];for(var o in l.items)i[o]=l.items[o].maptype;for(o=l.items.length;o>=1;o--)this.removeOverlay(l.items[o-1]);for(o=0;o=1;e--)i.removeOverlay(l.items[e-1]);for(e=0;e=1;e--)i.removeOverlay(l.items[e-1]);for(e=0;eo.tl.lat||t.lon>o.br.lon||t.lat=0&&a>=0&&(clearInterval(r),n.enableDragging())}),100)},this.openInfoWindowHtml=function(t,e,i){this.infoWindow.setPoint(t),this.infoWindow.puts(e,!1),this.infoWindow.show(),Effects.fadeIn(this.infoWindow.div_,"1")},this.openInfoWindowTabs=function(t,e,i){this.infoWindow.setPoint(t),this.infoWindow.puts(e,!1),this.infoWindow.show(),Effects.fadeIn(this.infoWindow.div_,"1")},this.openInfoWindowTabsHtml=function(t,e,i){this.infoWindow.setPoint(t),this.infoWindow.puts(e,!1),this.infoWindow.show(),Effects.fadeIn(this.infoWindow.div_,"1")},this.showMapBlowup=function(t,e){var i=dom.ce("div");i.style.width="250px",i.style.height="250px",i.style.backgroundColor="#E5E3DF",new maps.Map(i).setCenter(t,12,J_PSMA_MAP),this.infoWindow.setPoint(t),this.infoWindow.puts(i,!1),this.infoWindow.show(),Effects.fadeIn(this.infoWindow.div_,"1")},this.updateInfoWindow=function(t,e){},this.updateCurrentTab=function(t,e){},this.closeInfoWindow=function(){},this.getInfoWindow=function(){},this.fromContainerPixelToLonLat=function(t){var e=new maps.Point(k.x,k.y),i=new maps.Point(e.x-A.w/2,e.y-A.h/2),o=new maps.Point(i.x+t.x,i.y+t.y);return N(o)},this.fromLonLatToContainerPixel=function(t){var e=U(t),i=new maps.Point(k.x,k.y),o=new maps.Point(i.x-A.w/2,i.y-A.h/2),n=e.x-o.x,r=e.y-o.y;return new maps.Point(n,r)},this.fromLonLatToDivPixel=function(t){var e=this.fromLonLatToContainerPixel(t),i=parseInt(l.style.left),o=parseInt(l.style.top);return new maps.Point(e.x-i,e.y-o)},this.fromDivPixelToLonLat=function(t){var e=this.getMapSize(),i=new maps.Point(k.x,k.y),o=t.x-Math.round(e.w/2),n=t.y-Math.round(e.h/2);return o=i.x+o,n=i.y+n,N(new maps.Point(o,n))},this.getDivBounds=function(){var t=this.getMapSize(),e=this.getTileSize(),i=(this.getLevel(),this.getTileBuffer()),o=this.getCenterPt(),n=Math.ceil(o.x/e),r=Math.ceil(o.y/e),s=Math.ceil(t.h/e)+i,a=Math.ceil(t.w/e)+i,l=s>a?s:a,p=n-Math.floor(l/2),h=r-Math.floor(l/2),c=n+Math.floor(l/2)-1,u=r+Math.floor(l/2)-1;return new maps.LonLatBounds(N(new maps.Point(p*e,h*e)),N(new maps.Point(c*e,u*e)))},o=new maps.Size(A.w,A.h),n=new maps.Point(0,0),new maps.Point(A.w,A.h),new maps.Point(n.x+Math.round(o.w/2),n.y+Math.round(o.h/2)),this.getTopLeftPos=function(){return new maps.Point(0,0)},this.getTopRightPos=function(){return new maps.Point(o.w,0)},this.getTopPos=function(){return new maps.Point(Math.round(o.w/2),0)},this.getLeftPos=function(){return new maps.Point(0,Math.round(o.h/2))},this.getRightPos=function(){return new maps.Point(o.w,Math.round(o.h/2))},this.getCenterPos=function(){return new maps.Point(Math.round(o.w/2),Math.round(o.h/2))},this.getBottomLeftPos=function(){return new maps.Point(0,o.h)},this.getBottomRightPos=function(){return new maps.Point(o.w,o.h)},this.getBottomPos=function(){new maps.Point(Math.round(o.w/2),o.h)},a=new maps.Container(r,"mapContainer",{overflow:"hidden",position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%"}),(l=new maps.Container(a,"tileContainer",{position:"absolute",left:"0px",top:"0px",zIndex:0})).items=[],(p=new maps.Container(l,"Layer",{position:"absolute",left:"0px",top:"0px",zIndex:100})).items=[],(f=new maps.Container(l,"OverlayVector",{position:"absolute",left:"0px",top:"0px",zIndex:101})).items=[],(d=new maps.Container(l,"OverlayPolyline",{position:"absolute",left:"0px",top:"0px",zIndex:101})).items=[],(m=new maps.Container(l,"OverlayPolygon",{position:"absolute",left:"0px",top:"0px",zIndex:102})).items=[],(h=new maps.Container(l,"Reserve - Marker Shadow",{position:"absolute",left:"0px",top:"0px",zIndex:103})).items=[],new maps.Container(l,"Reserve - Marker Cross",{position:"absolute",left:"0px",top:"0px",zIndex:104}).items=[],(c=new maps.Container(l,"OverlayMarker",{position:"absolute",left:"0px",top:"0px",zIndex:105,cursor:"default"})).items=[],new maps.Container(l,"Reserve - IW Shadow",{position:"absolute",left:"0px",top:"0px",zIndex:106}).items=[],new maps.Container(l,"Reserve - IW???",{position:"absolute",left:"0px",top:"0px",zIndex:107}).items=[],u=new maps.Container(l,"OverlayInfoWindow",{position:"absolute",left:"0px",top:"0px",zIndex:108,cursor:"default"});var W=new maps.Point(0,0),B=new maps.Point(0,0),j=new maps.Point(0,0);Drag.init(l),l.onDragStart=function(t,e,i){i.style.cursor="url("+J_CLOSEHAND_CUR+"), move",W.xy(t,e)},l.onDrag=function(t,e){},l.onDragEnd=function(t,e,o){if(o.style.cursor="url("+J_OPENHAND_CUR+"), default",B.xy(t,e),j.xy(B.x-W.x,B.y-W.y),0!=j.x||0!=j.y){for(var n in k.x-=j.x,k.y-=j.y,T=N(k),l.items)l.items[n].redraw(j);for(var n in p.items)p.items[n].obj.redraw();i.EventEx.fireEvent(null,this,"onDragEnd")}},this.infoWindow=new maps.InfoWindow,this.infoWindow.initialize(this),this.Event=new maps.Event,this.EventEx=new maps.EventEx,this.CustomEvent=new maps.CustomEvent,i.div_.oncontextmenu=function(){return!1};i.div_.ondblclick=function(t){if(s.zoom.doubleclick){for(var e=dom.getMousePos(t),o=parseInt(r.style.left)||parseInt(r.offsetLeft),n=parseInt(r.style.top)||parseInt(r.offsetTop),a=r.offsetParent;a;)o+=a.offsetLeft,n+=a.offsetTop,a=a.offsetParent;var l=e.x-o,p=e.y-n,h=i.fromContainerPixelToLonLat(new maps.Point(l,p));i.zoomIn(h,!0)}};var F=new joaokho.maps.MagnifyingControl;function H(t){var e=0;t||(t=window.event),t.wheelDelta?(e=t.wheelDelta/120,window.opera&&(e=-e)):t.detail&&(e=-t.detail/3);for(var o=dom.getMousePos(t),n=parseInt(r.style.left)||parseInt(r.offsetLeft),a=parseInt(r.style.top)||parseInt(r.offsetTop),l=r.offsetParent;l;)n+=l.offsetLeft,a+=l.offsetTop,l=l.offsetParent;var p=n+A.w,h=a+A.h;if(!(o.x>n&&o.xa&&o.ya&&(a=d[g].x),d[g].yp&&(p=d[g].y);i.style.left=s-c+"px",i.style.top=l-c+"px",this.paper_=Raphael(i,a-s+2*c,p-l+2*c),d[0].x=d[0].x-s+c,d[0].y=d[0].y-l+c,polygon="M"+d[0].toShortStr(" ")+" L";for(g=1;gi&&(i=p[m].x),p[m].yn&&(n=p[m].y);r.style.left=e-d+"px",r.style.top=o-d+"px",this.paper_=Raphael(r,i-e+2*d,n-o+2*d),p[0].x=p[0].x-e+d,p[0].y=p[0].y-o+d,polygon="M"+p[0].toShortStr(" ")+" L";for(m=1;ma&&(a=d[g].x),d[g].yp&&(p=d[g].y);i.style.left=s-c+"px",i.style.top=l-c+"px",this.paper_=Raphael(i,a-s+2*c,p-l+2*c),d[0].x=d[0].x-s+c,d[0].y=d[0].y-l+c,polyline="M"+d[0].toShortStr(" ")+" L";for(g=1;gi&&(i=h[f].x),h[f].yn&&(n=h[f].y);r.style.left=e-m+"px",r.style.top=o-m+"px",this.paper_=Raphael(r,i-e+2*m,n-o+2*m),h[0].x=h[0].x-e+m,h[0].y=h[0].y-o+m,polyline="M"+h[0].toShortStr(" ")+" L";for(f=1;f=0;r--)if(n[r].action==i&&n[r].binding==o)return r}return-1},this.addListener=function(t,e,i,o){if(this.events[t])if(this.events[t][e]){if(-1==this.getActionIdx(t,e,i,o)){var n=this.events[t][e];n[n.length]={action:i,binding:o}}}else this.events[t][e]=[],this.events[t][e][0]={action:i,binding:o};else this.events[t]=[],this.events[t][e]=[],this.events[t][e][0]={action:i,binding:o}},this.removeListener=function(t,e,i,o){if(this.events[t]&&this.events[t][e]){var n=this.getActionIdx(t,e,i,o);n>=0&&this.events[t][e].splice(n,1)}},this.fireEvent=function(t,e,i,o){if(t||(t=window.event),e&&this.events){var n=this.events[e];if(n){var r=n[i];if(r)for(var s in r){var a=r[s].action;r[s].binding&&this.bind(a,r[s].binding),a(t,o)}}}}},maps.ToolTip={initialize:function(){alert("tooltip")}},maps.InfoWindow=function(){this.point_=new maps.LonLat(0,0),this.map_=null,this.div_=null,this.width_=null,this.height_=null,this.tailImg_=J_TAIL_IMAGE,this.iwImg_=J_INFOWINDOW_IMAGE,this.content_=null,this.tlDiv_=null,this.tlImg_=null,this.trDiv_=null,this.trImg_=null,this.tcDiv_=null,this.tcImg_=null,this.mlDiv_=null,this.mlImg_=null,this.mrDiv_=null,this.mrImg_=null,this.blDiv_=null,this.blImg_=null,this.brDiv_=null,this.brImg_=null,this.bcDiv_=null,this.bcImg_=null,this.tailDiv_=null,this.iconClose_=null,this.iconMaximize_=null,this.iconRestore_=null,this.bmap_=null,this.initialize=function(t){this.map_=t;var e=this.map_.getInfoWindowContainer(),i=new maps.Container(e,"infowindow",{position:"absolute",visibility:"hidden",zIndex:6e3}),o=new maps.Container(i,"contents",{backgroundColor:"white",border:"0 none",overflow:"hidden",width:"1000px",display:"table-cell"});this.bmap_=maps.Container(o,"blowupmap",{position:"absolute",visibility:"hidden"}),o.innerHTML="Hello World";var n=o.offsetWidth||o.scrollWidth,r=o.offsetHeight||o.scrollHeight;parseInt(o.style.top),parseInt(o.style.left);this.tlDiv_=new maps.Container(i,"topleftDiv",{position:"absolute",overflow:"hidden",left:"-20px",top:"-20px",width:"20px",height:"20px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src='"+J_TRANS_IMG+"';width:20px;height:20px:overflow:hidden;top:0px;left:0px"}),this.tlImg_=new maps.Image(this.tlDiv_,"topleftImg",{position:"absolute",border:"0 none",margin:"0px",padding:"0px",width:"1000px",height:"1000px",left:"0px",top:"0px",MozUserSelect:"none"},{src:this.iwImg_}),this.trDiv_=new maps.Container(i,"toprightDiv",{position:"absolute",overflow:"hidden",left:n+"px",top:"-20px",width:"20px",height:"20px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src='"+J_TRANS_IMG+"';width:20px;height:20px:overflow:hidden;top:0px;left:0px"}),this.trImg_=new maps.Image(this.trDiv_,"toprightImg",{position:"absolute",border:"0 none",margin:"0px",padding:"0px",width:"1000px",height:"1000px",left:"-980px",top:"0px",MozUserSelect:"none"},{src:this.iwImg_}),this.tcDiv_=new maps.Container(i,"topcenterDiv",{position:"absolute",left:"0px",top:"-20px",width:n+"px",height:"20px",borderTop:"1px solid #ABABAB",backgroundColor:"white"}),this.mlDiv_=new maps.Container(i,"middleleftDiv",{position:"absolute",left:"-20px",top:"0px",width:"20px",height:r+"px",borderLeft:"1px solid #ABABAB",backgroundColor:"white"}),this.mrDiv_=new maps.Container(i,"middlerighttDiv",{position:"absolute",left:n+"px",top:"0px",width:"20px",height:r+"px",borderRight:"1px solid #ABABAB",backgroundColor:"white"}),this.blDiv_=new maps.Container(i,"bottomleftDiv",{position:"absolute",overflow:"hidden",left:"-20px",top:r+"px",width:"20px",height:"20px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src='"+J_TRANS_IMG+"';width:20px;height:20px:overflow:hidden;top:0px;left:0px"}),this.blImg_=new maps.Image(this.blDiv_,"bootomleftImg",{position:"absolute",border:"0 none",margin:"0px",padding:"0px",width:"1000px",height:"1000px",left:"0px",top:"-980px",MozUserSelect:"none"},{src:this.iwImg_}),this.brDiv_=new maps.Container(i,"bottomrightDiv",{position:"absolute",overflow:"hidden",left:n+"px",top:r+"px",width:"20px",height:"20px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src='"+J_TRANS_IMG+"';width:20px;height:20px:overflow:hidden;top:0px;left:0px"}),this.brImg_=new maps.Image(this.brDiv_,"bottomrightImg",{position:"absolute",border:"0 none",margin:"0px",padding:"0px",width:"1000px",height:"1000px",left:"-980px",top:"-980px",MozUserSelect:"none"},{src:this.iwImg_}),this.bcDiv_=new maps.Container(i,"bottomcenterDiv",{position:"absolute",left:"0px",top:r+"px",width:n+"px",height:"20px",borderBottom:"1px solid #ABABAB",backgroundColor:"white"}),this.tailDiv_=new maps.Container(i,"tailDiv",{position:"absolute",overflow:"hidden",left:n-56+"px",top:r+20-5+"px",width:"56px",height:"38px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src='"+J_TRANS_IMG+"';width:56px;height:38px:overflow:hidden;top:0px;left:0px"}),this.tailImg_=new maps.Image(this.tailDiv_,"tailImg",{position:"absolute",border:"0 none",margin:"0px",padding:"0px",width:"56px",height:"38px",left:"0px",top:"0px",MozUserSelect:"none"},{src:this.tailImg_}),this.iconClose_=new maps.Image(i,"close_icon",{border:"0px none",margin:"0px",padding:"0px",position:"absolute",width:"12px",height:"12px",right:"-10px",top:"-10px"},{src:J_STATIC_IMG_URL+"iw_close.gif"}),this.iconClose_.onclick=function(){i.style.visibility="hidden",t.EventEx.fireEvent(null,this,"iwclose")};var s=r+20+20+33,a=n+20+20,l=new maps.Point(a-25-20,s-20),p=this.map_.fromLonLatToContainerPixel(this.point_);p.xy(p.x+32,p.y-32);var h=parseInt(this.map_.getTileContainer().style.left),c=parseInt(this.map_.getTileContainer().style.top);i.style.left=p.x-l.x-h+"px",i.style.top=p.y-l.y-c+"px",this.width_=n,this.height_=r,this.content_=o,this.div_=i},this.remove=function(){window.stop,dom.empty(this.div_.parentNode)},this.hide=function(){this.div_.style.visibility="hidden"},this.show=function(){this.div_.style.visibility="visible"},this.isHidden=function(){return"hidden"==this.div_.style.visibility},this.reset=function(){dom.empty(this.content_)},this.getPoint=function(){return this.point_},this.setPoint=function(t){this.point_.ll(t.lon,t.lat)},this.setOptions=function(t){},this.adjust=function(){var t=this.width_=this.content_.offsetWidth||this.content_.scrollWidth,e=this.height_=this.content_.offsetHeight||this.content_.scrollHeight;this.trDiv_.style.left=t+"px",this.tcDiv_.style.width=t+"px",this.mlDiv_.style.height=e+"px",this.mrDiv_.style.height=e+"px",this.mrDiv_.style.left=t-1+"px",this.blDiv_.style.top=e+"px",this.brDiv_.style.left=t+"px",this.brDiv_.style.top=e+"px",this.bcDiv_.style.width=t+"px",this.bcDiv_.style.top=e-1+"px",this.tailDiv_.style.left=t-56+"px",this.tailDiv_.style.top=e+20-5+"px";var i=this.div_,o=e+20+20+33,n=t+20+20,r=new maps.Point(n-25-20,o-20),s=this.map_.fromLonLatToContainerPixel(this.getPoint());s.xy(s.x,s.y-32);var a=parseInt(this.map_.getTileContainer().style.left),l=parseInt(this.map_.getTileContainer().style.top);i.style.left=s.x-r.x-a+"px",i.style.top=s.y-r.y-l+"px",this.content_.style.width=this.content_.offsetWidth||this.content_.scrollWidth+"px",this.content_.style.height=this.content_.offsetHeight||this.content_.scrollHeight+"px"},this.puts=function(t,e){var i=this.content_,o=100,n=this;if(this.adjust(),this.hide(),i.style.width="auto",i.style.height="auto","string"==typeof t){e?i.innerHTML+=t:i.innerHTML=t;var r=setInterval((function(){o+=1e3,n.width_==(n.content_.offsetWidth||n.content_.scrollWidth)&&n.height_==(n.content_.offsetHeight||n.content_.scrollHeight)||n.adjust(),n.width_==(n.content_.offsetWidth||n.content_.scrollWidth)&&n.height_==(n.content_.offsetHeight||n.content_.scrollHeight)&&n.show(),o>=1e4&&(clearInterval(r),n.adjust())}),o)}else n.reset(),i.appendChild(t),this.adjust()},this.getContentContainer=function(){return this.content_}}})();var Drag={obj:null,init:function(t,e,i,o,n,r,s,a,l,p){t.onmousedown=Drag.start,t.hmode=!s,t.vmode=!a,t.root=e&&null!=e?e:t,t.hmode&&isNaN(parseInt(t.root.style.left))&&(t.root.style.left="0px"),t.vmode&&isNaN(parseInt(t.root.style.top))&&(t.root.style.top="0px"),!t.hmode&&isNaN(parseInt(t.root.style.right))&&(t.root.style.right="0px"),!t.vmode&&isNaN(parseInt(t.root.style.bottom))&&(t.root.style.bottom="0px"),t.minX=void 0!==i?i:null,t.minY=void 0!==n?n:null,t.maxX=void 0!==o?o:null,t.maxY=void 0!==r?r:null,t.xMapper=l||null,t.yMapper=p||null,t.root.onDragStart=new Function,t.root.onDragEnd=new Function,t.root.onDrag=new Function},start:function(t){var e=Drag.obj=this;t=Drag.fixE(t);var i=parseInt(e.vmode?e.root.style.top:e.root.style.bottom),o=parseInt(e.hmode?e.root.style.left:e.root.style.right);return e.root.onDragStart(o,i,e),e.lastMouseX=t.clientX,e.lastMouseY=t.clientY,e.hmode?(null!=e.minX&&(e.minMouseX=t.clientX-o+e.minX),null!=e.maxX&&(e.maxMouseX=e.minMouseX+e.maxX-e.minX)):(null!=e.minX&&(e.maxMouseX=-e.minX+t.clientX+o),null!=e.maxX&&(e.minMouseX=-e.maxX+t.clientX+o)),e.vmode?(null!=e.minY&&(e.minMouseY=t.clientY-i+e.minY),null!=e.maxY&&(e.maxMouseY=e.minMouseY+e.maxY-e.minY)):(null!=e.minY&&(e.maxMouseY=-e.minY+t.clientY+i),null!=e.maxY&&(e.minMouseY=-e.maxY+t.clientY+i)),document.onmousemove=Drag.drag,document.onmouseup=Drag.end,!1},drag:function(t){t=Drag.fixE(t);var e,i,o=Drag.obj,n=t.clientY,r=t.clientX,s=parseInt(o.vmode?o.root.style.top:o.root.style.bottom),a=parseInt(o.hmode?o.root.style.left:o.root.style.right);return null!=o.minX&&(r=o.hmode?Math.max(r,o.minMouseX):Math.min(r,o.maxMouseX)),null!=o.maxX&&(r=o.hmode?Math.min(r,o.maxMouseX):Math.max(r,o.minMouseX)),null!=o.minY&&(n=o.vmode?Math.max(n,o.minMouseY):Math.min(n,o.maxMouseY)),null!=o.maxY&&(n=o.vmode?Math.min(n,o.maxMouseY):Math.max(n,o.minMouseY)),e=a+(r-o.lastMouseX)*(o.hmode?1:-1),i=s+(n-o.lastMouseY)*(o.vmode?1:-1),o.xMapper?e=o.xMapper(s):o.yMapper&&(i=o.yMapper(a)),Drag.obj.root.style[o.hmode?"left":"right"]=e+"px",Drag.obj.root.style[o.vmode?"top":"bottom"]=i+"px",Drag.obj.lastMouseX=r,Drag.obj.lastMouseY=n,Drag.obj.root.onDrag(e,i),!1},end:function(){document.onmousemove=null,document.onmouseup=null;var t=Drag.obj;Drag.obj.root.onDragEnd(parseInt(Drag.obj.root.style[Drag.obj.hmode?"left":"right"]),parseInt(Drag.obj.root.style[Drag.obj.vmode?"top":"bottom"]),t),Drag.obj=null},fixE:function(t){return void 0===t&&(t=window.event),void 0===t.layerX&&(t.layerX=t.offsetX),void 0===t.layerY&&(t.layerY=t.offsetY),t}},Effects={fadeIn:function(t,e){t.fadeIn=Effects._fadeIn,t.maxOpac=e,t.curOpac=0,this.cancelCurrent(),t.fadeIn()},fadeOut:function(t,e){t.fadeOut=Effects._fadeOut,t.fadeOutDone=e,this.cancelCurrent(),t.fadeOut()},cancelCurrent:function(){clearTimeout(window.evtId)},_fadeIn:function(){+this.curOpac<+this.maxOpac?(this.curOpac=+this.curOpac+.05,Effects.setOpacity(this,this.curOpac),window.fadeInElem=this,window.evtId=setTimeout((function(){this.fadeInElem.fadeIn()}),30)):(Effects.setOpacity(this,this.maxOpac),window.fadeInElem=null)},_fadeOut:function(){+this.curOpac>0?(this.curOpac=Math.max(0,+this.curOpac-.2),Effects.setOpacity(this,this.curOpac),window.fadeOutElem=this,window.evtId=setTimeout((function(){this.fadeOutElem.fadeOut()}),30)):this.fadeOutDone&&(this.fadeOutDone(),window.fadeOutElem=null)},setOpacity:function(t,e){t.style.filter="alpha(opacity:"+100*+e+")",t.style.KHTMLOpacity=e,t.style.MozOpacity=e,t.style.opacity=e}};this.JSON||(this.JSON={}),function(){function f(t){return t<10?"0"+t:t}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,(function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function str(t,e){var i,o,n,r,s,a=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(r=l.length,i=0;i

"),o.close(),e=o.body}catch(t){e=s.createPopup().document.body}o=e.createTextRange();try{e.style.color=t;var n=o.queryCommandValue("ForeColor");return"#"+("000000"+(n=(255&n)<<16|65280&n|(16711680&n)>>>16)[k](16)).slice(-6)}catch(t){return"none"}}))}else{var o=r.createElement("i");o.title="Raphaël Colour Picker",o.style.display="none",r.body[p](o),H=K((function(t){return o.style.color=t,r.defaultView.getComputedStyle(o,d).getPropertyValue("color")}))}return H(e)}function Y(){return"hsb("+[this.h,this.s,this.b]+")"}function V(){return this.hex}t.svg=!(t.vml="VML"==t.type),l[o]=t[o],t._id=0,t._oid=0,t.fn={},t.is=function(t,e){return"object"==(e=v.call(e))&&t===Object(t)||"undefined"==e&&typeof t==e||"null"==e&&null==t||v.call(L.call(t).slice(8,-1))==e},t.setWindow=function(t){r=(s=t).document},t.hsb2rgb=K((function(e,i,o){var n;if(t.is(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(o=e.b,i=e.s,e=e.h),0==o)return{r:0,g:0,b:0,hex:"#000"};(e>1||i>1||o>1)&&(e/=255,i/=255,o/=255);var r=o*(1-i),s=o*(1-i*(e=6*e-(n=~~(6*e)))),a=o*(1-i*(1-e));return e=[o,s,r,r,a,o,o][n],i=[a,o,o,s,r,r,a][n],n=[r,r,a,o,o,s,r][n],o={r:e*=255,g:i*=255,b:n*=255,toString:V},e=(~~e)[k](16),i=(~~i)[k](16),n=(~~n)[k](16),e=e[j](E,"0"),i=i[j](E,"0"),n=n[j](E,"0"),o.hex="#"+e+i+n,o}),t),t.rgb2hsb=K((function(e,i,o){if(t.is(e,"object")&&"r"in e&&"g"in e&&"b"in e&&(o=e.b,i=e.g,e=e.r),t.is(e,M)){var n=t.getRGB(e);e=n.r,i=n.g,o=n.b}(e>1||i>1||o>1)&&(e/=255,i/=255,o/=255);var r=b(e,i,o),s=C(e,i,o);if(s==r)return{h:0,s:0,b:r};var a=r-s;return e=e==r?(i-o)/a:i==r?2+(o-e)/a:4+(e-i)/a,(e/=6)<0&&e++,e>1&&e--,{h:e,s:s=a/r,b:n=r,toString:Y}}),t);var X=/,?([achlmqrstvxz]),?/gi,q=/\s*,\s*/,Z={hs:1,rg:1};function K(t,e,i){return function r(){var s=Array[o].slice.call(arguments,0),a=s[x]("►"),l=r.cache=r.cache||{},p=r.count=r.count||[];return l[n](a)||(p[_]>=1e3&&delete l[p.shift()],p[P](a),l[a]=t[h](e,s)),i?i(l[a]):l[a]}}t._path2string=function(){return this.join(",")[j](X,"$1")},t.getRGB=K((function(e){return!e||(e+=d).indexOf("-")+1?{r:-1,g:-1,b:-1,hex:"none",error:1}:"none"==e?{r:-1,g:-1,b:-1,hex:"none"}:(!Z[n](e.substring(0,2))&&"#"!=e.charAt()&&(e=H(e)),(e=e.match(J))?(e[2]&&(r=G(e[2].substring(5),16),o=G(e[2].substring(3,5),16),i=G(e[2].substring(1,3),16)),e[3]&&(r=G((a=e[3].charAt(3))+a,16),o=G((a=e[3].charAt(2))+a,16),i=G((a=e[3].charAt(1))+a,16)),e[4]&&(e=e[4][f](q),i=N(e[0]),o=N(e[1]),r=N(e[2]),s=N(e[3])),e[5]&&(e=e[5][f](q),i=2.55*N(e[0]),o=2.55*N(e[1]),r=2.55*N(e[2]),s=N(e[3])),e[6]?(e=e[6][f](q),i=N(e[0]),o=N(e[1]),r=N(e[2]),t.hsb2rgb(i,o,r)):e[7]?(e=e[7][f](q),i=2.55*N(e[0]),o=2.55*N(e[1]),r=2.55*N(e[2]),t.hsb2rgb(i,o,r)):(e={r:i,g:o,b:r},i=(~~i)[k](16),o=(~~o)[k](16),r=(~~r)[k](16),i=i[j](E,"0"),o=o[j](E,"0"),r=r[j](E,"0"),e.hex="#"+i+o+r,isFinite(N(s))&&(e.o=s),e)):{r:-1,g:-1,b:-1,hex:"none",error:1});var i,o,r,s,a}),t),t.getColor=function(t){t=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75};var e=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),e.hex},t.getColor.reset=function(){delete this.start};var $=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/gi,Q=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/gi;t.parsePathString=K((function(e){if(!e)return null;var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},o=[];return t.is(e,T)&&t.is(e[0],T)&&(o=et(e)),o[_]||(e+d)[j]($,(function(t,e,n){var r=[];for(t=v.call(e),n[j](Q,(function(t,e){e&&r[P](+e)})),"m"==t&&r[_]>2&&(o[P]([e][c](r.splice(0,2))),t="l",e="m"==e?"l":"L");r[_]>=i[t]&&(o[P]([e][c](r.splice(0,i[t]))),i[t]););})),o[k]=t._path2string,o})),t.findDotsAtSegment=function(t,e,i,o,n,r,s,a,l){var p=1-l,h=A(p,3)*t+3*A(p,2)*l*i+3*p*l*l*n+A(l,3)*s;p=A(p,3)*e+3*A(p,2)*l*o+3*p*l*l*r+A(l,3)*a;var c=t+2*l*(i-t)+l*l*(n-2*i+t),u=e+2*l*(o-e)+l*l*(r-2*o+e),d=i+2*l*(n-i)+l*l*(s-2*n+i),m=o+2*l*(r-o)+l*l*(a-2*r+o);return t=(1-l)*t+l*i,e=(1-l)*e+l*o,n=(1-l)*n+l*s,r=(1-l)*r+l*a,a=90-180*w.atan((c-d)/(u-m))/w.PI,(c>d||u1&&(i*=b=w.sqrt(b),o*=b),b=i*i;var v=o*o;r=(b=(r==s?-1:1)*w.sqrt(w.abs((b*v-b*C*C-v*h*h)/(b*C*C+v*h*h))))*i*C/o+(t+a)/2;var b=b*-o*h/i+(e+l)/2,C=w.asin(((e-b)/o).toFixed(7));h=w.asin(((l-b)/o).toFixed(7)),(C=th&&(C-=2*u),!s&&h>C&&(h-=2*u)}if(u=h-C,w.abs(u)>d&&(g=h,u=a,v=l,h=C+d*(s&&h>C?1:-1),g=st(a=r+i*w.cos(h),l=b+o*w.sin(h),i,o,n,0,s,u,v,[h,g,r,b])),u=h-C,n=w.cos(C),r=w.sin(C),s=w.cos(h),h=w.sin(h),i=4/3*i*(u=w.tan(u/4)),u*=4/3*o,o=[t,e],t=[t+i*r,e-u*n],e=[a+i*h,l-u*s],a=[a,l],t[0]=2*o[0]-t[0],t[1]=2*o[1]-t[1],p)return[t,e,a][c](g);for(g=[t,e,a][c](g)[x]()[f](","),p=[],a=0,l=g[_];a1e12&&(u=.5),w.abs(l)>1e12&&(l=.5),u>0&&u<1&&(u=at(t,e,i,o,n,r,s,a,u),m[P](u.x),d[P](u.y)),l>0&&l<1&&(u=at(t,e,i,o,n,r,s,a,l),m[P](u.x),d[P](u.y)),l=r-2*o+e-(a-2*r+o),c=e-o,u=(-(p=2*(o-e)-2*(r-o))+w.sqrt(p*p-4*l*c))/2/l,l=(-p-w.sqrt(p*p-4*l*c))/2/l,w.abs(u)>1e12&&(u=.5),w.abs(l)>1e12&&(l=.5),u>0&&u<1&&(u=at(t,e,i,o,n,r,s,a,u),m[P](u.x),d[P](u.y)),l>0&&l<1&&(u=at(t,e,i,o,n,r,s,a,l),m[P](u.x),d[P](u.y)),{min:{x:C[h](0,m),y:C[h](0,d)},max:{x:b[h](0,m),y:b[h](0,d)}}})),pt=K((function(t,e){var i=ot(t),o=e&&ot(e);function n(t,e){if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][c](st[h](0,[e.x,e.y][c](t.slice(1))));break;case"S":t=["C",e.x+(e.x-(e.bx||e.x)),e=e.y+(e.y-(e.by||e.y))][c](t.slice(1));break;case"T":e.qx=e.x+(e.x-(e.qx||e.x)),e.qy=e.y+(e.y-(e.qy||e.y)),t=["C"][c](rt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][c](rt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][c](nt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][c](nt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][c](nt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][c](nt(e.x,e.y,e.X,e.Y))}return t}function r(t,e){if(t[e][_]>7){t[e].shift();for(var n=t[e];n[_];)t.splice(e++,0,["C"][c](n.splice(0,6)));t.splice(e,1),l=b(i[_],o&&o[_]||0)}}function s(t,e,n,r,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[s][1],n.y=t[s][2],l=b(i[_],o&&o[_]||0))}t={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};for(var a=0,l=b(i[_],o&&o[_]||0);a.5)-1,A(s-.5,2)+A(a-.5,2)>.25&&(a=w.sqrt(.25-A(s-.5,2))*t+.5)&&.5!=a&&(a=a.toFixed(5)-1e-5*t)),d})))[f](/\s*\-\s*/),"linear"==n){var h=i.shift();if(h=-N(h),isNaN(h))return null;h=[0,0,w.cos(h*w.PI/180),w.sin(h*w.PI/180)];var c=1/(b(w.abs(h[2]),w.abs(h[3]))||1);h[2]*=c,h[3]*=c,h[2]<0&&(h[0]=-h[2],h[2]=0),h[3]<0&&(h[1]=-h[3],h[3]=0)}if(!(i=ht(i)))return null;for((c=(c=e.getAttribute(S)).match(/^url\(#(.*)\)$/))&&o.defs.removeChild(r.getElementById(c[1])),(c=vt(n+"Gradient")).id="r"+(t._id++)[k](36),vt(c,"radial"==n?{fx:s,fy:a}:{x1:h[0],y1:h[1],x2:h[2],y2:h[3]}),o.defs[p](c),o=0,h=i[_];oe.height&&(e.height=n.y+n.height-e.y),n.x+n.width-e.x>e.width&&(e.width=n.x+n.width-e.x)}}return t&&this.hide(),e},Tt[o].attr=function(e,i){if(this.removed)return this;if(null==e){for(var o in e={},this.attrs)this.attrs[n](o)&&(e[o]=this.attrs[o]);return this._.rt.deg&&(e.rotation=this.rotate()),(1!=this._.sx||1!=this._.sy)&&(e.scale=this.scale()),e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e}if(null==i&&t.is(e,M))return"translation"==e?ne.call(this):"rotation"==e?this.rotate():"scale"==e?this.scale():e==S&&"none"==this.attrs.fill&&this.attrs.gradient?this.attrs.gradient:this.attrs[e];if(null==i&&t.is(e,T)){i={},o=0;for(var r=e.length;o1&&(i=1),h.opacity=i),o.fill&&(h.on=!0),null!=h.on&&"none"!=o.fill||(h.on=!1),h.on&&o.fill&&((i=o.fill.match(R))?(h.src=i[1],h.type="tile"):(h.color=t.getRGB(o.fill).hex,h.src=d,h.type="solid",t.getRGB(o.fill).error&&(c.type in{circle:1,ellipse:1}||"r"!=(o.fill+d).charAt())&&bt(c,o.fill)&&(l.fill="none",l.gradient=o.fill))),s&&a[p](h),s=!1,!(h=a.getElementsByTagName("stroke")&&a.getElementsByTagName("stroke")[0])&&(s=h=zt("stroke")),(o.stroke&&"none"!=o.stroke||o["stroke-width"]||null!=o["stroke-opacity"]||o["stroke-dasharray"]||o["stroke-miterlimit"]||o["stroke-linejoin"]||o["stroke-linecap"])&&(h.on=!0),("none"==o.stroke||null==h.on||0==o.stroke||0==o["stroke-width"])&&(h.on=!1),i=t.getRGB(o.stroke),h.on&&o.stroke&&(h.color=i.hex),i=((+l["stroke-opacity"]+1||2)-1)*((+l.opacity+1||2)-1)*((+i.o+1||2)-1),u=.75*(N(o["stroke-width"])||1),i<0&&(i=0),i>1&&(i=1),null==o["stroke-width"]&&(u=l["stroke-width"]),o["stroke-width"]&&(h.weight=u),u&&u<1&&(i*=u)&&(h.weight=1),h.opacity=i,o["stroke-linejoin"]&&(h.joinstyle=o["stroke-linejoin"]||"miter"),h.miterlimit=o["stroke-miterlimit"]||8,o["stroke-linecap"]&&(h.endcap="butt"==o["stroke-linecap"]?"flat":"square"==o["stroke-linecap"]?"square":"round"),o["stroke-dasharray"]&&(i={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},h.dashstyle=i[n](o["stroke-dasharray"])?i[o["stroke-dasharray"]]:d),s&&a[p](h)),"text"==c.type)switch(h=c.paper.span.style,l.font&&(h.font=l.font),l["font-family"]&&(h.fontFamily=l["font-family"]),l["font-size"]&&(h.fontSize=l["font-size"]),l["font-weight"]&&(h.fontWeight=l["font-weight"]),l["font-style"]&&(h.fontStyle=l["font-style"]),c.node.string&&(c.paper.span.innerHTML=(c.node.string+d)[j](/")),c.W=l.w=c.paper.span.offsetWidth,c.H=l.h=c.paper.span.offsetHeight,c.X=l.x,c.Y=l.y+O(c.H/2),l["text-anchor"]){case"start":c.node.style["v-text-align"]="left",c.bbx=O(c.W/2);break;case"end":c.node.style["v-text-align"]="right",c.bbx=-O(c.W/2);break;default:c.node.style["v-text-align"]="center"}},bt=function(t,e){t.attrs=t.attrs||{};var i="linear",o=".5 .5";if(t.attrs.gradient=e,e=(e=(e+d)[j](_t,(function(t,e,n){return i="radial",e&&n&&(e=N(e),n=N(n),A(e-.5,2)+A(n-.5,2)>.25&&(n=w.sqrt(.25-A(e-.5,2))*(2*(n>.5)-1)+.5),o=e+m+n),d})))[f](/\s*\-\s*/),"linear"==i){var n=e.shift();if(n=-N(n),isNaN(n))return null}var r=ht(e);if(!r)return null;if(!(e=(t=t.shape||t.node).getElementsByTagName(S)[0]||zt(S)).parentNode&&t.appendChild(e),r[_]){e.on=!0,e.method="none",e.color=r[0].color,e.color2=r[r[_]-1].color,t=[];for(var s=0,a=r[_];s')}}catch(pe){zt=function(t){return r.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}Rt=function(){var e=ct[h](0,arguments),i=e.container,o=e.height,n=e.width,s=e.x;if(e=e.y,!i)throw new Error("VML container not found.");var a=new l,c=a.canvas=r.createElement("div"),u=c.style;return s=s||0,e=e||0,(n=n||512)==+n&&(n+="px"),(o=o||342)==+o&&(o+="px"),a.width=1e3,a.height=1e3,a.coordsize=1e4+m+1e4,a.coordorigin="0 0",a.span=r.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",c[p](a.span),u.cssText=t.format("width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,o),1==i?(r.body[p](c),u.left=s+"px",u.top=e+"px",u.position="absolute"):i.firstChild?i.insertBefore(c,i.firstChild):i[p](c),ut.call(a,a,t.fn),a},l[o].clear=function(){this.canvas.innerHTML=d,this.span=r.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas[p](this.span),this.bottom=this.top=null},l[o].remove=function(){for(var t in this.canvas.parentNode.removeChild(this.canvas),this)this[t]=xt(t);return!0}}function jt(){this.returnValue=!1}function Ft(){return this.originalEvent.preventDefault()}function Ht(){this.cancelBubble=!0}function Yt(){return this.originalEvent.stopPropagation()}l[o].safari=!/^Apple|^Google/.test(s.navigator.vendor)||s.navigator.userAgent.indexOf("Version/4.0")+1&&"iP"!=s.navigator.platform.slice(0,2)?function(){}:function(){var t=this.rect(-99,-99,this.width+99,this.height+99);s.setTimeout((function(){t.remove()}))};var Vt=r.addEventListener?function(t,e,i,o){var r=u&&y[e]?y[e]:e;function s(r){if(u&&y[n](e))for(var s=0,a=r.targetTouches&&r.targetTouches.length;s1&&(t=Array[o].splice.call(arguments,0,arguments[_])),new se(t)},l[o].setSize=Et,l[o].top=l[o].bottom=null,l[o].raphael=t,Tt[o].resetScale=function(){if(this.removed)return this;this._.sx=1,this._.sy=1,this.attrs.scale="1 1"},Tt[o].scale=function(t,e,i,o){if(this.removed)return this;if(null==t&&null==e)return{x:this._.sx,y:this._.sy,toString:Xt};!+(e=e||t)&&(e=t);var n,r,s=this.attrs;if(0!=t){var a=this.getBBox(),l=a.x+a.width/2,p=a.y+a.height/2;n=t/this._.sx,r=e/this._.sy,i=+i||0==i?i:l,o=+o||0==o?o:p,a=~~(t/w.abs(t));var h=~~(e/w.abs(e)),u=this.node.style,f=i+(l-i)*n;switch(p=o+(p-o)*r,this.type){case"rect":case"image":var g=s.width*a*n,y=s.height*h*r;this.attr({height:y,r:s.r*C(a*n,h*r),width:g,x:f-g/2,y:p-y/2});break;case"circle":case"ellipse":this.attr({rx:s.rx*a*n,ry:s.ry*h*r,r:s.r*C(a*n,h*r),cx:f,cy:p});break;case"text":this.attr({x:f,y:p});break;case"path":for(var v=!0,b=0,I=(l=it(s.path))[_];b=p)return d;h=d}}));function Zt(e,i){return function(o,n,r){for(var s,a,l,p,h="",c={},u=0,d=0,m=(o=pt(o)).length;dn){if(i&&!c.start){if(h+=["C",(s=qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],n-u)).start.x,s.start.y,s.m.x,s.m.y,s.x,s.y],r)return h;c.start=h,h=["M",s.x,s.y+"C",s.n.x,s.n.y,s.end.x,s.end.y,l[5],l[6]][x](),u+=p,s=+l[5],a=+l[6];continue}if(!e&&!i)return{x:(s=qt(s,a,l[1],l[2],l[3],l[4],l[5],l[6],n-u)).x,y:s.y,alpha:s.alpha}}u+=p,s=+l[5],a=+l[6]}h+=l}return c.end=h,(s=e?u:i?c:t.findDotsAtSegment(s,a,l[1],l[2],l[3],l[4],l[5],l[6],1)).alpha&&(s={x:s.x,y:s.y,alpha:s.alpha}),s}}var Kt=K((function(t,e,i,o,n,r,s,a){for(var l={x:0,y:0},p=0,h=0;h<1.01;h+=.01){var c=at(t,e,i,o,n,r,s,a,h);h&&(p+=A(A(l.x-c.x,2)+A(l.y-c.y,2),.5)),l=c}return p})),$t=Zt(1),Qt=Zt(),te=Zt(0,1);Tt[o].getTotalLength=function(){if("path"==this.type)return this.node.getTotalLength?this.node.getTotalLength():$t(this.attrs.path)},Tt[o].getPointAtLength=function(t){if("path"==this.type)return Qt(this.attrs.path,t)},Tt[o].getSubpath=function(t,e){if("path"==this.type)return w.abs(this.getTotalLength()-e)<1e-6?te(this.attrs.path,t).end:(e=te(this.attrs.path,e,1),t?te(e,t).end:e)},t.easing_formulas={linear:function(t){return t},"<":function(t){return A(t,3)},">":function(t){return A(t-1,3)+1},"<>":function(t){return(t*=2)<1?A(t,3)/2:(A(t-=2,3)+2)/2},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){if(0==t||1==t)return t;return A(2,-10*t)*w.sin(2*(t-.075)*w.PI/.3)+1},bounce:function(t){var e=7.5625,i=2.75;return t<1/i?t*=e*t:t=t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375,t}};var ee={length:0};function ie(){var e=+new Date;for(var i in ee)if("length"!=i&&ee[n](i)){var o=ee[i];if(o.stop||o.el.removed)delete ee[i],ee[_]--;else{var r,a=e-o.start,l=o.ms,p=o.easing,h=o.from,c=o.diff,u=o.to,f=o.t,g=o.prev||0,y=o.el,v=o.callback,w={};if(a