JAVASCRIPT 38
Gmap.js Guest on 10th June 2020 02:27:23 AM
  1. // To use maps on your own site please visit: http://www.google.com/apis/maps/
  2. function GMapsNamespace() {
  3.  
  4. function Mb(a,b,c){this.type=a;this.version=b;this.os=c}
  5. ;var u=new Mb(0,0,null);var ga=navigator.userAgent.toLowerCase();if(ga.indexOf("opera")!=-1){u.type=4;if(ga.indexOf("opera/7")!=-1||ga.indexOf("opera 7")!=-1){u.version=7}else if(ga.indexOf("opera/8")!=-1||ga.indexOf("opera 8")!=-1){u.version=8}}else if(ga.indexOf("msie")!=-1&&document.all){u.type=1;if(ga.indexOf("msie 5")){u.version=5}}else if(ga.indexOf("safari")!=-1){u.type=3}else if(ga.indexOf("mozilla")!=-1){u.type=2}if(ga.indexOf("x11;")!=-1){u.os=1}else if(ga.indexOf("macintosh")!=-1){u.os=2};
  6.  
  7. var T=Number.MAX_VALUE;function sa(a,b,c){var d=window.setTimeout(function(){b.apply(a)}
  8. ,c);return d}
  9. function Fb(a,b,c){var d=window.setInterval(function(){b.apply(a)}
  10. ,c);return d}
  11. function ta(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
  12. function ud(a){return ta(a).replace(/\"/g,"&quot;")}
  13. function cd(a){a.length=0}
  14. function H(a,b){try{a.style.cursor=b}catch(c){if(b=="pointer"){H(a,"hand")}}}
  15. function E(a){if(u.type==1){window.event.cancelBubble=true;window.event.returnValue=false}else{a.cancelBubble=true;a.preventDefault();a.stopPropagation()}}
  16. function eb(a){if(u.type==1){window.event.cancelBubble=true}else{a.stopPropagation()}}
  17. if(!Array.prototype.push){Array.prototype.push=function(a){this[this.length]=a}
  18. }function yb(a){return document.getElementById(a)}
  19. function l(a){return Math.round(a)+"px"}
  20. function Sa(a){var b={"x":0,"y":0};while(a){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}return b}
  21. function Aa(a,b){if(typeof a.offsetX!="undefined"){var c=a.target||a.srcElement;var d=nd(c,b);return new q(a.offsetX+d.x,a.offsetY+d.y)}else if(typeof a.pageX!="undefined"){var e=Sa(b);return new q(a.pageX-e.x,a.pageY-e.y)}else{B.incompatible("dblclick");return new q()}}
  22. function nd(a,b){var c={"x":0,"y":0};while(a&&a!=b){c.x+=a.offsetLeft;c.y+=a.offsetTop;a=a.offsetParent}return c}
  23. function _nullFunction(){}
  24. function Ra(a){if(a&&a.parentNode){a.parentNode.removeChild(a)}}
  25. ;
  26.  
  27. function na(){}
  28. na.create=function(a,b,c,d,e,f,g,h,i,k){var n;i=i||document;if(!k){n=i.createElement("img");if(a){n.src=a}}else{n=k(a,g,i)}if(b&&c){n.style.width=l(b);n.style.height=l(c);n.width=b;n.height=c}if(e||(d||(e==0||d==0))){n.style.position="absolute";n.style.left=l(d);n.style.top=l(e)}if(f||f==0){n.style.zIndex=f}if(u.type==1){n.unselectable="on";n.onselectstart=db}else{n.style.MozUserSelect="none"}if(u.type==1){n.galleryImg="no"}n.style.border="0";n.style.padding="0";n.style.margin="0";n.oncontextmenu=db;if(h){Ba(n,h)}return n}
  29. ;function o(){}
  30. o.create=function(a,b,c,d,e,f,g,h,i){return na.create(a,b,c,d,e,f,g,h,i,o.createElement)}
  31. ;o.createElement=function(a,b,c){if(typeof arguments.callee.hasFilters=="undefined"){var d=document.createElement("div");arguments.callee.hasFilters=typeof d.style.filter!="undefined"}var e;if(arguments.callee.hasFilters){var f=c.PNG_cache;if(f&&f.childNodes.length>0){e=f.removeChild(f.lastChild)}else{e=c.createElement("div");e.style.fontSize=l(1);o.destroyBeforeUnload(e)}if(!e.loader){e.loader=c.createElement("img");e.loader.style.visibility="hidden";e.loader.onload=function(){if(!e.cleared){e.style.filter=o.alphaImageLoader(this.src,this.ieCrop);e.src=a}}
  32. }}else{e=c.createElement("img")}o.setImage(e,a,b);return e}
  33. ;o.alphaImageLoader=function(a,b){var c="DXImageTransform.Microsoft.AlphaImageLoader";var d=",sizingMethod="+(b?"crop":"scale");return"progid:"+c+'(src="'+a+'"'+d+")"}
  34. ;o.remove=function(a,b){if(a.nodeName=="DIV"){if(!b.PNG_cache){b.PNG_cache=b.createElement("div");b.PNG_cache.style.display="none";b.body.appendChild(b.PNG_cache)}b.PNG_cache.appendChild(a);o.clearImage(a)}else{a.parentNode.removeChild(a)}}
  35. ;o.setImage=function(a,b,c){if(a.tagName=="DIV"){a.cleared=false;a.loader.ieCrop=c||false;a.loader.src=b}else{a.src=b}}
  36. ;o.clearImage=function(a,b){if(a.tagName=="DIV"){a.cleared=true;a.style.filter=""}else{a.src=b}}
  37. ;o.destroyBeforeUnload=function(a){if(!o.cleanupQueue){o.cleanupQueue=[];j.addBuiltInListener(window,"unload",o.onUnload)}o.cleanupQueue.push(a)}
  38. ;o.onUnload=function(){for(var a=0;a<o.cleanupQueue.length;++a){o.destroyImage(o.cleanupQueue[a])}}
  39. ;o.destroyImage=function(a){if(a.loader){a.loader.onload=null;a.loader=null}}
  40. ;
  41.  
  42. function j(){}
  43. j.addListener=function(a,b,c){var d=j.getPropertyName(b);if(a[d]){a[d].push(c)}else{a[d]=[c]}return new bc(a,d,c)}
  44. ;j.removeListener=function(a){var b=a.instance[a.propertyName];for(var c=0;c<b.length;c++){if(b[c]==a.listenerFn){b.splice(c,1);return}}}
  45. ;j.clearListeners=function(a,b){var c=j.getPropertyName(b);a[c]=null}
  46. ;j.trigger=function(a,b){var c=j.getPropertyName(b);var d=a[c];if(d&&d.length>0){var e=[];for(var f=2;f<arguments.length;f++){e.push(arguments[f])}for(var f=0;f<d.length;f++){var g=d[f];if(g){try{g.apply(a,e)}catch(h){B.dump(h)}}}}}
  47. ;function bc(a,b,c){this.instance=a;this.propertyName=b;this.listenerFn=c}
  48. j.getPropertyName=function(a){return"_e__"+a}
  49. ;j.addBuiltInListener=function(a,b,c){if(u.type==3&&b=="dblclick"){a["on"+b]=c;return}if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent("on"+b,c)}else{a["on"+b]=c}}
  50. ;j.removeBuiltInListener=function(a,b,c){if(a.removeEventListener){a.removeEventListener(b,c,false)}else if(a.detachEvent){a.detachEvent("on"+b,c)}else{a["on"+b]=null}}
  51. ;j.bindDom=function(a,b,c,d){var e=j.createAdapter(c,d);return j.addBuiltInListener(a,b,e)}
  52. ;j.bindClick=function(a,b,c){j.bindDom(a,"click",b,c);if(u.type==1){j.bindDom(a,"dblclick",b,c)}}
  53. ;j.bind=function(a,b,c,d){return j.addListener(a,b,function(){d.apply(c,arguments)}
  54. )}
  55. ;j.callback=function(a,b){var c=function(){return b.apply(a,arguments)}
  56. ;return c}
  57. ;j.createAdapter=function(a,b){return function(c){if(!c){c=window.event}if(c&&!c.target){c.target=c.srcElement}b.call(a,c)}
  58. }
  59. ;
  60.  
  61. function qa(a){this.size=0;if(a){for(var b=a.length-1;b>=0;b--)this.add(a[b])}}
  62. qa.prototype.add=function(a){if(!this.contains(a)){this[":"+a]=1;this.size++}}
  63. ;qa.prototype.remove=function(a){if(this.contains(a)){delete this[":"+a];this.size--}}
  64. ;qa.prototype.contains=function(a){return this[":"+a]==1}
  65. ;function db(){return false}
  66. function wb(a){if(!a){if(Error){throw"assertion failed: "+Error().stack;}else{throw"assertion failed";}}}
  67. ;
  68.  
  69. function ea(a,b,c,d){this.src=a;this.container=d;this.disabled=false;this.dragPoint=new q(0,0);this.dragging=false;this.clickStartPos=new q(0,0);this.src.style.position="absolute";this.moveTo(b!=null?b:a.offsetLeft,c!=null?c:a.offsetTop);this.mouseDownHandler=j.createAdapter(this,this.onMouseDown);this.mouseMoveHandler=j.createAdapter(this,this.onMouseMove);this.mouseUpHandler=j.createAdapter(this,this.onMouseUp);if(u.type==2){j.bindDom(window,"mouseout",this,this.onWindowMouseOut)}this.eventSrc=this.src.setCapture?this.src:window;j.addBuiltInListener(this.src,"mousedown",this.mouseDownHandler);j.bindDom(this.src,"mouseup",this,this.onDisabledMouseUp);j.bindDom(this.src,"click",this,this.onDisabledClick)}
  70. ea.prototype.moveTo=function(a,b){if(this.left!=a||this.top!=b){this.left=a;this.top=b;this.src.style.left=this.left+"px";this.src.style.top=this.top+"px";j.trigger(this,"move")}}
  71. ;ea.prototype.onDisabledClick=function(a){if(this.disabled){j.trigger(this,"click",a)}}
  72. ;ea.prototype.onDisabledMouseUp=function(a){if(this.disabled){j.trigger(this,"mouseup",a)}}
  73. ;ea.prototype.onMouseDown=function(a){j.trigger(this,"mousedown",a);if(a.cancelDrag){return}var b=a.button==0||a.button==1;if(this.disabled||!b){E(a);return false}this.dragPoint.x=a.clientX;this.dragPoint.y=a.clientY;this.dragging=true;j.addBuiltInListener(this.eventSrc,"mousemove",this.mouseMoveHandler);j.addBuiltInListener(this.eventSrc,"mouseup",this.mouseUpHandler);if(this.src.setCapture){this.src.setCapture()}this.clickStartTime=(new Date()).getTime();this.clickStartPos.x=a.clientX;this.clickStartPos.y=a.clientY;j.trigger(this,"dragstart");this.originalCursor=this.src.style.cursor;H(this.src,"move");E(a)}
  74. ;ea.prototype.onMouseMove=function(a){if(u.os==1){if(a==null){return}if(this.dragDisabled){this.savedMove=new Object();this.savedMove.clientX=a.clientX;this.savedMove.clientY=a.clientY;return}sa(this,function(){this.dragDisabled=false;this.onMouseMove(this.savedMove)}
  75. ,30);this.dragDisabled=true;this.savedMove=null}var b=this.left+(a.clientX-this.dragPoint.x);var c=this.top+(a.clientY-this.dragPoint.y);var d=0;var e=0;if(this.container){var f=b;if(b<this.container.minX){f=this.container.minX}else{var g=this.container.maxX-this.src.offsetWidth;if(b>g){f=g}}d=f-b;b=f;var h=c;if(c<this.container.minY){h=this.container.minY}else{var i=this.container.maxY-this.src.offsetHeight;if(c>i)h=i}e=h-c;c=h}this.moveTo(b,c);this.dragPoint.x=a.clientX+d;this.dragPoint.y=a.clientY+e;j.trigger(this,"drag")}
  76. ;ea.prototype.onMouseUp=function(a){j.trigger(this,"mouseup",a);j.removeBuiltInListener(this.eventSrc,"mousemove",this.mouseMoveHandler);j.removeBuiltInListener(this.eventSrc,"mouseup",this.mouseUpHandler);this.dragging=false;H(this.src,this.originalCursor);if(document.releaseCapture){document.releaseCapture()}j.trigger(this,"dragend");var b=(new Date()).getTime();if(b-this.clickStartTime<=500&&(Math.abs(this.clickStartPos.x-a.clientX)<=2&&Math.abs(this.clickStartPos.y-a.clientY)<=2)){j.trigger(this,"click",a)}}
  77. ;ea.prototype.onWindowMouseOut=function(a){if(!a.relatedTarget&&this.dragging){this.onMouseUp(a)}}
  78. ;ea.prototype.disable=function(){this.disabled=true}
  79. ;ea.prototype.enable=function(){this.disabled=false}
  80. ;
  81.  
  82. var p="http://www.google.com/mapfiles/";var vb="http://maps.google.com";var ra=p+"transparent.gif";var Na=["q","ll","sll","spn","sspn","vp","z","t","output","deb","f","file","saddr","daddr","near","stat_m","key","cid","num","start"];function F(){this.args=new Object();this.reset()}
  83. F.prototype.setValue=function(a,b){this.args[a]=b}
  84. ;F.prototype.setQueryValue=function(a,b){var c=b.replace(/^\s*|\s*$/g,"");this.setValue(a,c)}
  85. ;F.prototype.setAllMapValues=function(a){this.setValue("ll",this.getLatLngArg(a.getCenterLatLng()));this.setValue("spn",this.getSpanArg(a.getSpanLatLng()));this.setValue("z",a.zoomLevel);this.setValue("t",a.spec.getURLArg())}
  86. ;F.prototype.getLatLngArg=function(a){return Qa(a.y)+","+Qa(a.x)}
  87. ;F.prototype.getSpanArg=function(a){return Qa(a.height)+","+Qa(a.width)}
  88. ;F.prototype.reset=function(){for(var a=0;a<Na.length;a++){this.args[Na[a]]=null}}
  89. ;F.prototype.getURL=function(a,b){var c=new Array();for(var d=0;d<Na.length;d++){var e=Na[d];if(this.args[e]){c.push(e+"="+this.beautify(encodeURIComponent(this.args[e])))}}if(window._sf&&window._sf.length>0){c.push(window._sf)}var f="/maps";if(c.length>0)f+="?"+c.join("&");if(a){var g;if(b){g="http://"+window.location.host}else{g=vb}f=g+f}return f}
  90. ;F.prototype.beautify=function(a){return a.replace(/%20/g,"+").replace(/%2C/gi,",")}
  91. ;F.getFileURL=function(a){var b=new F();b.setValue("file",a);return b.getURL()}
  92. ;F.getPrintImageUrl=function(a){var b=a.map.getCenterLatLng();var c=a.map;var d={"x":c.viewSize.width,"y":c.viewSize.height};var e={"x":c.centerBitmap.x-d.x/2,"y":c.centerBitmap.y-d.y/2};var f=c.zoomLevel;while(d.x*d.y>480000){var g=a.map.spec.zoomBitmapCoord(f+1,f,e);var h=a.map.spec.zoomBitmapCoord(f+1,f,d);f=f+1;e=g;d=h}var i="c="+Math.floor(b.x*1000000);i+=","+Math.floor(b.y*1000000);i+="&r="+d.x;i+=","+d.y;i+="&z="+f;if(a.vpage.overlays.length>0){var k=a.vpage.overlays[0].markers;for(var n=0;n<k.length;++n){var v=k[n];var s=v.point;var A=this.printIconId(v.id);i+=this.locationAsUrlParam(s.x,s.y,A)}}i+=this.directionsAsUrlParam(a,f,e);var Q;if(window.location.host.match(/:(.*)/)&&RegExp.$1!="80"){Q=window.location.host.replace(/:.*/,":9589")}else{Q=window.location.host.replace(/:.*/,"")}var O="http://"+Q+"/mapprint?"+i;B.write(O);return O}
  93. ;F.printIconId=function(a){var b={"A":17,"B":18,"C":19,"D":20,"E":21,"F":22,"G":23,"H":24,"I":25,"J":26};var c=b[a]||16;return c}
  94. ;F.locationAsUrlParam=function(a,b,c){var d="";d+="&l="+Math.floor(a*1000000);d+=","+Math.floor(b*1000000);d+=","+c;return d}
  95. ;F.directionsAsUrlParam=function(a,b,c){var d=a.vpage.directions;if(!d){return""}var e=d.polyline;var f=a.map;var g=f.getBoundsLatLng();var h;var i=e.getDrawingTolerance();do{var k=e.getVectors(g,i);var n=[];var v=new D();e.getBitmapVectors(k,n,v,b);h=e.getEncodedImageSource(n,c.x,c.y);++i}while(h.length>900);var s="&p="+h;var A=e.getPoint(0);var Q=(e.points.length>>1)-1;var O=e.getPoint(Q);s+=this.locationAsUrlParam(A.x,A.y,31);s+=this.locationAsUrlParam(O.x,O.y,32);return s}
  96. ;F.getTileBaseUrl=function(a,b,c){var d=a||(b||"");if(d.indexOf("?")==-1){d+="?"}else{d+="&"}if(c){d+="v="+encodeURIComponent(c)+"&"}return d}
  97. ;function Qa(a){if(a.toFixed){return a.toFixed(6).toString()}else{return a.toString()}}
  98. ;
  99.  
  100. var ka=new Object();function ia(a,b){this.id=a;this.ticketClass=b}
  101. ia.create=function(a){if(!a)a="_dtc";if(!ka[a])ka[a]=1;else ka[a]++;return new ia(ka[a],a)}
  102. ;ia.invalidateAll=function(){for(var a in ka){try{ka[a]++}catch(b){}}}
  103. ;ia.invalidate=function(a){ka[a]++}
  104. ;ia.prototype.isValid=function(){return ka[this.ticketClass]==this.id}
  105. ;
  106.  
  107. function Oa(){}
  108. Oa.create=function(){if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()}return null}
  109. ;function Da(){}
  110. Da.create=function(a,b){var c=Oa.create();if(c){return new rb(c)}else if(b){var d="mapsxmlhttpiframe"+(a||"");return new kb(d)}else{return null}}
  111. ;function rb(a){this.xmlhttp=a}
  112. rb.prototype.continueWith=function(a,b){B.writeURL(a);var c=this.xmlhttp;c.open("GET",a,true);c.onreadystatechange=function(){if(c.readyState==4){b(c.responseText);c.onreadystatechange=_nullFunction}}
  113. ;c.send(null)}
  114. ;var Ac="/maps?file=sf"+(window._sf?"&"+window._sf:"");function kb(a){this.frameid=a}
  115. kb.prototype.continueWith=function(a,b){B.writeURL(a);var c=window.document.getElementById(this.frameid);if(!c){B.write("IFRAME create "+this.frameid);c=xb(this.frameid)}else{B.write("IFRAME found "+this.frameid)}j.addBuiltInListener(c,"load",function(){B.write("IFRAME loaded "+d);var f=zb(c);B.write(f);b(f.jsfile)}
  116. );var d=a+"&wrap=js";B.write("IFRAME load "+d);if(u.type==4&&u.version==7){c.src=d}else{var e=zb(c);e.location.replace(d)}B.write("IFRAME loading "+d)}
  117. ;function P(a){this.stylesheet=a}
  118. P.cache_=new Object();P.create=function(a){return new P(a)}
  119. ;P.getCached=function(a){return P.cache_[a]}
  120. ;P.cache=function(a,b){P.cache_[a]=b}
  121. ;P.prototype.transformToHtml=function(a,b){if(typeof a.transformNode!="undefined"){b.innerHTML=a.transformNode(this.stylesheet)}else if(!ed&&(typeof XSLTProcessor!="undefined"&&typeof XSLTProcessor.prototype.importStylesheet!="undefined")){var c=new XSLTProcessor();c.importStylesheet(this.stylesheet);var d=c.transformToFragment(a,window.document);b.innerHTML="";b.appendChild(d)}else{var e="";b.innerHTML=e}sd(b,20)}
  122. ;P.asynchronousTransform=function(a,b,c,d,e){if(u.type==3&&P.scriptedTransform){var f=function(){try{P.scriptedTransform(a,b,c)}catch(n){B.dump(n)}if(d){d()}}
  123. ;if(!document.getElementById("nxsl")){var g=xb("nxsl");g.onload=f;g.src=Ac}else{window.setTimeout(f,1)}return}var h=P.getCached(c);if(h){window.setTimeout(function(){h.transformToHtml(a,b);if(d){d()}}
  124. ,1)}else{var i=ia.create(e);var k=Da.create(e,true);k.continueWith(c,function(n){if(i.isValid()){var v=n.replace(/\{\{[#\/!].*?\}\}/g,"").replace(/^[^<]*/,"");var s=cb(v);var A=P.create(s);A.transformToHtml(a,b);P.cache(c,A);if(d){d()}}}
  125. )}}
  126. ;function Hb(a){while(a.hasChildNodes()){a.removeChild(a.lastChild)}}
  127. function cb(a){try{if(typeof ActiveXObject!="undefined"&&typeof GetObject!="undefined"){var b=new ActiveXObject("Microsoft.XMLDOM");b.loadXML(a);return b}else if(typeof DOMParser!="undefined"){return(new DOMParser()).parseFromString(a,"text/xml")}else{return Jb(a)}}catch(c){B.write(c.toString());B.incompatible("xmlparse")}try{B.write("XML xmlParse catch");return Jb(a)}catch(c){B.write(c.toString());B.incompatible("xmlparse");return document.createElement("div")}}
  128. function Ab(a){var b="";if(a.nodeName=="#text"){b+=ta(a.nodeValue)}else{b+="<"+a.nodeName;if(a.hasAttributes()){for(var c=0;c<a.attributes.length;++c){b+=" "+a.attributes[c].nodeName+'="'+ud(a.attributes[c].nodeValue)+'"'}}if(a.childNodes.length==0){b+="/>"}else{b+=">";for(var c=0;c<a.childNodes.length;++c){b+=Ab(a.childNodes[c])}b+="</"+a.nodeName+">"}}return b}
  129. function fd(a){if(!a)return"";var b="";if(a.nodeName=="#text"){b+=ta(a.nodeValue)}else{for(var c=0;c<a.childNodes.length;++c){b+=Ab(a.childNodes[c])}}return b}
  130. function xb(a){var b=window.document.createElement("iframe");b.style.width=l(100);b.style.height=l(50);b.style.position="absolute";b.style.top=l(-110);b.style.left=l(-110);b.id=a;b.name=a;window.document.body.appendChild(b);return b}
  131. function zb(a){if(a.contentWindow){B.write("IFRAME window: contentWindow");return a.contentWindow}else{B.write("IFRAME window: "+a.id);return window[a.id]}}
  132. function L(a,b){if(a){return a.getElementsByTagName(b)[0]}else{return null}}
  133. function Z(a){if(!a){return""}var b="";if(a.nodeType==3||(a.nodeType==4||a.nodeType==2)){b+=a.nodeValue}else if(a.nodeType==1||(a.nodeType==9||a.nodeType==11)){for(var c=0;c<a.childNodes.length;++c){b+=arguments.callee(a.childNodes[c])}}return b}
  134. function Ba(a,b){var c=(a.className||"").split(/\s+/);var d=false;for(var e=0;e<c.length;++e){if(c[e]==b){d=true;break}}if(!d){c.push(b)}a.className=c.join(" ")}
  135. function Kb(a,b){var c=(a.className||"").split(/\s+/);var d=[];for(var e=0;e<c.length;++e){if(c[e]!=b){d.push(c[e])}}a.className=d.join(" ")}
  136. ;function fb(a){if(!a){return null}else if(a.nodeType==1){var b=vd(a);if(b){return fb(b)}else{var c=[];for(var d=0;d<a.childNodes.length;++d){var e=a.childNodes[d];var f=fb(e);if(f){c.push(f)}if(!c[e.nodeName]){c[e.nodeName]=f}else if(typeof c[e.nodeName]!="array"){var g=c[e.nodeName];c[e.nodeName]=[g,f]}else{c[e.nodeName].push(f)}}for(var d=0;d<a.attributes.length;++d){var h=a.attributes[d];c[h.nodeName]=h.nodeValue}return c}}else if(a.nodeType==3){return""+a.nodeValue}else{return null}}
  137. function vd(a){if(a.attributes&&a.attributes.length>0){return null}var b=null;for(var c=0;c<a.childNodes.length;++c){var d=a.childNodes[c];if(d.nodeType==1){return null}if(d.nodeType==3&&!d.nodeValue.match(/^\s*$/)){if(!b){b=d}else{return null}}}return b}
  138. function sd(a,b){var c=new RegExp("(\\S{"+b+"})","g");td(a,c)}
  139. function td(a,b){for(var c=a.firstChild;c;c=c.nextSibling){if(c.nodeType==1){arguments.callee.call(this,c,b)}else if(c.nodeType==3){var d=""+c.nodeValue;c.nodeValue=d.replace(b,"$1 ")}}}
  140. function za(){}
  141. za.value=Z;za.parse=cb;
  142.  
  143. function q(a,b){this.x=a;this.y=b}
  144. q.prototype.toString=function(){return"("+this.x+", "+this.y+")"}
  145. ;q.prototype.equals=function(a){if(!a)return false;return this.x==a.x&&this.y==a.y}
  146. ;q.prototype.distanceFrom=function(a){var b=this.x-a.x;var c=this.y-a.y;return Math.sqrt(b*b+c*c)}
  147. ;q.prototype.approxEquals=function(a){if(!a)return false;return Pa(this.x,a.x)&&Pa(this.y,a.y)}
  148. ;function J(a,b){this.width=a;this.height=b}
  149. J.prototype.toString=function(){return"("+this.width+", "+this.height+")"}
  150. ;J.prototype.equals=function(a){if(!a)return false;return this.width==a.width&&this.height==a.height}
  151. ;J.prototype.approxEquals=function(a){if(!a)return false;return Pa(this.width,a.width)&&Pa(this.height,a.height)}
  152. ;function Pa(a,b){return Math.round(a*1000000)==Math.round(b*1000000)}
  153. function D(a,b,c,d){this.minX=a;this.minY=b;this.maxX=c;this.maxY=d}
  154. D.prototype.toString=function(){return"Bounds("+this.minX+","+this.minY+","+this.maxX+","+this.maxY+")"}
  155. ;D.prototype.intersectsLatLng=function(a){var b=this.minX>this.maxX?this.minX-360:this.minX;var c=a.minX>a.maxX?a.minX-360:a.minX;if(c>this.maxX||(a.minY>this.maxY||(a.maxX<b||a.maxY<this.minY))){return false}return true}
  156. ;D.prototype.scaleLatLng=function(a,b,c){var d=b.getBitmapCoordinate(this.minX,this.minY,c);var e=b.getBitmapCoordinate(this.maxX,this.maxY,c);var f=(e.x-d.x)/2;var g=(e.y-d.y)/2;var h=b.getLatLng(d.x-(a-1)*f,d.y-(a-1)*g,c);var i=b.getLatLng(e.x+(a-1)*f,e.y+(a-1)*g,c);return new D(h.x,h.y,i.x,i.y)}
  157. ;D.prototype.containsSegment=function(a,b){if(this.minX>a.x&&this.minX>b.x)return false;if(this.maxX<a.x&&this.maxX<b.x)return false;if(this.minY>a.y&&this.minY>b.y)return false;if(this.maxY<a.y&&this.maxY<b.y)return false;return true}
  158. ;D.prototype.containsBounds=function(a){return this.minX<a.minX&&(this.maxX>a.maxX&&(this.minY<a.minY&&this.maxY>a.maxY))}
  159. ;D.prototype.extend=function(a){this.minX=Math.min(this.minX,a.x);this.maxX=Math.max(this.maxX,a.x);this.minY=Math.min(this.minY,a.y);this.maxY=Math.max(this.maxY,a.y)}
  160. ;D.intersection=function(a,b){return new D(Math.max(a.minX,b.minX),Math.max(a.minY,b.minY),Math.min(a.maxX,b.maxX),Math.min(a.maxY,b.maxY))}
  161. ;function va(a){this.ticks=a;this.tick=0}
  162. va.prototype.reset=function(){this.tick=0}
  163. ;va.prototype.next=function(){this.tick++;var a=Math.PI*(this.tick/this.ticks-0.5);return(Math.sin(a)+1)/2}
  164. ;va.prototype.more=function(){return this.tick<this.ticks}
  165. ;var tb=Math.PI/180;var Wc=2*Math.PI;function Ta(a){return a*tb}
  166. ;function Cb(a){var b=new q(0,0);b.x=Ta(a.x);b.y=Ta(a.y);return b}
  167. function gd(a,b){var c=Cb(a);var d=Cb(b);var e=hd(c,d);return 6378137*e}
  168. function hd(a,b){var c=a.y;var d=a.x;var e=b.y;var f=b.x;var g=c-e;var h=d-f;var i=2*Math.asin(Math.sqrt(Math.pow(Math.sin(g/2),2)+Math.cos(c)*Math.cos(e)*Math.pow(Math.sin(h/2),2)));return i}
  169. ;
  170.  
  171. function m(a,b,c,d,e){wb(a);this.container=a;this.ownerDocument=a.ownerDocument||document;if(!b||b.length==0){if(window.createMapSpecs){this.mapTypes=window.createMapSpecs()}else{this.mapTypes=[new S()]}}else{this.mapTypes=b}this.enableInfoWindow();this.zoomLevel=0;this.topLeftTile=null;this.currentPanOffset=new J(0,0);this.centerBitmap=new q(0,0);this.centerScreen=new q(0.5,0.5);this.lastCenterScreen=new q(0.5,0.5);this.tilePaddingOffset=new J(0,0);this.tableSize=new J(0,0);this.overlays=[];this.controls=[];this.panDistance=new J(0,0);this.panKeys=new qa();this.stateMonitor=null;this.mapBlowupZoom=1;this.mapBlowupSpec=null;this.container.style.overflow="hidden";if(this.container.style.position!="absolute"){this.container.style.position="relative"}if(!c||!d){c=this.container.offsetWidth;d=this.container.offsetHeight}this.viewSize=new J(c,d);j.bindDom(window,"blur",this,this.onWindowBlur);this.div=this.createPane(0);this.container.appendChild(this.div);this.mapPane=this.createPane(10);this.div.appendChild(this.mapPane);this.markerShadowPane=this.createPane(20);this.div.appendChild(this.markerShadowPane);this.mapMouseTargetPane=this.createPane(30);this.div.appendChild(this.mapMouseTargetPane);this.markerPane=this.createPane(40);this.div.appendChild(this.markerPane);this.floatShadowPane=this.createPane(50);this.div.appendChild(this.floatShadowPane);this.infoWindowShadowPane=this.createPane(50);this.div.appendChild(this.infoWindowShadowPane);this.markerMouseTargetPane=this.createPane(60);this.div.appendChild(this.markerMouseTargetPane);this.infoWindowPane=this.createPane(70);this.div.appendChild(this.infoWindowPane);this.floatPane=this.createPane(80);this.div.appendChild(this.floatPane);this.floatMouseTargetPane=this.createPane(90);this.div.appendChild(this.floatMouseTargetPane);this.dragObject=new ea(this.div,0,0);j.bind(this.dragObject,"drag",this,this.onDrag);j.bind(this.dragObject,"dragend",this,this.onDragEnd);j.bind(this.dragObject,"dragstart",this,this.onDragStart);j.bind(this.dragObject,"click",this,this.onClick);j.bind(this.dragObject,"mousedown",this,this.onMouseDown);j.bind(this.dragObject,"mouseup",this,this.onMouseUp);j.bindDom(this.div,"dblclick",this,this.onDoubleClick);this.setSpecification(this.mapTypes[0]);this.initializeMap();if(!e){this.addControl(new oa(true,false));this.addControl(new Fa())}j.bind(this,"moveend",this,this.checkLongitudeWrapping);j.bind(this,"moveend",this,this.resetCenterScreen);j.bind(this,"moveend",this,this.i)}
  172. m.prototype.enableDragging=function(){this.dragObject.enable()}
  173. ;m.prototype.disableDragging=function(){this.dragObject.disable()}
  174. ;m.prototype.draggingEnabled=function(){return!this.dragObject.disabled}
  175. ;m.prototype.enableInfoWindow=function(){this.iwEnabled=true}
  176. ;m.prototype.disableInfoWindow=function(){this.iwEnabled=false;if(this.infoWindow){this.closeInfoWindow();this.infoWindow=null}}
  177. ;m.prototype.infoWindowEnabled=function(){return this.iwEnabled}
  178. ;m.prototype.createInfoWindow=function(){if(!this.infoWindow){this.infoWindow=new C(this.infoWindowPane,this.infoWindowShadowPane);j.bind(this.infoWindow,"closeclick",this,this.onInfoCloseClick)}}
  179. ;m.prototype.getMapTypes=function(){return this.mapTypes}
  180. ;m.prototype.getCurrentMapType=function(){return this.spec}
  181. ;m.prototype.setMapType=function(a){this.switchSpecification(a)}
  182. ;m.prototype.isLoaded=function(){return this.topLeftTile!=null}
  183. ;m.prototype.createPane=function(a){var b=this.ownerDocument.createElement("div");b.style.position="absolute";b.style.top=l(0);b.style.left=l(0);b.style.zIndex=a;return b}
  184. ;m.prototype.loadTileImages=function(){this.loadTileImagesLayer(this.tileImages,false);if(this.spec.hasOverlay()){this.loadTileImagesLayer(this.overlayImages,true)}}
  185. ;m.prototype.loadTileImagesLayer=function(a,b){while(a.length>this.tableSize.width){var c=a.pop();for(var d=0;d<c.length;d++){o.remove(c[d],this.ownerDocument)}}for(var d=a.length;d<this.tableSize.width;d++){a.push([])}for(var d=0;d<a.length;d++){while(a[d].length>this.tableSize.height){var e=a[d].pop();o.remove(e,this.ownerDocument)}for(var f=a[d].length;f<this.tableSize.height;f++){if(b){e=o.create(null,this.spec.tileSize,this.spec.tileSize,null,null,1,null,null,this.ownerDocument)}else{e=na.create(null,this.spec.tileSize,this.spec.tileSize,null,null,0,null,null,this.ownerDocument)}e.style.position="absolute";a[d].push(e);this.div.appendChild(e);this.configureImage(e,d,f,b)}}}
  186. ;m.prototype.deleteTiles=function(){this.removeTilesFromDiv(this.tileImages);this.tileImages=null;if(this.overlayImages){this.removeTilesFromDiv(this.overlayImages);this.overlayImages=null}}
  187. ;m.prototype.removeTilesFromDiv=function(a){if(a){for(var b=0;b<a.length;b++){if(a[b]){for(var c=0;c<a[b].length;c++){o.remove(a[b][c],this.ownerDocument)}}}}}
  188. ;m.prototype.initializeMap=function(){this.deleteTiles();this.tileImages=[];this.overlayImages=[];this.calculateTileMeasurements();this.loadTileImages()}
  189. ;m.prototype.getSpanLatLng=function(a){if(!a)a=new J(0,0);var b=this.spec.getLatLng(this.centerBitmap.x-this.viewSize.width*this.centerScreen.x,this.centerBitmap.y-this.viewSize.height*this.centerScreen.y,this.zoomLevel);var c=this.spec.getLatLng(this.centerBitmap.x+this.viewSize.width*(1-this.centerScreen.x),this.centerBitmap.y+this.viewSize.height*(1-this.centerScreen.y),this.zoomLevel);a.width=Math.abs(c.x-b.x);a.height=Math.abs(c.y-b.y);return a}
  190. ;m.prototype.getZoomLevel=function(){return this.zoomLevel}
  191. ;m.prototype.getCenterBitmap=function(){return this.centerBitmap}
  192. ;m.prototype.getCenterLatLng=function(a){if(!a)a=new q(0,0);if(this.centerLatLng){a.x=this.centerLatLng.x;a.y=this.centerLatLng.y}else{var b=null;if(this.lastLatLng&&this.centerScreen.equals(this.lastCenterScreen)){b=this.spec.getBitmapCoordinate(this.lastLatLng.y,this.lastLatLng.x,this.zoomLevel)}if(b&&b.equals(this.centerBitmap)){a.x=this.lastLatLng.x;a.y=this.lastLatLng.y}else{var c=this.spec.getLatLng(this.centerBitmap.x,this.centerBitmap.y,this.zoomLevel);a.x=c.x-Math.floor((c.x+180)/360)*360;a.y=c.y}}return a}
  193. ;m.prototype.getBoundsBitmap=function(a){if(!a){a=new D(0,0,0,0)}var b=this.centerBitmap.x;var c=this.centerBitmap.y;var d=this.viewSize.width;var e=this.viewSize.height;var f=this.centerScreen.x;var g=this.centerScreen.y;a.minX=b-d*f;a.minY=c-e*g;a.maxX=b+d*(1-f);a.maxY=c+e*(1-g);return a}
  194. ;m.prototype.getBoundsLatLng=function(a){a=this.getBoundsBitmap(a);var b=this.spec.getLatLng(a.minX,a.minY,this.zoomLevel);var c=this.spec.getLatLng(a.maxX,a.maxY,this.zoomLevel);a.minX=b.x;a.minY=c.y;a.maxX=c.x;a.maxY=b.y;return a}
  195. ;m.prototype.getDivCoordinate=function(a,b,c){if(!c)c=new q(0,0);var d=a-this.topLeftTile.x*this.spec.tileSize-this.tilePaddingOffset.width+this.currentPanOffset.width*this.spec.tileSize;var e=b-this.topLeftTile.y*this.spec.tileSize-this.tilePaddingOffset.height+this.currentPanOffset.height*this.spec.tileSize;c.x=d;c.y=e;return c}
  196. ;m.prototype.containerCoordToLatLng=function(a){return this.spec.getLatLng(this.centerBitmap.x-this.viewSize.width*this.centerScreen.x+a.x,this.centerBitmap.y-this.viewSize.height*this.centerScreen.y+a.y,this.zoomLevel)}
  197. ;m.prototype.calculateTileMeasurements=function(){var a=Math.ceil(this.viewSize.width/this.spec.tileSize)+2;var b=Math.ceil(this.viewSize.height/this.spec.tileSize)+2;this.tableSize.width=a;this.tableSize.height=b;var c=Math.floor((this.tableSize.width*this.spec.tileSize-this.viewSize.width)/2);var d=Math.floor((this.tableSize.height*this.spec.tileSize-this.viewSize.height)/2);this.tilePaddingOffset.width=c;this.tilePaddingOffset.height=d}
  198. ;m.prototype.configureImage=function(a,b,c,d){var e=(this.currentPanOffset.width+b)*this.spec.tileSize;var f=(this.currentPanOffset.height+c)*this.spec.tileSize;var g=-this.tilePaddingOffset.width+e;var h=-this.tilePaddingOffset.height+f;if(a.tileLeft!=g||a.tileTop!=h){a.style.left=l(g);a.style.top=l(h);a.tileLeft=g;a.tileTop=h}if(!this.isLoaded()){if(!d){a.src=this.spec.emptyTileUrl}}else{var i=d?this.spec.getOverlayURL(this.topLeftTile.x+b,this.topLeftTile.y+c,this.zoomLevel):this.spec.getTileURL(this.topLeftTile.x+b,this.topLeftTile.y+c,this.zoomLevel);if(a.src!=i){if(d){o.clearImage(a,this.spec.emptyTileUrl);o.setImage(a,i)}else{a.src=this.spec.emptyTileUrl;a.src=i}}}}
  199. ;m.prototype.onDrag=function(){if(!this.isLoaded()){return}this.onMove();this.rotateTiles()}
  200. ;var Fc=new J(0,0);m.prototype.onMove=function(){this.centerLatLng=null;var a=this.getCurrentOffset(Fc);var b=this.topLeftTile.x*this.spec.tileSize+Math.floor(this.viewSize.width*this.centerScreen.x)+this.tilePaddingOffset.width-a.width;var c=this.topLeftTile.y*this.spec.tileSize+Math.floor(this.viewSize.height*this.centerScreen.y)+this.tilePaddingOffset.height-a.height;this.centerBitmap.x=b;this.centerBitmap.y=c;for(var d=0;d<this.overlays.length;d++){this.overlays[d].redraw(false)}j.trigger(this,"move")}
  201. ;var Gc=new J(0,0);m.prototype.rotateTiles=function(){var a=this.getCurrentOffset(Gc);if(Math.abs(this.dragObject.left)>10000000||Math.abs(this.dragObject.top)>10000000){this.cancelPan();this.centerAtBitmap(this.centerBitmap);return}while(a.width<-this.tilePaddingOffset.width/2){this.rotateRight(this.tileImages,false);if(this.spec.hasOverlay()){this.rotateRight(this.overlayImages,true)}this.getCurrentOffset(a)}while(a.width>this.tilePaddingOffset.width/2){this.rotateLeft(this.tileImages,false);if(this.spec.hasOverlay()){this.rotateLeft(this.overlayImages,true)}this.getCurrentOffset(a)}while(a.height<-this.tilePaddingOffset.height/2){this.rotateDown(this.tileImages,false);if(this.spec.hasOverlay()){this.rotateDown(this.overlayImages,true)}this.getCurrentOffset(a)}while(a.height>this.tilePaddingOffset.height/2){this.rotateUp(this.tileImages,false);if(this.spec.hasOverlay()){this.rotateUp(this.overlayImages,true)}this.getCurrentOffset(a)}}
  202. ;m.prototype.rotateLeft=function(a,b){if(!b){this.currentPanOffset.width--;this.topLeftTile.x--}var c=a.pop();if(c){a.unshift(c);for(var d=0;d<c.length;d++){this.configureImage(c[d],0,d,b)}}}
  203. ;m.prototype.rotateRight=function(a,b){if(!b){this.currentPanOffset.width++;this.topLeftTile.x++}var c=a.shift();a.push(c);var d=a.length-1;for(var e=0;e<c.length;e++){this.configureImage(c[e],d,e,b)}}
  204. ;m.prototype.rotateUp=function(a,b){if(!b){this.currentPanOffset.height--;this.topLeftTile.y--}for(var c=0;c<a.length;c++){var d=a[c].pop();a[c].unshift(d);this.configureImage(d,c,0,b)}}
  205. ;m.prototype.rotateDown=function(a,b){if(!b){this.currentPanOffset.height++;this.topLeftTile.y++}var c=a[0].length-1;for(var d=0;d<a.length;d++){var e=a[d].shift();a[d].push(e);this.configureImage(e,d,c,b)}}
  206. ;m.prototype.onDragEnd=function(){j.trigger(this,"moveend")}
  207. ;m.prototype.onDragStart=function(){this.cancelPan();j.trigger(this,"movestart")}
  208. ;m.prototype.onDoubleClick=function(a){if(!this.draggingEnabled()){return}var b=Aa(a,this.container);var c=Math.floor(this.viewSize.width/2)-b.x;var d=Math.floor(this.viewSize.height/2)-b.y;this.pan(c,d)}
  209. ;m.prototype.onClick=function(a){this.closeInfoWindow();var b=null;if(a){var c=Aa(a,this.container);b=this.containerCoordToLatLng(c)}j.trigger(this,"click",null,b)}
  210. ;m.prototype.onMouseDown=function(a){var b=null;if(a){var c=Aa(a,this.container);b=this.containerCoordToLatLng(c)}j.trigger(this,"mousedown",b)}
  211. ;m.prototype.onMouseUp=function(a){var b=null;if(a){var c=Aa(a,this.container);b=this.containerCoordToLatLng(c)}j.trigger(this,"mouseup",b)}
  212. ;m.prototype.sortImagesFromCenter=function(a){var b=[];for(var c=0;c<a.length;c++){for(var d=0;d<a[c].length;d++){var e=a[c][d];e.coordX=c;e.coordY=d;var f=Math.min(c,a.length-c-1);var g=Math.min(d,a[c].length-d-1);if(f==0||g==0){e.priority=0}else{e.priority=f+g}b.push(e)}}b.sort(function(h,i){return i.priority-h.priority}
  213. );return b}
  214. ;m.prototype.reconfigureImage=function(a,b){if(u.type==1||u.type==4&&u.version==7){this.div.removeChild(a);this.configureImage(a,a.coordX,a.coordY,b);this.div.appendChild(a)}else{this.configureImage(a,a.coordX,a.coordY,b)}}
  215. ;m.prototype.reconfigureAllImages=function(){if(this.tileImages.length==0){return}var a=this.sortImagesFromCenter(this.tileImages);if(this.spec.hasOverlay()){var b=this.sortImagesFromCenter(this.overlayImages)}else{var b=[]}var c=Math.max(a.length,b.length);for(var d=0;d<c;d++){if(d<a.length){this.reconfigureImage(a[d],false)}if(d<b.length){this.reconfigureImage(b[d],true)}}}
  216. ;m.prototype.pan=function(a,b){if(!this.isLoaded()){return}var c=Math.sqrt(a*a+b*b);var d=Math.max(10,Math.floor(c/20));this.panSiner=new va(d);this.panSiner.reset();this.panDistance.width=a;this.panDistance.height=b;this.panStart=new q(this.dragObject.left,this.dragObject.top);j.trigger(this,"movestart");this.doPan()}
  217. ;m.prototype.doPan=function(){var a=this.panSiner.next();this.dragObject.moveTo(this.panStart.x+this.panDistance.width*a,this.panStart.y+this.panDistance.height*a);this.onMove();if(this.panSiner.more()){this.panTimeout=sa(this,function(){this.doPan()}
  218. ,10);this.rotateTiles()}else{this.panTimeout=null;j.trigger(this,"moveend")}}
  219. ;m.prototype.cancelPan=function(){if(this.panTimeout){clearTimeout(this.panTimeout);j.trigger(this,"moveend")}}
  220. ;m.prototype.recenterOrPanToLatLng=function(a){if(!this.isLoaded()){return}this.centerLatLng=new q(a.x,a.y);this.lastLatLng=this.centerLatLng;this.lastCenterScreen=new q(this.centerScreen.x,this.centerScreen.y);var a=this.spec.getBitmapCoordinate(this.centerLatLng.y,this.centerLatLng.x,this.zoomLevel);this.recenterOrPanToBitmap(a)}
  221. ;m.prototype.recenterOrPanToBitmap=function(a){if(!this.isLoaded())return;var b=this.centerBitmap.x-a.x;var c=this.centerBitmap.y-a.y;if(b==0&&c==0){this.resetCenterScreen();return}if(Math.abs(b)<this.viewSize.width&&Math.abs(c)<this.viewSize.height){this.pan(b,c);return}this.centerAtBitmap(a)}
  222. ;m.prototype.centerAndZoom=function(a,b){var c=null;if(!this.isLoaded()||b!=this.zoomLevel){c=this.zoomLevel;this.zoomLevel=b}this.centerAtLatLng(a);if(c!=null){j.trigger(this,"zoom",c,this.zoomLevel)}}
  223. ;m.prototype.centerAtLatLng=function(a){this.centerLatLng=new q(a.x,a.y);this.lastLatLng=this.centerLatLng;this.lastCenterScreen=new q(this.centerScreen.x,this.centerScreen.y);var a=this.spec.getBitmapCoordinate(this.centerLatLng.y,this.centerLatLng.x,this.zoomLevel);this.centerAtBitmap(a)}
  224. ;m.prototype.centerAtBitmap=function(a){this.centerBitmap.x=a.x;this.centerBitmap.y=a.y;var b=new q(Math.round(this.viewSize.width*this.centerScreen.x),Math.round(this.viewSize.height*this.centerScreen.y));var c=this.centerBitmap.x-b.x-this.tilePaddingOffset.width;var d=this.centerBitmap.y-b.y-this.tilePaddingOffset.height;var e=Math.floor(c/this.spec.tileSize);var f=Math.floor(d/this.spec.tileSize);var g=e*this.spec.tileSize-c;var h=f*this.spec.tileSize-d;if(g<-this.tilePaddingOffset.width/2){e++;g+=this.spec.tileSize}else if(g>this.tilePaddingOffset.width/2){e--;g-=this.spec.tileSize}if(h<-this.tilePaddingOffset.height/2){f++;h+=this.spec.tileSize}else if(h>this.tilePaddingOffset.height/2){f--;h-=this.spec.tileSize}if(!this.isLoaded()){this.topLeftTile=new q(e,f);if(!this.stateMonitor){this.stateMonitor=new ya(this)}}else{this.topLeftTile.x=e;this.topLeftTile.y=f}this.currentPanOffset.width=0;this.currentPanOffset.height=0;var i=screen.updateInterval||0;screen.updateInterval=1000;this.dragObject.moveTo(g,h);this.reconfigureAllImages();this.redrawOverlays();screen.updateInterval=i;j.trigger(this,"move");j.trigger(this,"moveend")}
  225. ;m.prototype.onResize=function(a){if(this.viewSize.width!=this.container.offsetWidth||this.viewSize.height!=this.container.offsetHeight){this.viewSize.width=this.container.offsetWidth;this.viewSize.height=this.container.offsetHeight;this.calculateTileMeasurements();this.loadTileImages();this.centerAtBitmap(this.centerBitmap);j.trigger(this,"resize")}}
  226. ;m.prototype.getCurrentOffset=function(a){if(!a)a=new J(0,0);a.width=this.dragObject.left+this.currentPanOffset.width*this.spec.tileSize;a.height=this.dragObject.top+this.currentPanOffset.height*this.spec.tileSize;return a}
  227. ;m.prototype.switchSpecification=function(a,b,c){if(this.spec==a){return}var d=this.spec;var e=b||this.getCenterLatLng();var f;if(typeof c=="undefined"){var g=a.zoomLevelOffset||0;var h=d.zoomLevelOffset||0;f=this.zoomLevel+(h-g)}else{f=c}if(f<0){f=0}else if(f>=a.numZoomLevels){f=a.numZoomLevels-1}this.setSpecification(a);if(d.tileSize!=a.tileSize||d.hasOverlay()!=a.hasOverlay()){this.topLeftTile=null;this.initializeMap()}this.centerAndZoom(e,f);j.trigger(this,"maptypechanged",d,a)}
  228. ;m.prototype.setSpecification=function(a){this.spec=a;if(!a.emptyTilePreload){var b=document.createElement("IMG");b.style.position="absolute";b.style.visibility="hidden";b.style.top=l(-200);b.style.left=l(-200);document.body.appendChild(b);a.emptyTilePreload=b}this.spec.emptyTilePreload.src=this.spec.emptyTileUrl;this.container.style.backgroundColor=this.spec.backgroundColor;this.div.style.backgroundColor=this.spec.backgroundColor}
  229. ;m.prototype.zoomTo=function(a){if(!this.isLoaded()){return}if(a>=this.spec.numZoomLevels){a=this.spec.numZoomLevels-1}else if(a<0){a=0}var b=this.zoomLevel;if(a!=this.zoomLevel){if(!this.centerLatLng)this.centerLatLng=this.getCenterLatLng();this.zoomLevel=a;var c=this.spec.getBitmapCoordinate(this.centerLatLng.y,this.centerLatLng.x,this.zoomLevel);this.centerAtBitmap(c)}j.trigger(this,"zoom",b,this.zoomLevel)}
  230. ;m.prototype.checkLongitudeWrapping=function(){var a=this.spec.adjustBitmapX(this.centerBitmap.x,this.zoomLevel);if(a!=this.centerBitmap.x){this.centerBitmap.x=a;this.centerAtBitmap(this.centerBitmap)}}
  231. ;m.prototype.addOverlay=function(a){this.overlays.push(a);a.initialize(this);a.redraw(true);var b=Math.round(a.getLatitude()*-100000);a.setZIndex(b);var c=this;j.addListener(a,"click",function(){j.trigger(c,"click",a)}
  232. );j.trigger(this,"addoverlay",a)}
  233. ;m.prototype.removeOverlay=function(a){var b=[];for(var c=0;c<this.overlays.length;c++){if(this.overlays[c]==a){a.remove()}else{b.push(this.overlays[c])}}if(this.overlays.length!=b.length){this.overlays=b}j.trigger(this,"removeoverlay",a)}
  234. ;m.prototype.reOrderOverlays=function(){}
  235. ;m.prototype.openInfoWindow=function(a,b,c,d,e){if(!this.infoWindowEnabled())return;if(!this.infoWindow){this.createInfoWindow()}var f=this.spec.getBitmapCoordinate(a.y,a.x,this.zoomLevel);var g=this.getDivCoordinate(f.x,f.y);if(this.infoWindow.isVisible()){j.trigger(this,"infowindowclose");if(this.infoWindow.onCloseFn){this.infoWindow.onCloseFn()}}this.infoWindow.point=a;this.infoWindow.pixelOffset=c;this.infoWindow.onOpenFn=d;this.infoWindow.onCloseFn=e;this.infoWindow.offscreenArea.innerHTML="";this.infoWindow.offscreenArea.appendChild(b);this.showSizedInfoWindow(g.x,g.y,c)}
  236. ;m.prototype.openInfoWindowXslt=function(a,b,c,d,e,f){var g=document.createElement("div");var h=this;var i=function(){h.openInfoWindow(a,g,d,e,f)}
  237. ;P.asynchronousTransform(b,g,c,i,null)}
  238. ;m.prototype.openInfoWindowHtml=function(a,b,c,d,e){var f=document.createElement("div");f.innerHTML=b;this.openInfoWindow(a,f,c,d,e)}
  239. ;m.prototype.closeInfoWindow=function(){if(this.infoWindow&&this.infoWindow.isVisible()){this.infoWindow.hide();this.resetCenterScreen();j.trigger(this,"infowindowclose");if(this.infoWindow.onCloseFn){this.infoWindow.onCloseFn()}this.infoWindow.point=null;this.infoWindow.pixelOffset=null;this.infoWindow.onOpenFn=null;this.infoWindow.onCloseFn=null}}
  240. ;m.prototype.saveMapState=function(){this.lastPageCenter=this.getCenterLatLng();this.lastPageZoom=this.zoomLevel}
  241. ;m.prototype.clearOverlays=function(){this.closeInfoWindow();for(var a=0;a<this.overlays.length;a++){this.overlays[a].remove()}cd(this.overlays);this.saveMapState();this.mapBlowupZoom=1;this.mapBlowupSpec=null;j.trigger(this,"clearoverlays")}
  242. ;m.prototype.redrawOverlays=function(){for(var a=0;a<this.overlays.length;a++){this.overlays[a].redraw(true)}if(this.infoWindow){this.repositionInfoWindow();if(u.type!=1&&this.infoWindow.hasMask()){this.addOverlaysToInfoWindowMask()}}}
  243. ;m.prototype.repositionInfoWindow=function(){if(!this.infoWindow.isVisible()||!this.infoWindow.point){return}var a=this.infoWindow.point;var b=this.spec.getBitmapCoordinate(a.y,a.x,this.zoomLevel);var c=this.getDivCoordinate(b.x,b.y);this.infoWindow.positionAt(c.x,c.y,this.infoWindow.pixelOffset)}
  244. ;m.prototype.onInfoCloseClick=function(a){this.closeInfoWindow()}
  245. ;m.prototype.resetCenterScreen=function(){var a=0.5;var b=0.5;var c=null;if(this.infoWindow&&(this.infoWindow.isVisible()&&this.infoWindow.point)){var d=this.getScreenCoord(this.infoWindow.point);if(d.x>=0&&(d.x<=1&&(d.y>=0&&d.y<=1))){a=d.x;b=d.y;c=new q(this.infoWindow.point.x,this.infoWindow.point.y)}}if(a==this.centerScreen.x&&b==this.centerScreen.y){return}this.centerBitmap.x-=Math.round(this.viewSize.width*(this.centerScreen.x-a));this.centerBitmap.y-=Math.round(this.viewSize.height*(this.centerScreen.y-b));this.centerScreen.x=a;this.centerScreen.y=b;if(c){this.centerLatLng=c}else{this.centerLatLng=null;this.centerLatLng=this.getCenterLatLng()}}
  246. ;m.prototype.a=function(a){if(a.g&&a.g()<this.zoomLevel){return false}if(a.f&&!a.f().intersectsLatLng(this.getBoundsLatLng())){return false}return true}
  247. ;m.prototype.i=function(){if(!this.a(this.spec)){if(this.spec.d){this.setMapType(this.spec.d())}else{this.setMapType(this.mapTypes[0])}}}
  248. ;m.prototype.getScreenCoord=function(a){var b=this.spec.getBitmapCoordinate(a.y,a.x,this.zoomLevel);b=this.getDivCoordinate(b.x,b.y);b.x+=this.dragObject.left;b.y+=this.dragObject.top;return new q(b.x/this.viewSize.width,b.y/this.viewSize.height)}
  249. ;m.prototype.panToInfoWindow=function(){var a=this.spec.getBitmapCoordinate(this.infoWindow.point.y,this.infoWindow.point.x,this.zoomLevel);var b=this.getDivCoordinate(a.x,a.y);var c=new q(this.centerBitmap.x,this.centerBitmap.y);var d=this.infoWindow.left+(a.x-b.x);var e=this.infoWindow.top+(a.y-b.y);var f=Math.round(this.viewSize.width*this.centerScreen.x);var g=this.viewSize.width-f;var h=Math.round(this.viewSize.height*this.centerScreen.y);var i=this.viewSize.height-h;c.y=Math.min(c.y,e+h-25);c.y=Math.max(c.y,a.y-i+25);var k=25;var n=a.y-this.infoWindow.getTotalHeightAboveGround()-(c.y-h);if(n<55){k=k+50}else if(n<295){k=k+35}c.x=Math.min(c.x,d+f-k);c.x=Math.max(c.x,d+this.infoWindow.getTotalWidth()-g+25);this.centerLatLng=null;this.recenterOrPanToBitmap(c)}
  250. ;m.prototype.showSizedInfoWindow=function(a,b,c){var d=ia.create("infoWindowOffscreen");this.infoWindow.prepareOffscreen();sa(this,function(){if(d.isValid()){this.infoWindow.flipOffscreenAndSize();this.infoWindow.positionAt(a,b,c);if(u.type!=1&&this.infoWindow.hasMask()){this.addOverlaysToInfoWindowMask()}sa(this,function(){this.infoWindow.show();this.panToInfoWindow();if(this.infoWindow.onOpenFn){this.infoWindow.onOpenFn()}j.trigger(this,"infowindowopen")}
  251. ,1)}}
  252. ,1)}
  253. ;m.prototype.addOverlaysToInfoWindowMask=function(){if(!this.infoWindow.isVisible()){return}this.infoWindow.clearMaskMap();var a=new q(this.infoWindow.getOffsetLeft(),this.infoWindow.getOffsetTop());var b=new q(a.x+this.infoWindow.getTotalWidth(),a.y+this.infoWindow.getTotalHeight());for(var c=0;c<this.overlays.length;c++){var d=this.overlays[c];if(d.addToInfoWindowMask){if(d.getOffsetTop()>b.y){break}d.addToInfoWindowMask(a,b)}}}
  254. ;m.prototype.showMapBlowup=function(a,b,c,d,e,f){if(!this.infoWindowEnabled())return;var g=b?b:this.mapBlowupZoom;var h=c?c:this.mapBlowupSpec;var i=document.createElement("div");i.style.border="1px solid #979797";i.style.width=l(200);i.style.height=l(200);var k=this.copy(i,200,200,a,g,h,true);k.disableDragging();k.disableInfoWindow();k.addControl(new xa());var n=e;if(u.type==1){n=function(){try{k.redrawOverlays()}catch(v){B.dump(v)}if(e)e()}
  255. }if(k.mapTypes.length>1){k.addControl(new Y(true))}this.openInfoWindow(a,i,d,n,f);j.bind(k,"moveend",this,function(){this.mapBlowupZoom=k.zoomLevel;this.mapBlowupSpec=k.spec}
  256. );return k}
  257. ;m.prototype.copy=function(a,b,c,d,e,f,g){var h=new m(a,this.mapTypes,b,c,g);var i=d?d:this.getCenterLatLng();var k=f?f:this.spec;var n=e||e==0?e:this.zoomLevel;if(k==h.spec){h.centerAndZoom(i,n)}else{h.switchSpecification(k,i,n)}for(var v=0;v<this.overlays.length;v++){h.addOverlay(this.overlays[v].copy())}return h}
  258. ;m.prototype.registerKeyHandlers=function(a){if(u.type==2&&u.os==2){j.bindDom(a,"keydown",this,this.cancelKey);j.bindDom(a,"keypress",this,this.handleKey)}else{j.bindDom(a,"keydown",this,this.handleKey);j.bindDom(a,"keypress",this,this.cancelKey)}j.bindDom(a,"keyup",this,this.releaseKey)}
  259. ;m.prototype.handleKey=function(a){if(this.ignoreKeyEvent(a)){return true}switch(a.keyCode){case 38:case 40:case 37:case 39:this.panKeys.add(a.keyCode);this.startContinuousPan();E(a);return false;case 34:this.pan(0,-Math.floor(this.viewSize.height*0.75));E(a);return false;case 33:this.pan(0,Math.floor(this.viewSize.height*0.75));E(a);return false;case 36:this.pan(Math.floor(this.viewSize.width*0.75),0);E(a);return false;case 35:this.pan(-Math.floor(this.viewSize.width*0.75),0);E(a);return false;case 187:case 107:this.zoomTo(this.zoomLevel-1);E(a);return false;case 189:case 109:this.zoomTo(this.zoomLevel+1);E(a);return false}switch(a.which){case 61:case 43:this.zoomTo(this.zoomLevel-1);E(a);return false;case 45:case 95:this.zoomTo(this.zoomLevel+1);E(a);return false}return true}
  260. ;m.prototype.cancelKey=function(a){if(this.ignoreKeyEvent(a)){return true}switch(a.keyCode){case 38:case 40:case 37:case 39:case 34:case 33:case 36:case 35:case 187:case 107:case 189:case 109:E(a);return false}switch(a.which){case 61:case 43:case 45:case 95:E(a);return false}return true}
  261. ;m.prototype.releaseKey=function(a){switch(a.keyCode){case 38:case 40:case 37:case 39:this.panKeys.remove(a.keyCode);return false}return true}
  262. ;m.prototype.ignoreKeyEvent=function(a){if(a.ctrlKey||(a.altKey||a.metaKey)){return true}if(a.target&&(a.target.nodeName=="INPUT"&&a.target.getAttribute("type").toLowerCase()=="text"||a.target.nodeName=="TEXTAREA")){return true}return false}
  263. ;m.prototype.startContinuousPan=function(){if(!this.isLoaded()){return}this.cancelPan();j.trigger(this,"movestart");if(!this.continuousPanTimeout){this.panSiner=new va(100);this.continuousPanTimeout=sa(this,function(){this.doContinuousPan()}
  264. ,5)}}
  265. ;m.prototype.doContinuousPan=function(){if(this.panKeys.size>0){var a=(this.panKeys.contains(37)?1:0)+(this.panKeys.contains(39)?-1:0);var b=(this.panKeys.contains(38)?1:0)+(this.panKeys.contains(40)?-1:0);var c=1;if(this.panSiner.more()){c=this.panSiner.next()}var d=a>0?Math.floor:Math.ceil;var e=d(7*c*a+5*a);d=b>0?Math.floor:Math.ceil;var f=d(7*c*b+5*b);this.dragObject.moveTo(this.dragObject.left+e,this.dragObject.top+f);this.onMove();this.rotateTiles();this.continuousPanTimeout=sa(this,function(){this.doContinuousPan()}
  266. ,10)}else{this.continuousPanTimeout=null;j.trigger(this,"moveend")}}
  267. ;m.prototype.onWindowBlur=function(a){if(this.panKeys.size>0){this.panKeys=new qa()}}
  268. ;function ac(a,b){this.control=a;this.element=b}
  269. m.prototype.addControl=function(a,b,c){var d=a.initialize(this);var e=b||a.getDefaultPosition();if(!c){Ba(d,"noprint")}j.addBuiltInListener(d,"click",E);j.addBuiltInListener(d,"dblclick",E);j.addBuiltInListener(d,"contextmenu",E);e.apply(d);this.container.appendChild(d);this.controls.push(new ac(a,d))}
  270. ;m.prototype.removeControl=function(a){for(var b=0;b<this.controls.length;b++){var c=this.controls[b];if(c.control==a){this.container.removeChild(c.element);this.controls.splice(b,1);return}}}
  271. ;m.prototype.applyControlStyles=function(a){a.style.position="absolute";H(a,"default");a.unselectable="on";a.onselectstart=db;a.style.fontSize=l(11);a.style.fontFamily="Arial, sans serif";a.style.MozUserSelect="none"}
  272. ;m.prototype.hideOverlays=function(){this.infoWindowVisible=this.infoWindow&&this.infoWindow.isVisible();if(this.infoWindowVisible){this.infoWindow.hide()}for(var a=0;a<this.overlays.length;++a){if(this.overlays[a].display){this.overlays[a].display(false)}}}
  273. ;m.prototype.showOverlays=function(){if(this.infoWindowVisible){this.infoWindow.show()}for(var a=0;a<this.overlays.length;++a){if(this.overlays[a].display){this.overlays[a].display(true)}}}
  274. ;
  275.  
  276. ;
  277.  
  278. var jb=["image","shadow","iconSize","shadowSize","iconAnchor","infoWindowAnchor","infoShadowAnchor","transparent","printImage","mozPrintImage","printShadow","imageMap"];function fa(a){this.properties=new Object();if(a){for(var b=0;b<jb.length;b++){var c=jb[b];this[c]=a[c]}}}
  279. fa.prototype.translateImageMap=function(a,b){var c=[];for(var d=0;d<this.imageMap.length;d+=2){c.push(this.imageMap[d]+a);c.push(this.imageMap[d+1]+b)}return c}
  280. ;fa.prototype.getInfoWindowOffset=function(){return new J(this.infoWindowAnchor.x-this.iconAnchor.x,this.infoWindowAnchor.y-this.iconAnchor.y)}
  281. ;fa.prototype.setImage=function(a){this.image=a;this.printImage=a.replace(/\.png$/,"ie.gif");this.mozPrintImage=a.replace(/\.png$/,"ff.gif")}
  282. ;
  283.  
  284. var pb=0;function M(a,b){this.point=a;this.icon=b||W}
  285. M.prototype.initialize=function(a){this.map=a;this.images=[];var b=this.icon;this.iconImage=o.create(b.image,b.iconSize.width,b.iconSize.height,0,0,null,false,b.printImage?"noprint":null,a.ownerDocument);a.markerPane.appendChild(this.iconImage);this.images.push(this.iconImage);if(b.shadow){this.shadow=o.create(b.shadow,b.shadowSize.width,b.shadowSize.height,0,0,null,false,"noprint",a.ownerDocument);a.markerShadowPane.appendChild(this.shadow);this.images.push(this.shadow)}if(b.transparent){this.transparentIcon=o.create(b.transparent,b.iconSize.width,b.iconSize.height,0,0,null,false,"noprint",a.ownerDocument);a.markerMouseTargetPane.appendChild(this.transparentIcon);this.images.push(this.transparentIcon)}if(b.printImage&&u.type!=2){this.printIcon=na.create(b.printImage,b.iconSize.width,b.iconSize.height,0,0,null,false,"noscreen",a.ownerDocument)}else if(b.mozPrintImage&&u.type==2){this.printIcon=na.create(b.mozPrintImage,b.iconSize.width,b.iconSize.height,0,0,null,false,"noscreen",a.ownerDocument)}if(this.printIcon){a.markerPane.appendChild(this.printIcon);this.images.push(this.printIcon)}if(b.printShadow&&u.type!=2){this.printShadow=na.create(b.printShadow,b.shadowSize.width,b.shadowSize.height,0,0,null,false,"noscreen",a.ownerDocument);a.markerShadowPane.appendChild(this.printShadow);this.images.push(this.printShadow)}var c=this.iconImage;if(this.transparentIcon){c=this.transparentIcon}if(u.type==2&&b.imageMap){var d="map"+pb;pb++;this.imageMap=a.ownerDocument.createElement("map");this.imageMap.setAttribute("name",d);var e=a.ownerDocument.createElement("area");e.setAttribute("shape","poly");e.setAttribute("alt","");e.setAttribute("coords",b.imageMap.join(","));e.setAttribute("href","javascript:void(0)");c=e;this.imageMap.appendChild(e);this.transparentIcon.setAttribute("usemap","#"+d)}else{H(c,"pointer")}j.bindDom(c,"mousedown",this,this.onMouseDown);if(this.imageMap){this.map.div.appendChild(this.imageMap)}}
  286. ;M.prototype.remove=function(){for(var a=0;a<this.images.length;a++){Ra(this.images[a])}if(this.imageMap){Ra(this.imageMap)}}
  287. ;M.prototype.copy=function(){return new M(this.point,this.icon)}
  288. ;M.prototype.redraw=function(a){if(!a)return;var b=this.map.spec.getBitmapCoordinate(this.point.y,this.point.x,this.map.zoomLevel);var c=this.map.getDivCoordinate(b.x,b.y);var d=c.x-this.icon.iconAnchor.x;var e=c.y-this.icon.iconAnchor.y;for(var f=0;f<this.images.length;f++){this.images[f].style.left=l(d);this.images[f].style.top=l(e)}}
  289. ;M.prototype.getLatitude=function(){return this.point.y}
  290. ;M.prototype.setZIndex=function(a){for(var b=0;b<this.images.length;++b){this.images[b].style.zIndex=a}}
  291. ;M.prototype.addToInfoWindowMask=function(a,b){if(!this.icon.imageMap){return}var c=this.iconImage;if(c.offsetLeft+c.width>=a.x&&(c.offsetLeft<=b.x&&(c.offsetTop+c.height>=a.y&&c.offsetTop<=b.y))){var d=this.icon.translateImageMap(c.offsetLeft-a.x,c.offsetTop-a.y);var e=j.callback(this,this.onMouseDown);this.map.infoWindow.addAreaToMaskMap(d,e)}}
  292. ;M.prototype.getOffsetTop=function(){return this.iconImage.offsetTop}
  293. ;M.prototype.display=function(a){if(a){for(var b=0;b<this.images.length;++b){this.images[b].style.display=""}}else{for(var b=0;b<this.images.length;++b){this.images[b].style.display="none"}}}
  294. ;M.prototype.openInfoWindow=function(a){this.map.openInfoWindow(this.point,a,this.icon.getInfoWindowOffset(),j.callback(this,this.onInfoWindowOpen),j.callback(this,this.onInfoWindowClose))}
  295. ;M.prototype.openInfoWindowHtml=function(a){this.map.openInfoWindowHtml(this.point,a,this.icon.getInfoWindowOffset(),j.callback(this,this.onInfoWindowOpen),j.callback(this,this.onInfoWindowClose))}
  296. ;M.prototype.openInfoWindowXslt=function(a,b){this.map.openInfoWindowXslt(this.point,a,b,this.icon.getInfoWindowOffset(),j.callback(this,this.onInfoWindowOpen),j.callback(this,this.onInfoWindowClose))}
  297. ;M.prototype.showMapBlowup=function(a,b){this.map.showMapBlowup(this.point,a,b,this.icon.getInfoWindowOffset(),j.callback(this,this.onInfoWindowOpen),j.callback(this,this.onInfoWindowClose))}
  298. ;M.prototype.onMouseDown=function(a){E(a);j.trigger(this,"click")}
  299. ;M.prototype.onInfoWindowOpen=function(){j.trigger(this,"infowindowopen",this)}
  300. ;M.prototype.onInfoWindowClose=function(){j.trigger(this,"infowindowclose",this)}
  301. ;
  302.  
  303. function G(a,b,c,d){this.color=b||"#0000ff";this.weight=c||5;this.opacity=d||0.45;this.points=null;this.nextPointAtIndexLevel=null;this.zoomFactor=32;this.minTolerance=1.0E-5;if(a){this.points=[];for(var e=0;e<a.length;e++){this.points.push(a[e].y/1.0E-5);this.points.push(a[e].x/1.0E-5)}this.nextPointIndexAtLevel=[[]];for(var e=0;e<this.points.length/2;e++){this.nextPointIndexAtLevel[0][e]=e+1}}}
  304. G.fromEncoded=function(a,b,c,d,e,f,g){var h=new G(null,e,f,g);h.points=G.decodePolyline(a);h.zoomFactor=d;h.nextPointIndexAtLevel=G.decodeLevels(b,c,h.points.length/2);return h}
  305. ;G.prototype.initialize=function(a){this.map=a;this.drawBounds=new D(-T,-T,T,T)}
  306. ;G.prototype.remove=function(){if(this.drawElement){Ra(this.drawElement);this.drawElement=null}}
  307. ;G.prototype.copy=function(){var a=new G(null,this.color,this.weight,this.opacity);a.points=this.points;a.zoomFactor=this.zoomFactor;a.nextPointIndexAtLevel=this.nextPointIndexAtLevel;return a}
  308. ;G.prototype.redraw=function(a){if(!a&&this.drawElement){var b=this.map.getBoundsBitmap();if(this.drawBounds.containsBounds(b)){return}}R.start("Polyline","redraw");var c=900;var d=Math.min(this.map.viewSize.width,c);var e=Math.min(this.map.viewSize.height,c);if(u.type==1){d=5000;e=5000}this.drawBounds.minX=this.map.centerBitmap.x-d;this.drawBounds.minY=this.map.centerBitmap.y-e;this.drawBounds.maxX=this.map.centerBitmap.x+d;this.drawBounds.maxY=this.map.centerBitmap.y+e;var f=this.map.spec.getLatLng(this.drawBounds.minX,this.drawBounds.minY,this.map.zoomLevel);var g=this.map.spec.getLatLng(this.drawBounds.maxX,this.drawBounds.maxY,this.map.zoomLevel);var h=new D(f.x,g.y,g.x,f.y);var i=0;if(this.drawElement){i=this.drawElement.style.zIndex;this.remove()}var k=this.getDrawingTolerance();if(u.type==1){this.drawElement=this.createVectorSegments(h,k,this.drawBounds)}else{this.drawElement=this.createImageSegments(h,k,this.drawBounds)}this.drawElement.style.zIndex=i;this.map.mapPane.appendChild(this.drawElement);R.end("Polyline","redraw")}
  309. ;G.prototype.getLatitude=function(){return 0}
  310. ;G.prototype.setZIndex=function(a){this.drawElement.style.zIndex=a}
  311. ;G.prototype.display=function(a){if(a){this.drawElement.style.display=""}else{this.drawElement.style.display="none"}}
  312. ;G.prototype.getPoint=function(a){a<<=1;return new q(this.points[a+1]*1.0E-5,this.points[a]*1.0E-5)}
  313. ;G.prototype.getVectors=function(a,b,c){R.start("Polyline","getVectors");if(c==null)c=new Array();this.getVectorsHelper(a,0,this.points.length/2-1,this.nextPointIndexAtLevel.length-1,b,c);R.end("Polyline","getVectors");return c}
  314. ;G.prototype.getVectorsHelper=function(a,b,c,d,e,f){var g=1/Ua[0];for(var h=d;h>0;--h){g*=this.zoomFactor}var i=new D();i.minX=Math.floor((a.minX-g)*100000);i.minY=Math.floor((a.minY-g)*100000);i.maxX=Math.ceil((a.maxX+g)*100000);i.maxY=Math.ceil((a.maxY+g)*100000);var k=b;var n;var v=new q();v.y=this.points[k<<1];v.x=this.points[(k<<1)+1];var s=new q();while((n=this.nextPointIndexAtLevel[d][k])<=c){s.y=this.points[n<<1];s.x=this.points[(n<<1)+1];if(i.containsSegment(v,s)){if(d>e){this.getVectorsHelper(a,k,n,d-1,e,f)}else{f.push(v.y*1.0E-5);f.push(v.x*1.0E-5);f.push(s.y*1.0E-5);f.push(s.x*1.0E-5)}}var A=v;v=s;s=A;k=n}}
  315. ;G.decodePolyline=function(a){R.start("Polyline","decodePolyline");var b=a.length;var c=0;var d=new Array();var e=0;var f=0;while(c<b){var g;var h=0;var i=0;do{g=a.charCodeAt(c++)-63;i|=(g&31)<<h;h+=5}while(g>=32);var k=i&1?~(i>>1):i>>1;e+=k;d.push(e);h=0;i=0;do{g=a.charCodeAt(c++)-63;i|=(g&31)<<h;h+=5}while(g>=32);var n=i&1?~(i>>1):i>>1;f+=n;d.push(f)}R.end("Polyline","decodePolyline");return d}
  316. ;G.decodeLevels=function(a,b,c){R.start("Polyline","decodeLevels");var d=new Array(b);for(var e=0;e<b;++e)d[e]=new Array();var f=0;for(var g=0;g<c;++g){var h=a.charCodeAt(f++)-63;while(h>=0){var i=d[h--];while(i.length<g){i.push(g)}}}for(var h=0;h<b;++h){var i=d[h];for(var g=i.length;g<c;++g){i.push(c)}}R.end("Polyline","decodeLevels");return d}
  317. ;G.prototype.encodeSigned=function(a,b){return this.encodeUnsigned(a<0?~(a<<1):a<<1,b)}
  318. ;G.prototype.encodeUnsigned=function(a,b){if(!b)b=new Array();while(a>=32){b.push(String.fromCharCode((32|a&31)+63));a>>=5}b.push(String.fromCharCode(a+63));return b}
  319. ;G.prototype.getDrawingTolerance=function(){var a=0;var b=this.getPoint(0);var c=new J(this.minTolerance,this.minTolerance);var d=new J(2,2);while(a<this.nextPointIndexAtLevel.length){c.width*=this.zoomFactor;c.height*=this.zoomFactor;var e=this.map.spec.getLowestZoomLevel(b,c,d);if(this.map.zoomLevel<e){break}++a}return a}
  320. ;var sb=new q(0,0);G.prototype.createVectorSegments=function(a,b,c){R.start("Polyline","createVectorSegments");var d=this.getVectors(a,b);var e=new Array();var f=new D();this.getBitmapVectors(d,e,f);if(!c){c=new D()}var g=D.intersection(c,f);var h;if(e.length>0){var i=this.map.centerBitmap;var k=this.map.getDivCoordinate(i.x,i.y,sb);h=document.createElement("v:shape");h.unselectable="on";h.fill=false;h.filled=false;var n=1;var v=1;h.style.position="absolute";h.style.width=l(n);h.style.height=l(v);h.style.left=l(k.x);h.style.top=l(k.y);var s=i.x+" "+i.y;h.coordorigin=s;h.coordsize=n+" "+v;h.path=this.getVectorPath(e);var A=document.createElement("v:stroke");A.joinstyle="round";A.endcap="round";A.opacity=this.opacity;A.color=this.color;A.weight=l(this.weight);h.appendChild(A)}else{h=document.createElement("div")}R.end("Polyline","createVectorSegments");return h}
  321. ;var Vc=new q(0,0);G.prototype.getBitmapVectors=function(a,b,c,d){if(!b)b=new Array();if(!c)c=new D();c.minX=T;c.minY=T;c.maxX=-T;c.maxY=-T;var e=typeof d!="undefined"?d:this.map.zoomLevel;for(var f=0;f<a.length;){var g=a[f++];var h=a[f++];var i=this.map.spec.getBitmapCoordinate(g,h,e,Vc);i.x=Math.round(i.x);i.y=Math.round(i.y);b.push(i.x);b.push(i.y);if(i.x<c.minX)c.minX=i.x;if(i.y<c.minY)c.minY=i.y;if(i.x>c.maxX)c.maxX=i.x;if(i.y>c.maxY)c.maxY=i.y}return b}
  322. ;G.prototype.getVectorPath=function(a){var b=new Array();var c;var d;for(var e=0;e<a.length;){var f=a[e++];var g=a[e++];var h=a[e++];var i=a[e++];if(g!=c||f!=d){b.push("m");b.push(f);b.push(g);b.push("l")}b.push(h);b.push(i);c=i;d=h}b.push("e");return b.join(" ")}
  323. ;G.prototype.createImageSegments=function(a,b,c){R.start("Polyline","createImageSegments");var d;var e;do{var f=this.getVectors(a,b);var g=new Array();var h=new D();this.getBitmapVectors(f,g,h);h.minX-=this.weight;h.minY-=this.weight;h.maxX+=this.weight;h.maxY+=this.weight;if(!c){c=new D()}e=D.intersection(c,h);d=this.getEncodedImageSource(g,e.minX,e.minY);++b}while(d.length>900);var i;if(d.length>0){var k=this.map.getDivCoordinate(e.minX,e.minY,sb);var n=0;var v=0;var s=255;try{var A=this.color;if(A.charAt(0)=="#"){A=A.substring(1)}n=parseInt(A.substring(0,2),16);v=parseInt(A.substring(2,4),16);s=parseInt(A.substring(4,6),16)}catch(Q){B.dump(Q)}var O=(1-this.opacity)*255;var V=Math.ceil(e.maxX-e.minX);var t=Math.ceil(e.maxY-e.minY);var w="http://mt.google.com/mld?width="+V+"&height="+t+"&path="+d+"&color="+n+","+v+","+s+","+O+"&weight="+this.weight;B.writeURL(w);if(u.type!=1){V=null;t=null}var ca=u.type==2?"noprint":null;i=o.create(w,V,t,k.x,k.y,0,false,ca)}else{i=document.createElement("div")}R.end("Polyline","createImageSegments");return i}
  324. ;G.prototype.getEncodedImageSource=function(a,b,c){if(b==T||c==T){return""}var d=[];var e;var f;for(var g=0;g<a.length;){var h=a[g++];var i=a[g++];var k=a[g++];var n=a[g++];if(h==k&&i==n){continue}if(h!=e||i!=f){if(d.length>0){this.encodeSigned(9999,d)}this.encodeSigned(h-b,d);this.encodeSigned(i-c,d)}this.encodeSigned(k-h,d);this.encodeSigned(n-i,d);f=n;e=k}this.encodeSigned(9999,d);return d.join("")}
  325. ;
  326.  
  327. var Lb=p+"dir_";function $(a,b,c){this.point=a;this.start=b;this.end=c;this.element=null;this.angle=null;this.lastSpec=null}
  328. $.fromPolylinePoint=function(a,b){wb(b>=2);var c=a.getPoint(b);var d=a.getPoint(b-2);return new $(c,d,c)}
  329. ;$.prototype.initialize=function(a){this.map=a}
  330. ;$.prototype.remove=function(){if(this.element){Ra(this.element);this.element=null}}
  331. ;$.prototype.copy=function(){return new $(this.point,this.start,this.end)}
  332. ;$.prototype.redraw=function(a){if(!a){return}if(!this.element||this.lastSpec!=this.map.spec){this.remove();var b=this.getAngle();var c=this.getDirIndicatorPath(b);this.element=o.create(c,24,24,0,0,2,false);this.map.mapPane.appendChild(this.element);this.angle=b;this.lastSpec=this.map.spec}var d=12*Math.cos(this.angle);var e=12*Math.sin(this.angle);d=Math.floor(-12-d);e=Math.floor(-12-e);var f=this.map.spec.getBitmapCoordinate(this.point.y,this.point.x,this.map.zoomLevel);var g=this.map.getDivCoordinate(f.x,f.y);this.element.style.left=l(g.x+d);this.element.style.top=l(g.y+e)}
  333. ;$.prototype.getLatitude=function(){return this.point.y}
  334. ;$.prototype.setZIndex=function(a){this.element.style.zIndex=a}
  335. ;$.prototype.getAngle=function(){var a=this.map.spec.getBitmapCoordinate(this.start.y,this.start.x,this.map.zoomLevel);var b=this.map.spec.getBitmapCoordinate(this.end.y,this.end.x,this.map.zoomLevel);return Math.atan2(b.y-a.y,b.x-a.x)}
  336. ;$.prototype.getDirIndicatorPath=function(a){var b=Math.round(a*60/Math.PI)*3+90;while(b>=120)b-=120;while(b<0)b+=120;var c=Lb+b+".png";return c}
  337. ;
  338.  
  339. function aa(a,b,c){this.anchor=a;this.offsetWidth=b||0;this.offsetHeight=c||0}
  340. aa.prototype.apply=function(a){a.style.position="absolute";a.style[this.getWidthMeasure()]=l(this.offsetWidth);a.style[this.getHeightMeasure()]=l(this.offsetHeight)}
  341. ;aa.prototype.getWidthMeasure=function(){switch(this.anchor){case 1:case 3:return"right";default:return"left"}}
  342. ;aa.prototype.getHeightMeasure=function(){switch(this.anchor){case 2:case 3:return"bottom";default:return"top"}}
  343. ;
  344.  
  345. var Sb=p+"center.png";var Tb=p+"east.png";var Xb=p+"west.png";var Ub=p+"north.png";var Wb=p+"south.png";var Vb=p+"panshadow.png";var Yb=p+"zoom-plus.png";var Zb=p+"zoom-minus.png";var $b=p+"slider.png";var Ob=p+"east-mini.png";var Rb=p+"west-mini.png";var Pb=p+"north-mini.png";var Qb=p+"south-mini.png";var hb=p+"zoom-plus-mini.png";var ib=p+"zoom-minus-mini.png";function da(){}
  346. da.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");this.createPanningControls(a,b);var c=a.ownerDocument.createElement("div");b.appendChild(c);var d=a.mapTypes[0].numZoomLevels;this.createZoomSlider(a,c,d);var e=this;j.addListener(a,"maptypechanged",function(f,g){if(f.numZoomLevels!=g.numZoomLevels){Hb(c);e.createZoomSlider(a,c,g.numZoomLevels)}}
  347. );return b}
  348. ;da.prototype.getDefaultPosition=function(){return new aa(0,8,8)}
  349. ;da.prototype.createPanningControls=function(a,b){var c=o.create(Vb,59,64,0,0,0,false,null,a.ownerDocument);b.appendChild(c);var d=o.create(Ub,17,17,20,0,1,false,null,a.ownerDocument);H(d,"pointer");j.bindClick(d,this,function(i){a.pan(0,Math.floor(a.viewSize.height*0.5));E(i)}
  350. );d.title=_mPanNorth;b.appendChild(d);var e=o.create(Tb,17,17,40,20,1,false,null,a.ownerDocument);H(e,"pointer");j.bindClick(e,this,function(i){a.pan(-Math.floor(a.viewSize.width*0.5),0);E(i)}
  351. );e.title=_mPanEast;b.appendChild(e);var f=o.create(Wb,17,17,20,40,1,false,null,a.ownerDocument);H(f,"pointer");j.bindClick(f,this,function(i){a.pan(0,-Math.floor(a.viewSize.height*0.5));E(i)}
  352. );f.title=_mPanSouth;b.appendChild(f);var g=o.create(Xb,17,17,0,20,1,false,null,a.ownerDocument);H(g,"pointer");j.bindClick(g,this,function(i){a.pan(Math.floor(a.viewSize.width*0.5),0);E(i)}
  353. );g.title=_mPanWest;b.appendChild(g);var h=o.create(Sb,17,17,20,20,1,false,null,a.ownerDocument);H(h,"pointer");j.bindClick(h,this,function(i){a.closeInfoWindow();if(a.lastPageCenter){if(a.lastPageZoom!=a.zoomLevel){a.centerAndZoom(a.lastPageCenter,a.lastPageZoom)}else{a.recenterOrPanToLatLng(a.lastPageCenter)}}else if(a.lastLatLng){a.recenterOrPanToLatLng(a.lastLatLng)}E(i)}
  354. );h.title=_mLastResult;b.appendChild(h)}
  355. ;da.prototype.createZoomSlider=function(a,b,c){var d=21;var e=18;var f=64;b.style.position="absolute";b.style.top=l(f);b.style.left=l(e);var g=p;var h=g+"dsliderbar.png";var i=g+"dsliderbarshadow.png";var k=8;var n=g+"dslidertop.png";var v=g+"dslidertopshadow.png";var s=31;var A=g+"dsliderbottom.png";var Q=g+"dsliderbottomshadow.png";var O=32;this.sliderNotchHeight=k;var V=s+(c-2)*k+O;var t=a.ownerDocument.createElement("div");t.style.position="absolute";t.style.left=l(0);t.style.top=l(0);t.style.width=l(d);t.style.height=l(V);t.style.zIndex=0;var w;w=o.create(v,d,s,0,0,0,false,null,a.ownerDocument);t.appendChild(w);for(var ca=0;ca<c-2;++ca){w=o.create(i,d,k,0,s+ca*k,0,false,null,a.ownerDocument);t.appendChild(w)}w=o.create(Q,d,O,0,s+(c-2)*k,0,false,null,a.ownerDocument);t.appendChild(w);b.appendChild(t);t=a.ownerDocument.createElement("div");t.style.position="absolute";t.style.left=l(0);t.style.top=l(0);t.style.width=l(d);t.style.height=l(V);t.style.zIndex=1;w=o.create(Yb,17,17,2,0,2,false,null,a.ownerDocument);H(w,"pointer");j.bindClick(w,this,function(X){a.zoomTo(a.zoomLevel-1);E(X)}
  356. );w.title=_mZoomIn;t.appendChild(w);this.zoomOut=(w=o.create(Zb,17,17,2,V-17-2,2,false,null,a.ownerDocument));H(w,"pointer");j.bindClick(w,this,function(X){a.zoomTo(a.zoomLevel+1);E(X)}
  357. );w.title=_mZoomOut;t.appendChild(w);this.sliderTopImage=(w=o.create(n,d,s,0,0,1,false,null,a.ownerDocument));t.appendChild(w);this.sliderBarImage=[];for(var ca=0;ca<c-2;++ca){w=o.create(h,d,k,0,s+ca*k,0,false,null,a.ownerDocument);t.appendChild(w);this.sliderBarImage.push(w)}this.sliderBottomImage=(w=o.create(A,d,O,0,s+(c-2)*k,0,false,null,a.ownerDocument));t.appendChild(w);b.appendChild(t);var Ia=14-k;t=a.ownerDocument.createElement("div");t.style.position="absolute";t.style.left=l(1);t.style.top=l(s-k-2);t.style.width=l(d);t.style.height=l(k*c+Ia);t.style.zIndex=2;var Xa=o.create($b,22,14,0,0,2,false,null,a.ownerDocument);Xa.title=_mZoomDrag;t.appendChild(Xa);b.appendChild(t);var xc=new D(0,0,22,k*c+Ia);var la=new ea(Xa,0,this.getRelativeZoomSliderPos(),xc);j.bind(a,"zoom",this,function(){la.moveTo(0,this.getRelativeZoomSliderPos())}
  358. );if(u.type==1){j.bind(la,"dragstart",this,function(){this.savedOffset={"x":this.map.div.offsetLeft,"y":this.map.div.offsetTop};this.map.hideOverlays()}
  359. );j.bind(la,"drag",this,function(){var X=la.top+Math.floor(this.sliderNotchHeight/2);var ua=this.getZoomFactorFromRelativeCoord(X);this.applyZoom(ua)}
  360. );j.bind(la,"dragend",this,function(){var X=la.top+Math.floor(this.sliderNotchHeight/2);this.targetZoom=this.getZoomFromRelativeCoord(X);this.currentZoom=this.getZoomFactorFromRelativeCoord(X);this.zoomInterval=Fb(this,this.animateZoom,50)}
  361. )}else{j.bind(la,"dragend",this,function(){var X=la.top+Math.floor(this.sliderNotchHeight/2);this.map.zoomTo(this.getZoomFromRelativeCoord(X))}
  362. )}H(t,"pointer");t.title=_mZoomSet;var yc=t;j.bindClick(t,this,function(X){var ua;if(u.type==1){ua=window.event.offsetY}else{var zc=Sa(yc);ua=X.pageY-zc.y-2}E(X);a.zoomTo(this.getZoomFromRelativeCoord(ua))}
  363. )}
  364. ;da.prototype.getRelativeZoomSliderPos=function(){return 1+this.map.zoomLevel*this.sliderNotchHeight}
  365. ;da.prototype.getZoomFromRelativeCoord=function(a){var b=this.map.spec.numZoomLevels;var c=Math.floor((a-1)/this.sliderNotchHeight);return Math.max(0,Math.min(b-1,c))}
  366. ;da.prototype.getZoomFactorFromRelativeCoord=function(a){var b=this.map.spec.numZoomLevels;var c=(a-1)/this.sliderNotchHeight;return Math.max(0,Math.min(b-1,c))}
  367. ;da.prototype.applyZoom=function(a){var b=this.map;var c=Math.floor(Math.log(this.map.viewSize.width)*Math.LOG2E-2);var d=b.zoomLevel-a;if(d>c){d=c}else if(d<-c){d=-c}var e=Math.pow(2,d);b.div.style.zoom=e;var f=b.viewSize.width*b.centerScreen.x;var g=b.viewSize.height*b.centerScreen.y;b.div.style.left=l((this.savedOffset.x-f)*e+f);b.div.style.top=l((this.savedOffset.y-g)*e+g)}
  368. ;da.prototype.animateZoom=function(){var a=this.map;this.currentZoom=this.currentZoom+0.3*(this.targetZoom-this.currentZoom);if(Math.abs(this.targetZoom-this.currentZoom)<0.05){a.div.style.left=l(this.savedOffset.x);a.div.style.top=l(this.savedOffset.y);a.div.style.zoom=1;a.showOverlays();a.zoomTo(this.targetZoom);this.savedOffset=null;window.clearInterval(this.zoomInterval)}else{this.applyZoom(this.currentZoom)}}
  369. ;function wa(){}
  370. wa.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");var c=o.create(Pb,18,18,9,0,1,false,null,a.ownerDocument);H(c,"pointer");j.bindClick(c,this,function(i){a.pan(0,Math.floor(a.viewSize.height*0.5));E(i)}
  371. );c.title=_mPanNorth;b.appendChild(c);var d=o.create(Ob,18,18,18,18,1,false,null,a.ownerDocument);H(d,"pointer");j.bindClick(d,this,function(i){a.pan(-Math.floor(a.viewSize.width*0.5),0);E(i)}
  372. );d.title=_mPanEast;b.appendChild(d);var e=o.create(Qb,18,18,9,36,1,false,null,a.ownerDocument);H(e,"pointer");j.bindClick(e,this,function(i){a.pan(0,-Math.floor(a.viewSize.height*0.5));E(i)}
  373. );e.title=_mPanSouth;b.appendChild(e);var f=o.create(Rb,18,18,0,18,1,false,null,a.ownerDocument);H(f,"pointer");j.bindClick(f,this,function(i){a.pan(Math.floor(a.viewSize.width*0.5),0);E(i)}
  374. );f.title=_mPanWest;b.appendChild(f);var g=o.create(hb,18,18,9,57,1,false,null,a.ownerDocument);H(g,"pointer");j.bindClick(g,this,function(i){a.zoomTo(a.zoomLevel-1);E(i)}
  375. );g.title=_mZoomIn;b.appendChild(g);var h=o.create(ib,18,18,9,75,1,false,null,a.ownerDocument);H(h,"pointer");j.bindClick(h,this,function(i){a.zoomTo(a.zoomLevel+1);E(i)}
  376. );h.title=_mZoomOut;b.appendChild(h);return b}
  377. ;wa.prototype.getDefaultPosition=function(){return new aa(0,9,9)}
  378. ;function xa(){}
  379. xa.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");b.style.width=l(18);b.style.height=l(36);var c=o.create(hb,18,18,0,0,1,false,null,a.ownerDocument);H(c,"pointer");j.bindClick(c,this,function(e){a.zoomTo(a.zoomLevel-1);E(e)}
  380. );c.title=_mZoomIn;b.appendChild(c);var d=o.create(ib,18,18,0,18,1,false,null,a.ownerDocument);H(d,"pointer");j.bindClick(d,this,function(e){a.zoomTo(a.zoomLevel+1);E(e)}
  381. );d.title=_mZoomOut;b.appendChild(d);return b}
  382. ;xa.prototype.getDefaultPosition=function(){return new aa(0,6,6)}
  383. ;
  384.  
  385. var Nb=p+"poweredby.png";function oa(a,b){this.enableTermsLink=a;this.enableGoogleCopyright=b}
  386. oa.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);b.style.right=l(3);b.style.bottom=l(3);this.div=b;this.copyrightSpan=a.ownerDocument.createElement("span");b.appendChild(this.copyrightSpan);if(this.enableTermsLink){var c=a.ownerDocument.createElement("a");c.href=_mTermsURL;c.appendChild(a.ownerDocument.createTextNode(_mTerms));j.addBuiltInListener(c,"click",eb);b.appendChild(c);this.termsLink=c}this.updateColor();this.updateNotice();j.bind(this.map,"maptypechanged",this,this.updateColor);j.bind(this.map,"moveend",this,this.updateNotice);return b}
  387. ;oa.prototype.getDefaultPosition=function(){return new aa(3,3,3)}
  388. ;oa.prototype.updateColor=function(){if(this.map.spec.getTextColor){this.div.style.color=this.map.spec.getTextColor()}else{this.div.style.color="black"}if(this.termsLink){if(this.map.spec.getLinkColor){this.termsLink.style.color=this.map.spec.getLinkColor()}else{this.termsLink.style.color="#7777cc"}}}
  389. ;oa.prototype.updateNotice=function(){var a=[];if(this.enableGoogleCopyright){a.push(_mGoogleCopy)}if(this.map.spec.getCopyright){var b=this.map.spec.getCopyright(this.map);if(b){a.push(b)}}if(this.enableTermsLink){a.push("")}this.copyrightSpan.innerHTML=a.join(" - ")}
  390. ;function Fa(){}
  391. Fa.prototype.initialize=function(a){var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);H(b,"auto");b.style.height=l(30);var c=a.ownerDocument.createElement("a");c.href=vb;c.title=_mSiteName;c.appendChild(o.create(Nb,62,30,null,null,false,null,a.ownerDocument));b.appendChild(c);c.onclick=function(){var d=new F();d.setAllMapValues(a);top.location=d.getURL(true);return false}
  392. ;a.container.appendChild(b);this.map=a;return b}
  393. ;Fa.prototype.remove=function(){this.map.container.removeChild(this.div)}
  394. ;Fa.prototype.getDefaultPosition=function(){return new aa(2,3,1)}
  395. ;
  396.  
  397. var $c=p+"leftbar.png";var ad=p+"topbar.png";var Xc=p+"bottombar.png";var Yc=p+"horibar400.png";var Zc=p+"horibarcap.png";function ub(a,b,c,d){this.fpsLength=a;this.metricLength=b;this.fpsText=c;this.metricText=d}
  398. function ja(a){this.maxLength=a||125}
  399. ja.prototype.initialize=function(a){this.map=a;this.div=a.ownerDocument.createElement("div");this.fps=document.createElement("div");this.metric=document.createElement("div");a.applyControlStyles(this.div);a.applyControlStyles(this.fps);a.applyControlStyles(this.metric);this.div.style.height=l(26);var b=this.decideScale(a,this.maxLength);var c=b.fpsLength;var d=b.metricLength;var e=Math.max(c,d);this.fps.style.left=l(8);this.fps.style.width=l(e);this.fps.style.bottom=l(15);this.metric.style.left=l(8);this.metric.style.width=l(e);this.metric.style.top=l(16);this.setText(this.fps,b.fpsText);this.setText(this.metric,b.metricText);this.leftBar=o.create($c,4,26,0,1,0,false);this.horizontalBar=o.create(Yc,e,4,3,12,0,true);this.horizontalBarCap=o.create(Zc,1,4,e+3,12,1,false);this.rightTopBar=o.create(ad,4,12,c,1,1,false);this.rightBottomBar=o.create(Xc,4,12,d,15,1,false);this.div.appendChild(this.leftBar);this.div.appendChild(this.horizontalBar);this.div.appendChild(this.rightTopBar);this.div.appendChild(this.rightBottomBar);this.div.appendChild(this.horizontalBarCap);this.div.appendChild(this.fps);this.div.appendChild(this.metric);this.div.title=_mScale;j.bind(a,"moveend",this,this.update);j.bind(a,"zoom",this,this.update);j.bind(a,"move",this,this.update);j.bind(a,"maptypechanged",this,this.updateColor);this.updateColor();return this.div}
  400. ;ja.prototype.getDefaultPosition=function(){return new aa(2,71,5)}
  401. ;ja.prototype.updateColor=function(){var a="black";if(this.map.spec.getTextColor){a=this.map.spec.getTextColor()}this.fps.style.color=a;this.metric.style.color=a}
  402. ;ja.prototype.update=function(){var a=this.decideScale(this,this.maxLength);var b=Math.max(a.fpsLength,a.metricLength);this.setText(this.fps,a.fpsText);this.setText(this.metric,a.metricText);this.width=b+4;this.rightTopBar.left=a.fpsLength;this.rightBottomBar.left=a.metricLength;this.horizontalBar.width=b;this.horizontalBarCap.left=b+3;this.div.style.width=l(b+4);this.rightTopBar.style.left=l(a.fpsLength);this.rightBottomBar.style.left=l(a.metricLength);this.horizontalBar.style.width=l(b);this.horizontalBarCap.style.left=l(b+3);this.metric.style.width=l(a.metricLength);this.fps.style.width=l(a.fpsLength)}
  403. ;ja.prototype.decideScale=function(){var a=this.map.spec.getLatLng(this.map.centerBitmap.x-this.maxLength/2,this.map.centerBitmap.y,this.map.zoomLevel);var b=this.map.spec.getLatLng(this.map.centerBitmap.x+this.maxLength/2,this.map.centerBitmap.y,this.map.zoomLevel);var c=gd(a,b);var d=this.round125(c);var e;var f;if(d>=1000){var g=this.round125(c/1000);f=Math.round(this.maxLength*g/(c/1000));e=g+" "+_mKilometers}else{var f=Math.round(this.maxLength*d/c);var e=d+" "+_mMeters}var h=c/1609.344;var i=c*3.28084;var k;var n;if(h>=1){var v=this.round125(h);k=Math.round(this.maxLength*v/h);n=v+" "+_mMiles}else{var s=this.round125(i);k=Math.round(this.maxLength*s/i);n=s+" "+_mFeet}if(d<1){return new ub(0,0,"","")}else{return new ub(k,f,n,e)}}
  404. ;ja.prototype.round125=function(a){var b=a;if(b>1){var c=0;while(b>=10){b=b/10;c=c+1}if(b>=5){b=5}else if(b>=2){b=2}else{b=1}while(c>0){b=b*10;c=c-1}}return b}
  405. ;ja.prototype.setText=function(a,b){if(a.innerHTML!=b){a.innerHTML=b}}
  406. ;
  407.  
  408. var Jc=p+"l1.png";var Mc=p+"m1.png";var Qc=p+"r1.png";var Kc=p+"l5.png";var Nc=p+"m5.png";var Rc=p+"r5.png";var Lc=p+"l1e.png";var Pc=p+"m1e.png";var Tc=p+"r1e.png";var qb=p+"l5e.png";var Oc=p+"m5e.png";var Sc=p+"r5e.png";function Uc(a,b,c,d,e,f){this.mapType=a;this.div=b;this.left=c;this.right=e;this.middle=d;this.text=f}
  409. function Y(a){this.tiny=a;if(a){this.buttonWidth=50}else{this.buttonWidth=75}}
  410. Y.prototype.initialize=function(a){var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);b.style.height=l(19);a.container.appendChild(b);this.map=a;this.div=b;this.b();this.updateButtons();j.bind(a,"moveend",this,this.l);j.bind(a,"maptypechanged",this,this.updateButtons);return b}
  411. ;Y.prototype.b=function(){var a=[];for(var b=0;b<this.map.mapTypes.length;b++){var c=this.map.mapTypes[b];if(this.map.a(c)){var d=this.createButton(this.map,c,a.length);a.push(d);this.div.appendChild(d.div)}}this.div.style.width=l(this.buttonWidth*a.length+2*(a.length-1));this.buttons=a}
  412. ;Y.prototype.j=function(){for(var a=0;a<this.buttons.length;a++){this.div.removeChild(this.buttons[a].div)}this.buttons=null}
  413. ;Y.prototype.k=function(a){for(var b=0;b<this.buttons.length;b++){if(this.buttons[b].mapType==a){return true}}return false}
  414. ;Y.prototype.l=function(){var a=this.map.getBoundsLatLng();var b=false;for(var c=0;c<this.map.mapTypes.length;c++){var d=this.map.mapTypes[c];if(this.map.a(d)!=this.k(d)){b=true;break}}if(b){this.j();this.b();this.updateButtons()}}
  415. ;Y.prototype.getDefaultPosition=function(){return new aa(1,7,7)}
  416. ;Y.prototype.createButton=function(a,b,c){var d=a.ownerDocument.createElement("div");d.style.height=l(19);d.style.width=l(this.buttonWidth);d.style.overflow="hidden";d.style.position="absolute";d.style.top=l(0);d.style.left=l(c*(this.buttonWidth+2));var e=o.create(ra,2,19,0,0,0,false,null,a.ownerDocument);d.appendChild(e);var f=this.buttonWidth-4-2;var g=o.create(ra,f,19,2,0,0,true,null,a.ownerDocument);d.appendChild(g);var h=o.create(ra,4,19,null,null,0,false,null,a.ownerDocument);h.style.position="absolute";h.style.top=l(0);h.style.right=l(0);d.appendChild(h);var i=a.ownerDocument.createElement("div");i.style.position="absolute";i.style.left=l(2);i.style.width=l(f);i.style.right=l(0);i.style.height=l(19);i.style.fontSize=l(12);i.style.textAlign="center";i.style.paddingTop=l(1);i.style.zIndex=1;var k;if(this.tiny&&b.getShortLinkText){k=b.getShortLinkText()}else{k=b.getLinkText()}i.appendChild(a.ownerDocument.createTextNode(k));d.appendChild(i);H(d,"pointer");j.addBuiltInListener(d,"click",function(){a.setMapType(b)}
  417. );return new Uc(b,d,e,g,h,i)}
  418. ;Y.prototype.updateButtons=function(){var a=this.map.getCurrentMapType();for(var b=0;b<this.buttons.length;b++){var c=this.buttons[b];var d=c.mapType.h&&c.mapType.h();if(c.mapType==a){if(d){B.writeURL(qb)}o.setImage(c.left,d?qb:Kc);o.setImage(c.middle,d?Oc:Nc,true);o.setImage(c.right,d?Sc:Rc);c.text.style.fontWeight="bold"}else{o.setImage(c.left,d?Lc:Jc);o.setImage(c.middle,d?Pc:Mc,true);o.setImage(c.right,d?Tc:Qc);c.text.style.fontWeight="normal"}}}
  419. ;
  420.  
  421. function ya(a){this.anchorLevel=null;this.anchor=new q(0,0);this.spec=null;this.span=new J(T,T);this.points=null;this.map=a;j.bind(this.map,"moveend",this,this.onMapMoveEnd);j.bind(this.map,"resize",this,this.onMapResize)}
  422. ya.prototype.onMapMoveEnd=function(){if(this.anchorLevel!=this.map.zoomLevel||this.spec!=this.map.spec){this.reset();this.addPoint(0,0,true);return}var a=this.map.getCenterLatLng();var b=Math.round((a.x-this.anchor.x)/this.span.width);var c=Math.round((a.y-this.anchor.y)/this.span.height);this.addPoint(b,c,true)}
  423. ;ya.prototype.onMapResize=function(){this.reset();this.addPoint(0,0,false)}
  424. ;ya.prototype.reset=function(){this.map.getCenterLatLng(this.anchor);this.map.getSpanLatLng(this.span);this.spec=this.map.spec;this.anchorLevel=this.map.zoomLevel;this.points=new Object()}
  425. ;ya.prototype.addPoint=function(a,b,c){var d=a+","+b;if(this.points[d])return;this.points[d]=1;if(c){var e=new F();e.setAllMapValues(this.map);var f=new q(this.anchor.x+a*this.span.width,this.anchor.y+b*this.span.height);e.setValue("vp",e.getLatLngArg(f));if(window._apiKey){e.setValue("key",window._apiKey)}var g=e.getURL(true);B.writeURL(g);if(!this.sender){this.sender=document.createElement("img");this.sender.style.position="absolute";this.sender.style.visibility="hidden";this.sender.style.top=l(-10);this.sender.style.left=l(-10);this.sender.style.width=l(1);this.sender.style.height=l(1);document.body.appendChild(this.sender)}this.sender.src=g}}
  426. ;
  427.  
  428. var W=new fa();W.image=p+"marker.png";W.shadow=p+"shadow50.png";W.iconSize=new J(20,34);W.shadowSize=new J(37,34);W.iconAnchor=new q(9,34);W.infoWindowAnchor=new q(9,2);W.infoShadowAnchor=new q(18,25);W.transparent=p+"markerTransparent.png";W.imageMap=[9,0,6,1,4,2,2,4,0,8,0,12,1,14,2,16,5,19,7,23,8,26,9,30,9,34,11,34,11,30,12,26,13,24,14,21,16,18,18,16,20,12,20,8,18,4,16,2,15,1,13,0];W.printImage=p+"markerie.gif";W.mozPrintImage=p+"markerff.gif";W.printShadow=p+"dithshadow.gif";function pa(){}
  429. function Ka(a,b,c){this.markers=a;this.panelStyle=b;this.xml=c}
  430. function Ca(a,b,c){this.polyline=a;this.segments=b;this.xml=c}
  431. function $a(a,b,c){this.id=a;this.description=b;this.pointIndex=c}
  432. pa.fromXml=function(a){var b=[];var c=a.getElementsByTagName("overlay");for(var d=0;d<c.length;d++){b.push(Ka.fromXml(c[d]))}var e=new pa();e.query=Z(L(a,"query"));e.title=Z(L(a,"title"));e.error=L(a,"error");e.spelling=L(a,"spelling");e.refinements=L(a,"refinements");e.center=q.fromLatLngXml(L(a,"center"));e.viewSpan=J.fromLatLngXml(L(a,"span"));e.searchCenter=q.fromLatLngXml(L(a,"searchcenter"));e.searchSpan=J.fromLatLngXml(L(a,"searchspan"));e.overlays=b;e.directions=Ca.fromXml(L(a,"directions"));e.debug=fd(L(a,"debug"));e.xml=a;return e}
  433. ;Ka.fromXml=function(a){if(!a)return null;var b=[];var c=a.getElementsByTagName("location");for(var d=0;d<c.length;d++){b.push(M.fromXml(c[d]))}return new Ka(b,a.getAttribute("panelStyle"),a)}
  434. ;Ca.fromXml=function(a){if(!a)return null;var b=[];var c=L(a,"segments");var d=c.getElementsByTagName("segment");for(var e=0;e<d.length;++e){b.push($a.fromXml(d[e]))}return new Ca(G.fromXml(L(a,"polyline")),b,a)}
  435. ;$a.fromXml=function(a){if(!a)return null;return new $a(a.getAttribute("id"),Z(a),parseInt(a.getAttribute("pointIndex")))}
  436. ;G.fromXml=function(a){if(!a)return null;return G.fromEncoded(Z(L(a,"points")),Z(L(a,"levels")),parseInt(a.getAttribute("numLevels")),parseInt(a.getAttribute("zoomFactor")))}
  437. ;M.fromXml=function(a){if(!a)return null;var b=fa.fromXml(L(a,"icon"));if(!b){return{"xml":a}}var c=new M(q.fromLatLngXml(L(a,"point")),b);c.id=a.getAttribute("id");c.infoStyle=a.getAttribute("infoStyle");c.xml=a;return c}
  438. ;fa.fromXml=function(a){if(!a){return null}var b=a.getAttribute("class");if(b!="local"){return null}var c=new fa(W);c.setImage(a.getAttribute("image"));return c}
  439. ;q.fromLatLngXml=function(a){if(!a)return null;return new q(parseFloat(a.getAttribute("lng")),parseFloat(a.getAttribute("lat")))}
  440. ;J.fromLatLngXml=function(a){if(!a)return null;return new J(parseFloat(a.getAttribute("lng")),parseFloat(a.getAttribute("lat")))}
  441. ;Ka.prototype.getMarkerById=function(a){for(var b=0;b<this.markers.length;b++){if(this.markers[b].id==a)return this.markers[b]}return null}
  442. ;Ca.prototype.getSegmentById=function(a){for(var b=0;b<this.segments.length;b++){if(this.segments[b].id==a)return this.segments[b]}return null}
  443. ;
  444.  
  445. var qc=p+"iws_nw.png";var oc=p+"iws_n.png";var pc=p+"iws_ne.png";var nc=p+"iws_e.png";var mc=p+"iws_c.png";var uc=p+"iws_w.png";var tc=p+"iws_sw.png";var mb=p+"iws_s.png";var sc=p+"iws_se.png";var rc=p+"iws_tap.png";var jc=p+"iw_nw.png";var hc=p+"iw_n.png";var ic=p+"iw_ne.png";var gc=p+"iw_e.png";var ec=p+"iw_c.png";var wc=p+"iw_w.png";var vc=p+"iw_sw.png";var lb=p+"iw_s.png";var lc=p+"iw_se.png";var kc=p+"iw_tap.png";function C(a,b){this.createWindow();this.createShadow();if(u.type!=1){this.createMask()}else{this.maskPng=null}this.createContentArea();this.createCloseButton();a.appendChild(this.windowDiv);b.appendChild(this.shadowDiv);this.setSize(208,69);this.hide();Fb(this,this.checkSize,100)}
  446. C.prototype.setContentSize=function(a,b){this.setSize(a-(this.window.w.width-15)*2,b-(this.window.n.height-15)*2)}
  447. ;C.prototype.setSize=function(a,b){if(a<0)a=0;if(b<0)b=0;this.width=a;this.height=b;this.setWindowSize(a,b);this.setShadowSize(a,b);if(this.hasMask()){this.setMaskSize()}this.closeButton.style.left=this.getTotalWidth()-this.closeButton.width-10-1+"px";this.closeButton.style.top="10px"}
  448. ;C.prototype.getWindowHeight=function(){return this.window.c.height+2*this.window.n.height}
  449. ;C.prototype.getTotalHeight=function(){return this.height+this.window.pointer.height+this.window.n.height}
  450. ;C.prototype.getTotalHeightAboveGround=function(){var a=this.pixelOffset?this.pixelOffset.height:0;return this.getTotalHeight()-a}
  451. ;C.prototype.getTotalShadowHeight=function(){return Math.floor(this.height/4)+this.shadow.pointer.height+this.shadow.nw.height}
  452. ;C.prototype.getTotalWidth=function(){return this.width+this.window.w.width+this.window.e.width}
  453. ;C.prototype.getOffsetLeft=function(){return this.windowDiv.offsetLeft}
  454. ;C.prototype.getOffsetTop=function(){return this.windowDiv.offsetTop}
  455. ;C.prototype.setWindowSize=function(a,b){this.window.n.style.width=a+"px";this.window.e.style.height=b+"px";this.window.c.style.width=a+"px";this.window.c.style.height=b+"px";this.window.w.style.height=b+"px";var c=this.calculatePointerOffset(a);this.window.s1.style.width=c+"px";this.window.pointer.style.left=c+this.window.sw.width+"px";this.window.s2.style.left=c+this.window.pointer.width+this.window.sw.width+"px";this.window.s2.style.width=a-c-this.window.pointer.width+"px";var d=a+this.window.w.width+"px";this.window.ne.style.left=d;this.window.e.style.left=d;this.window.se.style.left=d;var e=b+this.window.n.height+"px";this.window.sw.style.top=e;this.window.s1.style.top=e;this.window.pointer.style.top=e;this.window.s2.style.top=e;this.window.se.style.top=e}
  456. ;C.prototype.setShadowSize=function(a,b){a-=15;var c=Math.floor(b/4);var d=a+this.shadow.nw.width;var e=this.calculatePointerOffset(a)-41;var f=c+this.shadow.n.height+"px";var g=c+this.shadow.nw.height;this.shadow.s1Div.style.width=Math.max(e,0)+"px";this.shadow.pointer.style.left=e+this.shadow.sw.width+"px";this.shadow.s2Div.style.left=e+this.shadow.pointer.width+this.shadow.sw.width+"px";this.shadow.s2Div.style.width=a-e-this.shadow.pointer.width+"px";this.shadow.sw.style.top=f;this.shadow.s1Div.style.top=f;this.shadow.pointer.style.top=f;this.shadow.s2Div.style.top=f;this.shadow.se.style.top=f;this.shadow.se.style.left=d+"px";var h=this.shadow.nw.height;var i=Math.floor(b/2);this.shadow.wDiv.style.height=c+"px";this.shadow.wDiv.style.left=h+"px";this.shadow.wDiv.style.width=i+"px";this.shadow.w.style.left=c-this.shadow.w.width+80+"px";var k=this.shadow.nw.height+a+70;this.shadow.eDiv.style.height=c+"px";this.shadow.eDiv.style.left=k+"px";this.shadow.eDiv.style.width=b+"px";this.shadow.e.style.left=c-this.shadow.w.width+80+"px";var n=h+i;this.shadow.cDiv.style.width=k-n+"px";this.shadow.cDiv.style.height=c+"px";this.shadow.cDiv.style.left=n+"px";this.shadow.nw.style.left=g+"px";this.shadow.nDiv.style.width=a-30+"px";this.shadow.nDiv.style.left=g+this.shadow.nw.width+"px";this.shadow.ne.style.left=d+g-30+"px"}
  457. ;C.prototype.setMaskSize=function(){this.maskPng.style.width=this.getTotalWidth()+"px";this.maskPng.style.height=this.getTotalHeight()+"px";var a=this.getTotalWidth();var b=this.getWindowHeight();var c=this.getTotalHeight();var d=this.window.pointer.offsetLeft;var e=d+this.window.pointer.width;var f=d+53;var g=d+4;var h=",";var i=this.getMaskMap();if(i){var k=i.firstChild;k.setAttribute("coords","0,0,0,"+b+h+f+h+b+h+g+h+c+h+e+h+b+h+a+h+b+h+a+",0")}}
  458. ;C.prototype.hide=function(){if(this.windowDiv){this.windowDiv.style.display="none"}this.shadowDiv.style.display="none"}
  459. ;C.prototype.show=function(){this.windowDiv.style.display="";this.shadowDiv.style.display="";this.windowDiv.style.visibility="visible";this.shadowDiv.style.visibility="visible";this.contentArea.style.visibility="visible"}
  460. ;C.prototype.isVisible=function(){return this.windowDiv&&this.windowDiv.style.display!="none"}
  461. ;C.prototype.positionAt=function(a,b,c){this.position={"x":a,"y":b};this.positionOffset=c;var d=this.calculatePointerOffset(this.width)+this.window.w.width+5;var e=this.height+this.window.n.height+this.window.s1.height;this.left=a-d;this.top=b-e;var f=0;var g=this.getTotalHeight()-this.getTotalShadowHeight();if(c){this.left+=c.width;this.top+=c.height;f-=Math.floor(c.height/2)-c.width+4;g-=Math.floor(c.height/2)-4}this.windowDiv.style.left=l(this.left);this.windowDiv.style.top=l(this.top);this.shadowDiv.style.left=l(this.left+f);this.shadowDiv.style.top=l(this.top+g)}
  462. ;C.prototype.calculatePointerOffset=function(a){return Math.floor(a/4)}
  463. ;C.prototype.createCroppingDiv=function(a){var b=window.document.createElement("div");b.style.overflow="hidden";b.style.position="absolute";b.style.width=a.width+"px";b.style.height=a.height+"px";b.style.left=a.style.left;b.style.top=a.style.top;b.style.zIndex=a.style.zIndex;a.style.left="0px";a.style.top="0px";b.appendChild(a);return b}
  464. ;C.prototype.createWindow=function(){this.window=new Object();this.window.nw=o.create(jc,25,25,0,0,0,false);this.window.n=o.create(hc,640,25,this.window.nw.width,0,0,true);this.window.ne=o.create(ic,25,25,0,0,0,false);this.window.w=o.create(wc,25,640,0,this.window.nw.height,0,true);this.window.c=o.create(ec,640,640,this.window.w.width,this.window.n.height,0,true);this.window.e=o.create(gc,25,640,0,this.window.ne.height,0,true);this.window.sw=o.create(vc,25,96,0,0,0,false);this.window.s1=o.create(lb,640,96,this.window.sw.width,0,0,true);this.window.pointer=o.create(kc,98,96,0,0,0,false);this.window.s2=o.create(lb,640,96,0,0,0,true);this.window.se=o.create(lc,25,96,0,0,0,false);this.windowDiv=window.document.createElement("div");this.windowDiv.style.position="absolute";this.windowDiv.style.left="0px";this.windowDiv.style.top="0px";this.windowDiv.className="noprint";j.bindDom(this.windowDiv,"mousedown",this,this.filterMouse);j.bindDom(this.windowDiv,"dblclick",this,this.filterMouse);this.windowDiv.appendChild(this.window.nw);this.windowDiv.appendChild(this.window.n);this.windowDiv.appendChild(this.window.ne);this.windowDiv.appendChild(this.window.w);this.windowDiv.appendChild(this.window.c);this.windowDiv.appendChild(this.window.e);this.windowDiv.appendChild(this.window.sw);this.windowDiv.appendChild(this.window.s1);this.windowDiv.appendChild(this.window.pointer);this.windowDiv.appendChild(this.window.s2);this.windowDiv.appendChild(this.window.se)}
  465. ;C.prototype.createShadow=function(){this.shadow=new Object();this.shadow.nw=o.create(qc,70,30,0,0,0,false);this.shadow.n=o.create(oc,640,30,this.shadow.nw.width,0,0,false);this.shadow.ne=o.create(pc,70,30,0,0,0,false);this.shadow.w=o.create(uc,360,280,0,this.shadow.nw.height,0,false);this.shadow.c=o.create(mc,640,640,this.shadow.w.width,this.shadow.n.height,0,false);this.shadow.e=o.create(nc,360,280,0,this.shadow.ne.height,0,false);this.shadow.sw=o.create(tc,70,60,0,0,0,false);this.shadow.s1=o.create(mb,320,60,this.shadow.sw.width,0,0,false);this.shadow.pointer=o.create(rc,140,60,0,0,0,false);this.shadow.s2=o.create(mb,320,60,0,0,0,false);this.shadow.se=o.create(sc,70,60,0,0,0,false);this.shadow.nDiv=this.createCroppingDiv(this.shadow.n);this.shadow.wDiv=this.createCroppingDiv(this.shadow.w);this.shadow.eDiv=this.createCroppingDiv(this.shadow.e);this.shadow.s1Div=this.createCroppingDiv(this.shadow.s1);this.shadow.s2Div=this.createCroppingDiv(this.shadow.s2);this.shadow.cDiv=this.createCroppingDiv(this.shadow.c);this.shadowDiv=window.document.createElement("div");this.shadowDiv.style.position="absolute";this.shadowDiv.style.left="0px";this.shadowDiv.style.top="0px";this.shadowDiv.className="noprint";this.shadowDiv.appendChild(this.shadow.nw);this.shadowDiv.appendChild(this.shadow.nDiv);this.shadowDiv.appendChild(this.shadow.ne);this.shadowDiv.appendChild(this.shadow.wDiv);this.shadowDiv.appendChild(this.shadow.cDiv);this.shadowDiv.appendChild(this.shadow.eDiv);this.shadowDiv.appendChild(this.shadow.sw);this.shadowDiv.appendChild(this.shadow.s1Div);this.shadowDiv.appendChild(this.shadow.pointer);this.shadowDiv.appendChild(this.shadow.s2Div);this.shadowDiv.appendChild(this.shadow.se)}
  466. ;C.prototype.hasMask=function(){return this.maskPng!=null}
  467. ;C.prototype.getMaskMap=function(){return document.getElementById(this.maskMapId)}
  468. ;var bd=p+"transparent.gif";var Bb=0;C.prototype.createMask=function(){var a=document.createElement("map");this.maskMapId="iwMap"+Bb;a.setAttribute("id",this.maskMapId);a.setAttribute("name",this.maskMapId);Bb++;this.windowDiv.appendChild(a);var b=document.createElement("area");b.setAttribute("shape","poly");b.setAttribute("coords","");b.setAttribute("href","javascript:void(0)");a.appendChild(b);for(var c=0;c<10;c++){var b=document.createElement("area");b.setAttribute("shape","poly");b.setAttribute("coords","");b.setAttribute("href","javascript:void(0)");a.appendChild(b)}this.maskPng=o.create(bd,0,0,0,0,0,false);this.windowDiv.appendChild(this.maskPng);this.maskPng.setAttribute("usemap","#"+this.maskMapId);this.nextMaskArea=1}
  469. ;C.prototype.addAreaToMaskMap=function(a,b){if(this.hasMask()){var c=this.getMaskMap();if(this.nextMaskArea<c.childNodes.length){var d=c.childNodes[this.nextMaskArea];d.setAttribute("coords",a.join(","));j.addBuiltInListener(d,"mousedown",b);this.nextMaskArea++}}}
  470. ;C.prototype.clearMaskMap=function(){if(this.hasMask()){var a=this.getMaskMap();for(var b=1;b<a.childNodes.length;b++){var c=a.childNodes[b];c.setAttribute("coords","");c.onmousedown=null}this.nextMaskArea=1}}
  471. ;C.prototype.getMaskLeft=function(){return this.windowDiv.offsetLeft}
  472. ;C.prototype.getMaskTop=function(){return this.windowDiv.offsetTop}
  473. ;C.prototype.createContentArea=function(){var a=window.document.createElement("DIV");a.style.position="absolute";a.style.left=l(15);a.style.top=l(15);a.style.zIndex=3;H(a,"auto");j.bindDom(a,"mousedown",this,eb);this.windowDiv.appendChild(a);this.contentArea=a;a=window.document.createElement("DIV");a.style.position="absolute";a.style.left=l(-screen.width);a.style.top=l(-screen.height);a.style.width=l(screen.width);a.style.height=l(screen.height);a.style.visibility="hidden";this.offscreenContainer=a;window.document.body.appendChild(a);a=window.document.createElement("DIV");a.style.position="absolute";a.style.left=l(15);a.style.top=l(15);a.style.zIndex=3;H(a,"auto");this.offscreenArea=a;j.bindDom(a,"mousedown",this,eb);this.offscreenContainer.appendChild(this.offscreenArea)}
  474. ;C.prototype.prepareOffscreen=function(a){if(this.windowDiv.style.display=="none"){this.windowDiv.style.display="";this.shadowDiv.style.display="";this.windowDiv.style.visibility="hidden";this.shadowDiv.style.visibility="hidden";this.contentArea.style.visibility="hidden";this.offscreenArea.style.visibility="hidden"}if(a){this.offscreenContainer.style.width=l(a)}}
  475. ;C.prototype.clearOffscreenArea=function(){Hb(this.offscreenArea)}
  476. ;C.prototype.flipOffscreenAndSize=function(){var a=this.offscreenArea;var b=Math.max(a.offsetWidth,183);var c=Math.max(a.offsetHeight,50);this.size={"w":b,"h":c};this.flipOffscreenArea(b,c);this.setContentSize(b,c)}
  477. ;C.prototype.sizeToContent=function(){var a=this.contentArea.offsetHeight;var b=this.contentArea.offsetWidth;if(u.type==2&&(b<10&&this.size)){b=this.size.w}this.setContentSize(Math.max(b,183),a)}
  478. ;C.prototype.flipOffscreenArea=function(a,b){this.windowDiv.replaceChild(this.offscreenArea,this.contentArea);this.offscreenContainer.appendChild(this.contentArea);var c=this.offscreenArea;this.offscreenArea=this.contentArea;this.contentArea=c;if(u.type==1&&(a&&b)){this.contentArea.style.width=l(a);this.contentArea.style.height=l(b)}this.offscreenArea.style.width="auto";this.offscreenArea.style.height="auto";this.contentArea.style.visibility="visible";this.clearOffscreenArea()}
  479. ;C.prototype.filterMouse=function(a){if(u.type==1){E(a)}else{var b=Aa(a,this.windowDiv);if(b.y<=this.getWindowHeight()){E(a)}}}
  480. ;var fc=p+"close.gif";C.prototype.createCloseButton=function(){this.closeButton=na.create(fc,14,13,null,null,4,null,null);this.closeButton.style.position="absolute";H(this.closeButton,"pointer");j.bindDom(this.closeButton,"click",this,this.onCloseClick);this.windowDiv.appendChild(this.closeButton)}
  481. ;C.prototype.onCloseClick=function(a){E(a);j.trigger(this,"closeclick")}
  482. ;C.prototype.checkSize=function(){if(!this.isVisible()){if(this.lastSize){this.lastSize=false}return}var a=this.contentArea.offsetWidth;var b=this.contentArea.offsetHeight;if(!this.lastSize||(this.lastWidth!=a||this.lastHeight!=b)){if(this.lastSize){this.sizeToContent();this.positionAt(this.position.x,this.position.y,this.positionOffset)}this.lastWidth=a;this.lastHeight=b;this.lastSize=true}}
  483. ;
  484.  
  485. function ma(a,b,c){this.maxZoomLevel=a;this.bounds=b;this.text=c}
  486. function ha(a,b){this.spec=a;this.zoomLevels=[];for(var c=0;c<this.spec.numZoomLevels;c++){this.zoomLevels.push([])}if(b){for(var c=0;c<b.length;c++){this.zoomLevels[b[c].maxZoomLevel].push(b[c])}this.sort()}}
  487. ha.fromCompact=function(a,b){var c=[];for(var d=0;d<b.length;d++){var e=b[d];var f=new D(e[1],e[2],e[3],e[4]);c.push(new ma(e[0],f,e[5]))}return new ha(a,c)}
  488. ;ha.prototype.addCopyright=function(a){this.zoomLevels[a.maxZoomLevel].push(a);this.sort(a.maxZoomLevel)}
  489. ;ha.prototype.sort=function(a){var b=function(d,e){return d.bounds.minX-e.bounds.minX}
  490. ;if(a||a==0){this.zoomLevels[a].sort(b);return}for(var c=0;c<this.zoomLevels.length;c++){this.zoomLevels[c].sort(b)}}
  491. ;ha.prototype.getCopyrights=function(a,b){var c=new qa();var d=[];for(var e=b;e<this.zoomLevels.length;e++){var f=this.zoomLevels[e];var g=false;for(var h=0;h<f.length;h++){var i=f[h];if(i.bounds.minX>a.maxX){break}if(i.bounds.intersectsLatLng(a)){if(i.text&&!c.contains(i.text)){d.push(i.text);c.add(i.text)}if(i.bounds.containsBounds(a)){g=true}}}if(g){break}}return d}
  492. ;
  493.  
  494. var Ja=_mNavteq;var Bc=_mTeleAtlas;var Cc=_mZenrin;var Ya=[new ma(14,new D(-125.241,22.031,-62.71,49.093),Ja),new ma(14,new D(-141.157,41.468,-50.844,83.656),Ja),new ma(14,new D(-67.277,17.88,-65.175,18.523),Ja),new ma(14,new D(-180,51.078,-129.756,71.484),Ja),new ma(14,new D(-10.649,49.781,2.593,59.687),Bc),new ma(14,new D(123.748627,23.8833326,143.789063,46.072278),Cc)];
  495.  
  496. var Ea=new q(-98.35,39.5);var cc=ra;var dc=p+"water.gif";var Ua=[131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8];function S(a,b){this.tileSize=128;this.backgroundColor="#f2efe9";this.emptyTileUrl=cc;this.waterTileUrl=dc;this.baseUrl=F.getTileBaseUrl(a,"http://mt.google.com/mt",b);this.numZoomLevels=Ua.length;this.pixelsPerDegree=[];for(var c=0;c<this.numZoomLevels;c++){var d=Ua[c];this.pixelsPerDegree.push(new q(d*0.77162458338772,d))}this.mapBounds=[];for(var c=0;c<9;c++){this.mapBounds.push(new D(-T,-T,T,T))}for(var c=9;c<this.pixelsPerDegree.length;c++){var e=this.getTileCoordinate(85,-179.5,c);var f=this.getTileCoordinate(12,-50,c);this.mapBounds.push(new D(e.x,e.y,f.x,f.y))}this.ukBounds=[];for(var c=0;c<this.pixelsPerDegree.length;c++){var e=this.getTileCoordinate(61.04,-10.71,c);var f=this.getTileCoordinate(49.77,1.84,c);this.ukBounds.push(new D(e.x,e.y,f.x,f.y))}this.earthBounds=[];for(var c=0;c<this.pixelsPerDegree.length;c++){var e=this.getTileCoordinate(90,-180,c);var f=this.getTileCoordinate(-90,180,c);this.earthBounds.push(new D(e.x,e.y,f.x,f.y))}}
  497. S.prototype.adjustBitmapX=function(a,b){var c=Math.floor(360*this.pixelsPerDegree[b].x);var d=-(c>>1);var e=d+c;while(a<d){a+=c}while(a>=e){a-=c}return a}
  498. ;S.prototype.getBitmapCoordinate=function(a,b,c,d){if(!d)d=new q(0,0);var e=b-Ea.x;e-=Math.floor((e+180)/360)*360;var f=Ea.y-a;d.x=Math.floor(e*this.pixelsPerDegree[c].x);d.y=Math.floor(f*this.pixelsPerDegree[c].y);return d}
  499. ;S.prototype.getLatLng=function(a,b,c,d){if(!d)d=new q(0,0);d.x=a/this.pixelsPerDegree[c].x+Ea.x;d.y=Ea.y-b/this.pixelsPerDegree[c].y;while(d.x<-180)d.x+=360;while(d.x>180)d.x-=360;return d}
  500. ;S.prototype.getTileCoordinate=function(a,b,c){var d=this.getBitmapCoordinate(a,b,c);d.x=Math.floor(d.x/this.tileSize);d.y=Math.floor(d.y/this.tileSize);return d}
  501. ;S.prototype.getTileURL=function(a,b,c){var d=this.earthBounds[c];if(b<=d.minY||b>=d.maxY){return this.emptyTileUrl}var e=this.mapBounds[c];var f=this.ukBounds[c];if((a<e.minX||(a>e.maxX||(b<e.minY||b>e.maxY)))&&(a<f.minX||(a>f.maxX||(b<f.minY||b>f.maxY)))){return this.waterTileUrl}return this.baseUrl+"x="+a+"&y="+b+"&zoom="+c}
  502. ;S.prototype.hasOverlay=function(){return false}
  503. ;S.prototype.getLowestZoomLevel=function(a,b,c){var d=c.width;var e=c.height;for(var f=0;f<this.pixelsPerDegree.length;f++){if(this.pixelsPerDegree[f].x*b.width<=d&&this.pixelsPerDegree[f].y*b.height<=e){return f}}return this.pixelsPerDegree.length-1}
  504. ;S.prototype.getPixelsPerDegree=function(a){return this.pixelsPerDegree[a]}
  505. ;S.prototype.getLinkText=function(){return _mNormalMap}
  506. ;S.prototype.getShortLinkText=function(){return _mNormalMapShort}
  507. ;S.prototype.getURLArg=function(){return null}
  508. ;S.prototype.getCopyright=function(a){if(!this.copyrights){this.copyrights=new ha(this,Ya)}if(a.isLoaded()){var b=this.copyrights.getCopyrights(a.getBoundsLatLng(),a.zoomLevel);if(b.length==0){return""}else if(b.length==1&&b[0]==_mZenrin){return _mZenrinCopy+b[0]}else{return _mDataCopy+b.join(", ")}}else{return""}}
  509. ;S.prototype.zoomBitmapCoord=function(a,b,c){var d=new q();var e=Math.pow(2,b-a);d.x=Math.round(c.x*e);d.y=Math.round(c.y*e);return d}
  510. ;
  511.  
  512. var ob="http://mt.google.com/mt";var Hc=ra;var Ic=p+"water.gif";function x(a,b){this.tileSize=256;this.backgroundColor="#e5e3df";this.emptyTileUrl=Hc;this.waterTileUrl=Ic;this.numZoomLevels=18;this.baseUrl=F.getTileBaseUrl(a,ob,b);this.initMercator()}
  513. x.prototype.initMercator=function(){this.pixelsPerLonDegree=[];this.pixelsPerLonRadian=[];this.bitmapOrigo=[];this.numTiles=[];var a=256;for(var b=this.numZoomLevels-1;b>=0;--b){this.pixelsPerLonDegree[b]=a/360;this.pixelsPerLonRadian[b]=a/Wc;var c=a/2;this.bitmapOrigo[b]=new q(c,c);this.numTiles[b]=a/256;a*=2}}
  514. ;x.prototype.adjustBitmapX=function(a,b){var c=Math.floor(360*this.pixelsPerLonDegree[b]);var d=0;var e=d+c;while(a<d){a+=c}while(a>=e){a-=c}return a}
  515. ;x.prototype.getBitmapCoordinate=function(a,b,c,d){if(!d){d=new q(0,0)}d.x=Math.floor(this.bitmapOrigo[c].x+b*this.pixelsPerLonDegree[c]);var e=Math.sin(Ta(a));if(e>0.9999){e=0.9999}if(e<-0.9999){e=-0.9999}d.y=Math.floor(this.bitmapOrigo[c].y+0.5*Math.log((1+e)/(1-e))*-this.pixelsPerLonRadian[c]);return d}
  516. ;x.prototype.getLatLng=function(a,b,c,d){if(!d){d=new q(0,0)}d.x=(a-this.bitmapOrigo[c].x)/this.pixelsPerLonDegree[c];var e=(b-this.bitmapOrigo[c].y)/-this.pixelsPerLonRadian[c];d.y=(2*Math.atan(Math.exp(e))-Math.PI/2)/tb;return d}
  517. ;x.prototype.getTileCoordinate=function(a,b,c){var d=this.getBitmapCoordinate(a,b,c);d.x=Math.floor(d.x/this.tileSize);d.y=Math.floor(d.y/this.tileSize);return d}
  518. ;x.prototype.isInTileBoundsY=function(a,b){return 0<=a&&a<this.numTiles[b]}
  519. ;x.prototype.getTileURL=function(a,b,c){if(!this.isInTileBoundsY(b,c)){return this.emptyTileUrl}var d=a;if(a<0||this.numTiles[c]<=a){d=a%this.numTiles[c];if(d<0){d+=this.numTiles[c]}}return this.baseUrl+"x="+d+"&y="+b+"&zoom="+c}
  520. ;x.prototype.hasOverlay=function(){return false}
  521. ;x.prototype.getLowestZoomLevel=function(a,b,c){var d=c.width/2;var e=c.height/2;for(var f=0;f<this.numZoomLevels;f++){var g=this.getBitmapCoordinate(a.y,a.x,f);var h=this.getLatLng(g.x-d,g.y-e,f);var i=this.getLatLng(g.x+d,g.y+e,f);var k=i.x-h.x;var n=h.y-i.y;if(b.width<=k&&b.height<=n){return f}}return this.numZoomLevels-1}
  522. ;x.prototype.getPixelsPerDegree=function(a){return new q(this.pixelsPerLonDegree[a],this.pixelsPerLonDegree[a]*2)}
  523. ;x.prototype.getLinkText=function(){return _mNormalMap}
  524. ;x.prototype.getShortLinkText=function(){return _mNormalMapShort}
  525. ;x.prototype.getURLArg=function(){return null}
  526. ;x.prototype.getCopyright=function(a){if(!this.copyrights){this.copyrights=new ha(this,Ya)}if(a.isLoaded()){var b=this.copyrights.getCopyrights(a.getBoundsLatLng(),a.zoomLevel);if(b.length==0){return""}else if(b.length==1&&b[0]==_mZenrin){return _mZenrinCopy+b[0]}else{return _mDataCopy+b.join(", ")}}else{return""}}
  527. ;x.prototype.zoomBitmapCoord=function(a,b,c){var d=new q();var e=Math.pow(2,b-a);d.x=Math.round(c.x*e);d.y=Math.round(c.y*e);return d}
  528. ;
  529.  
  530. var U="State of New Jersey";var ba="MassGIS, Commonwealth of Massachusetts EOEA";var r="New York GIS";var Wa="The GeoInformation Group";var nb=[[5,139.55,35.53,139.93,35.82,Wa],[5,4.87,52.37,4.9,52.39,Wa],[5,28.05,-26.27,28.07,-26.25,Wa],[5,-157.9,21.25,-157.78,21.33,"City & County of Honolulu, Hawaii"],[5,-79.14,35.86,-79.06,35.98,"City Of Carborro"],[5,-122.26,37.33,-122.18,37.4,"Town of Portola Valley"],[5,-75.15,41,-74.56,41.37,U],[5,-74.58,41,-73.87,41.32,U],[5,-75.21,40.71,-73.87,41.02,U],[5,-75.23,40.53,-74.56,40.73,U],[5,-74.58,40.53,-74,40.73,U],[5,-75.08,40.25,-74.56,40.55,U],[5,-74.58,40.25,-73.97,40.55,U],[5,-75.15,39.9,-73.99,40.26,U],[5,-75.49,39.72,-74.63,39.92,U],[5,-74.65,39.72,-74.06,39.92,U],[5,-75.57,39.51,-74.79,39.74,U],[5,-74.81,39.52,-74.12,39.74,U],[5,-75.55,39.28,-74.79,39.53,U],[5,-74.81,39.29,-74.24,39.53,U],[5,-75.25,39.13,-74.54,39.3,U],[5,-74.98,38.91,-74.7,39.15,U],[5,-74,42.56,-73.67,42.83,r],[5,-77.97,42.11,-77.91,42.14,r],[5,-76.12,42.01,-75.77,42.22,r],[5,-78.78,42.02,-78.33,42.2,r],[5,-76.98,42.01,-76.76,42.21,r],[5,-75.56,42.49,-75.46,42.59,r],[5,-73.59,44.62,-73.37,44.75,r],[5,-73.81,42.23,-73.75,42.29,r],[5,-76.24,42.56,-76.12,42.66,r],[5,-79.12,42.61,-78.57,43.09,r],[5,-74.13,44.28,-74.08,44.35,r],[5,-74.42,42.98,-74.3,43.08,r],[5,-78.22,42.98,-78.13,43.03,r],[5,-73.81,42.25,-73.78,42.29,r],[5,-75.23,42.99,-75.03,43.13,r],[5,-75.04,42.99,-74.83,43.07,r],[5,-76.06,43.93,-75.72,44.1,r],[5,-77.83,42.54,-77.67,42.82,r],[5,-77.98,43,-77.36,43.34,r],[5,-74.28,42.79,-74.07,42.98,r],[5,-73.78,40.57,-73.4,40.93,r],[5,-79.09,43.01,-78.6,43.28,r],[5,-75.89,42.86,-75.06,43.63,r],[5,-76.39,42.96,-75.92,43.25,r],[5,-77.32,42.83,-76.96,43.02,r],[5,-74.27,41.41,-74.11,41.58,r],[5,-74.13,41.4,-73.95,41.61,r],[5,-74.25,41.29,-74.12,41.36,r],[5,-74.38,41.23,-74.33,41.28,r],[5,-74.36,41.38,-74.3,41.42,r],[5,-74.46,41.4,-74.39,41.49,r],[5,-74.4,41.42,-74.34,41.5,r],[5,-74.73,41.35,-74.66,41.4,r],[5,-78.43,43.2,-78.16,43.26,r],[5,-74.1,42.77,-73.58,43.31,r],[5,-74.31,42.71,-73.79,42.96,r],[5,-74.59,42.62,-74.17,42.8,r],[5,-76.99,42.84,-76.77,42.93,r],[5,-77.16,42.1,-77.02,42.18,r],[5,-77.35,42.32,-77.29,42.36,r],[5,-77.69,42.31,-77.64,42.36,r],[5,-73.5,40.6,-73.27,40.96,r],[5,-73.29,40.62,-73.09,40.98,r],[5,-73.11,40.65,-72.89,40.98,r],[5,-72.91,40.71,-72.65,40.98,r],[5,-72.68,40.79,-72.41,41.1,r],[5,-72.43,40.85,-72.15,41.17,r],[5,-72.17,40.94,-71.84,41.13,r],[5,-72.05,41.25,-71.9,41.31,r],[5,-74.75,41.6,-74.56,41.72,r],[5,-76.29,42.02,-76.1,42.16,r],[5,-73.73,43.39,-73.62,43.58,r],[5,-73.73,43.26,-73.59,43.4,r],[5,-73.64,43.25,-73.53,43.51,r],[6,-71.16,42.35,-71.06,42.41,ba],[6,-70.96,41.28,-70.43,41.54,ba],[6,-72.07,42.01,-71.34,42.73,ba],[6,-71.39,42.37,-70.56,42.91,ba],[6,-71.39,42.13,-70.66,42.39,ba],[6,-71.39,41.77,-70.49,42.15,ba],[6,-71.36,41.46,-70.56,41.81,ba],[6,-70.58,41.51,-69.89,41.8,ba],[6,-70.27,41.74,-69.9,42.11,ba],[6,-70.65,41.53,-70.5,41.86,ba],[6,-73.54,41.95,-72.02,42.76,ba],[6,-70.34,41.2,-69.91,41.43,ba],[5,-102.03,34.99,-101.6,35.39,null],[5,-150.13,60.98,-149.39,61.39,null],[5,-77.1,38.81,-76.17,39.65,null],[5,-87.13,33.24,-86.62,33.63,null],[5,-119.89,38.99,-119.6,39.26,null],[5,-85.53,34.85,-85.24,35.27,null],[5,-88.25,42.22,-88.02,42.63,null],[5,-88.51,41.84,-88.02,42.24,null],[5,-88.51,41.63,-88.01,41.86,null],[5,-88.52,41.24,-88.01,41.65,null],[5,-88.52,42.22,-88.22,42.63,null],[5,-87.89,42.62,-87.76,42.76,null],[5,-88.05,42.23,-87.77,42.63,null],[5,-88.04,41.85,-87.76,42.24,null],[5,-87.79,41.85,-87.58,42.18,null],[5,-88.04,41.63,-87.76,41.86,null],[5,-87.78,41.63,-87.55,41.87,null],[5,-87.57,41.64,-87.38,41.77,null],[5,-88.03,41.43,-87.71,41.65,null],[5,-87.73,41.43,-87.42,41.65,null],[5,-87.42,41.43,-87.11,41.66,null],[5,-88.03,41.24,-87.69,41.46,null],[5,-87.71,41.24,-87.38,41.46,null],[5,-87.4,41.24,-87.11,41.46,null],[5,-87.44,41.43,-87.4,41.66,null],[5,-84.94,38.84,-84.07,39.56,null],[5,-82.19,40.85,-80.96,41.86,null],[5,-105.04,38.68,-104.55,39.14,null],[5,-83.32,39.67,-82.54,40.33,null],[5,-97.41,33.06,-96.35,33.26,null],[5,-97.45,32.94,-96.35,33.12,null],[5,-97.62,32.41,-97.42,33,null],[5,-97.45,32.82,-96.36,33.01,null],[5,-97.45,32.67,-96.36,32.87,null],[5,-97.46,32.51,-96.37,32.72,null],[5,-97.46,32.39,-96.37,32.55,null],[5,-106.64,31.62,-106.24,32.02,null],[5,-120.02,36.61,-119.61,37.01,null],[5,-95.91,29.47,-95.62,30.02,null],[5,-95.67,29.75,-95.27,30.15,null],[5,-95.66,29.45,-95.26,29.77,null],[5,-95.3,29.89,-94.98,30.28,null],[5,-95.29,29.42,-94.86,29.91,null],[5,-81.92,29.82,-81.32,30.7,null],[5,-96.9,40.61,-96.47,41.01,null],[5,-118.93,33.44,-117.46,34.41,null],[5,-102.15,33.36,-101.73,33.77,null],[5,-80.58,25.37,-80.02,27.04,null],[5,-93.82,44.59,-92.81,45.42,null],[5,-121.14,37.48,-120.74,37.89,null],[5,-75.94,39.52,-74.54,40.44,null],[5,-71.65,41.61,-71.22,42.02,null],[5,-79.14,35.86,-78.74,36.13,null],[5,-79.03,35.61,-78.75,35.88,null],[5,-78.77,35.61,-78.48,36.01,null],[5,-120.02,39.57,-119.64,39.73,null],[5,-120.01,39.44,-119.66,39.59,null],[5,-119.88,39.32,-119.67,39.46,null],[5,-119.88,39.2,-119.73,39.33,null],[5,-121.77,38.61,-120.98,39.01,null],[5,-121.63,38.24,-121.11,38.63,null],[5,-117.68,33.72,-116.84,34.28,null],[5,-117.67,32.6,-116.79,33.5,null],[5,-122.63,46.99,-122.35,47.86,null],[5,-122.4,46.99,-121.99,47.43,null],[5,-122.63,46.99,-122.35,47.86,null],[5,-122.63,46.99,-121.98,48.01,null],[5,-122.63,37.77,-121.61,38.25,null],[5,-122.55,37.12,-121.61,37.78,null],[5,-93.88,32.24,-93.48,32.63,null],[5,-121.52,37.86,-121.11,38.14,null],[5,-72.18,41.99,-71.56,42.52,null],[5,-122.53,37.76,-121.86,37.79,null],[5,-105.64,40,-104.92,40.27,null],[5,-104.95,39.18,-104.48,40.08,null],[5,-104.5,39.72,-104.23,39.83,null],[5,-105.52,39.37,-104.94,40.02,null],[5,-105.44,39.15,-105.13,39.38,null],[5,-83.65,42.3,-83.1,42.77,null],[5,-83.65,42.11,-83.11,42.33,null],[5,-83.19,42.25,-82.84,42.76,null],[5,-82.89,42.5,-82.61,42.76,null],[5,-85.39,40.86,-84.96,41.26,null],[5,-97.77,35.23,-97.23,35.76,null],[5,-90.77,38.36,-90.1,38.9,null],[5,-106.89,34.86,-106.37,35.26,null],[5,-84.77,33.92,-83.87,34.15,null],[5,-84.77,33.72,-83.86,33.98,null],[5,-84.76,33.5,-83.86,33.78,null],[5,-84.76,33.35,-83.86,33.56,null],[5,-97.88,30.12,-97.61,30.5,null],[5,-91.26,30.23,-90.86,30.77,null],[5,-81.07,34.99,-80.53,35.51,null],[5,-99.21,32.08,-99.1,32.17,null],[5,-86.76,34.5,-86.5,34.63,null],[5,-86.87,34.62,-86.38,34.88,null],[5,-90.4,32.11,-89.97,32.51,null],[5,-84.27,35.73,-83.74,36.14,null],[5,-86.01,37.99,-85.35,38.51,null],[5,-86.5,32.24,-86.13,32.51,null],[5,-81.64,28.37,-81.11,28.88,null],[5,-123.13,45.24,-122.36,45.76,null],[5,-93.88,32.24,-93.48,32.63,null],[5,-111.13,32,-110.62,32.51,null],[5,-77.07,38.62,-76.73,39.14,null],[5,-77.4,38.61,-77.04,39.13,null],[5,-77.64,38.74,-77.37,39.14,null],[6,-117.07,46.99,-116.14,47.44,null],[6,-114.13,42.52,-112.83,43.82,null],[6,-115.09,43.05,-113.81,44.07,null],[6,-117.07,47.79,-115.98,48.88,null],[6,-117.07,48.37,-115.97,49.01,null],[6,-117.07,43.22,-116.32,43.94,null],[6,-116.32,42.82,-115.44,43.82,null],[6,-116.76,43.66,-116,44.57,null],[6,-115.15,42.53,-114.51,43.26,null],[6,-114.65,42.41,-113.77,42.88,null],[6,-117.07,47.28,-116.26,48,null],[6,-117.07,46.47,-116.28,47.19,null],[6,-116.76,45.87,-115.97,46.5,null],[6,-117.07,45.79,-116.28,46.69,null],[6,-116.58,41.87,-115.7,43.32,null],[6,-115.9,41.91,-114.9,43.01,null],[6,-117.07,41.89,-116.32,43.69,null],[6,-117.07,43.74,-116.32,44.19,null],[6,-116.03,46.82,-114.8,48,null],[6,-116.39,46.87,-115.84,48.13,null],[6,-115.1,41.84,-113.96,42.94,null],[6,-115.66,44.08,-114.61,45.27,null],[6,-116.26,44.08,-115.36,45.26,null],[6,-117.26,44.06,-116.12,44.88,null],[6,-98.64,29.59,-96.48,30.48,null],[6,-99.01,30.33,-96.72,31.14,null],[6,-114.03,41.11,-111.65,42.03,null],[6,-112.26,41.25,-111.24,42.01,null],[6,-111.07,39.37,-109.92,39.88,null],[6,-112.26,40.69,-111.58,41.2,null],[6,-112.52,37.43,-111.23,38.2,null],[6,-112.89,36.93,-111.93,37.57,null],[6,-111.94,40.62,-111.27,41.26,null],[6,-111.51,40.99,-110.83,42,null],[6,-112.32,40.24,-111.48,41.01,null],[6,-111.63,40.43,-110.96,41.19,null],[6,-112.83,39.86,-111.99,40.76,null],[6,-112.2,39.74,-111.2,40.63,null],[6,-111.57,40.25,-111.24,40.75,null],[6,-112.26,41,-111.59,41.51,null],[6,-91.04,47.4,-89.5,48.26,null],[6,-88.15,37.68,-87.57,38.95,null],[6,-87.67,38.94,-86.78,40,null],[6,-87.69,38.06,-86.8,39.01,null],[6,-86.95,38.81,-86.23,39.88,null],[6,-86.92,37.75,-86.24,38.88,null],[6,-86.45,38.87,-85.7,40.01,null],[6,-86.44,37.87,-85.71,38.95,null],[6,-85.9,38.93,-85.24,39.83,null],[6,-85.9,38.06,-85.26,39.03,null],[6,-85.42,39.24,-84.68,40.02,null],[6,-87.58,40.73,-86.86,41.75,null],[6,-87.57,39.5,-86.9,40.82,null],[6,-87.09,40.43,-86.16,41.82,null],[6,-87.07,39.43,-86.17,40.51,null],[6,-86.4,40.42,-85.59,41.83,null],[6,-86.39,39.25,-85.54,40.51,null],[6,-85.73,40.67,-85.1,41.82,null],[6,-85.75,39.32,-85.1,40.76,null],[6,-85.28,40.67,-84.66,41.82,null],[6,-85.28,39.48,-84.67,40.76,null],[6,-95.76,39.75,-94.68,40.65,null],[6,-93.43,37.91,-91.87,39.16,null],[6,-92.13,37.85,-90.58,39.13,null],[6,-90.84,37.79,-89.72,39.12,null],[6,-94.66,37.16,-93.28,38.31,null],[6,-93.5,37.07,-91.98,38.13,null],[6,-92.22,37.08,-90.82,38.07,null],[6,-91.05,36.97,-89.63,38.06,null],[6,-89.97,36.85,-88.98,37.95,null],[6,-94.65,36.35,-93.28,37.34,null],[6,-93.42,36.33,-91.78,37.4,null],[6,-94.88,39.69,-93.67,40.65,null],[6,-90.51,36.27,-89.02,37.24,null],[6,-90.54,36.27,-89.01,37.39,null],[6,-90.39,35.81,-89.14,36.53,null],[6,-93.99,39.64,-92.37,40.64,null],[6,-92.66,39.53,-91.01,40.64,null],[6,-95.19,38.93,-93.78,39.92,null],[6,-94.08,38.88,-92.44,39.91,null],[6,-92.71,38.88,-91.02,39.95,null],[6,-91.27,38.84,-90.37,39.69,null],[6,-94.7,38.01,-93.15,39.11,null],[6,-103.02,36.34,-101.89,37.09,null],[6,-102.15,36.33,-99.96,37.1,null],[6,-95.28,33.51,-94.28,33.88,null],[7,-180,-90,180,90,"DigitalGlobe"],[12,-180,-90,180,90,"EarthSat"]];
  531.  
  532. var Ha=new q(-180,180);var Ga=ra;var Va="http://kh.google.com/kh?";function z(a,b,c,d,e,f){this.japanDatumHack=f;this.tileSize=256;this.backgroundColor=d?"#e5e3df":"#f2efe9";this.emptyTileUrl=Ga;this.numZoomLevels=d?18:15;this.pixelsPerDegree=[];for(var g=0;g<this.numZoomLevels;g++){var h=Math.pow(2,8+this.numZoomLevels-g-1)/360;this.pixelsPerDegree.push(new q(h,h))}this.earthBounds=[];for(var g=0;g<this.pixelsPerDegree.length;++g){var i=this.getTileCoordinate(90,-180,g);var k=this.getTileCoordinate(-90,180,g);if(g>=16){k.y+=1}this.earthBounds.push(new D(i.x,i.y,k.x,k.y))}var n;if(b){n="http://kh."+b+"/kh"}else{n=Va}this.baseUrl=F.getTileBaseUrl(a,n,c);if(e){if(b&&this.testCookie(b)){document.cookie="khcookie="+e+"; domain=."+b+"; path=/kh;"}else{this.baseUrl+="cookie="+e+"&"}}this.isNew=true}
  533. z.prototype.testCookie=function(a){try{document.cookie="testcookie=1; domain=."+a;var b=document.cookie.indexOf("testcookie")!=-1;if(b){document.cookie="testcookie=; domain=."+a+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}return b}catch(c){B.dump(c)}return false}
  534. ;z.prototype.adjustBitmapX=function(a,b){var c=180*this.pixelsPerDegree[b].x;while(a<-c){a+=2*c}while(a>=c){a-=2*c}return a}
  535. ;z.prototype.getBitmapCoordinate=function(a,b,c,d){if(this.japanDatumHack&&(a>30&&(a<50&&(b>115&&b<152)))){a+=0.003236111111111111;b+=-0.0032027777777777775}return this.getBitmapCoordinateWGS84(a,b,c,d)}
  536. ;z.prototype.getBitmapCoordinateWGS84=function(a,b,c,d){if(!d){d=new q(0,0)}var e=b-Ha.x;e-=Math.floor((e+180)/360)*360;var f=Ha.y-a;d.x=Math.floor(e*this.pixelsPerDegree[c].x);d.y=Math.floor(f*this.pixelsPerDegree[c].y);return d}
  537. ;z.prototype.getLatLngWGS84=function(a,b,c,d){if(!d){d=new q(0,0)}d.x=a/this.pixelsPerDegree[c].x+Ha.x;d.y=Ha.y-b/this.pixelsPerDegree[c].y;while(d.x<-180)d.x+=360;while(d.x>180)d.x-=360;return d}
  538. ;z.prototype.getLatLng=function(a,b,c,d){if(!d){d=new q(0,0)}d=this.getLatLngWGS84(a,b,c,d);if(this.japanDatumHack&&(d.y>30&&(d.y<50&&(d.x>115&&d.x<152)))){d.y-=0.003236111111111111;d.x-=-0.0032027777777777775}return d}
  539. ;z.prototype.isInTileBoundsY=function(a,b){var c=this.earthBounds[b];return a>=c.minY&&a<c.maxY}
  540. ;z.prototype.getTileURL=function(a,b,c){if(!this.isInTileBoundsY(b,c)){return this.emptyTileUrl}var d=Math.pow(2,this.numZoomLevels-c-1);if(b<0||d-1<b){return this.emptyTileUrl}if(a<0||d-1<a){a=a%d;if(a<0)a+=d}var e="t";for(var f=this.numZoomLevels-2;f>=c;f--){d=d/2;if(b<d){if(a<d){e+="q"}else{e+="r";a-=d}}else{if(a<d){e+="t";b-=d}else{e+="s";a-=d;b-=d}}}return this.baseUrl+"t="+e}
  541. ;z.prototype.hasOverlay=function(){return false}
  542. ;z.prototype.getTileCoordinate=function(a,b,c){var d=this.getBitmapCoordinateWGS84(a,b,c);d.x=Math.floor(d.x/this.tileSize);d.y=Math.floor(d.y/this.tileSize);return d}
  543. ;z.prototype.getLowestZoomLevel=function(a,b,c){var d=c.width;var e=c.height;for(var f=0;f<this.numZoomLevels;f++){if(this.pixelsPerDegree[f].x*b.width<d&&this.pixelsPerDegree[f].y*b.height<e){return f}}return this.numZoomLevels-1}
  544. ;z.prototype.getPixelsPerDegree=function(a){return this.pixelsPerDegree[a]}
  545. ;z.prototype.getLinkText=function(){return _mKeyholeMap}
  546. ;z.prototype.getShortLinkText=function(){return _mKeyholeMapShort}
  547. ;z.prototype.getURLArg=function(){return"k"}
  548. ;z.prototype.getCopyright=function(a){if(!this.copyrights){this.copyrights=ha.fromCompact(this,nb)}if(a.isLoaded()){var b=this.copyrights.getCopyrights(a.getBoundsLatLng(),a.zoomLevel);if(b.length==0){return""}else{return _mKeyholeCopy+b.join(", ")}}else{return""}}
  549. ;z.prototype.getTextColor=function(){return"white"}
  550. ;z.prototype.getLinkColor=function(){return"white"}
  551. ;z.prototype.zoomBitmapCoord=function(a,b,c){var d=new q();var e=Math.pow(2,b-a);d.x=Math.round(c.x*e);d.y=Math.round(c.y*e);return d}
  552. ;
  553.  
  554. function I(a,b,c,d,e){this.japanDatumHack=e;this.tileSize=256;this.backgroundColor="#e5e3df";this.emptyTileUrl=Ga;