// Copyright 2005 Google function GMapsNamespace() { function tb(a,b,c){this.type=a;this.version=b;this.os=c} ;var v=new tb(0,0,null);var V=navigator.userAgent.toLowerCase();if(V.indexOf("opera")!=-1){v.type=4;if(V.indexOf("opera/7")!=-1||V.indexOf("opera 7")!=-1){v.version=7}else if(V.indexOf("opera/8")!=-1||V.indexOf("opera 8")!=-1){v.version=8}}else if(V.indexOf("msie")!=-1&&document.all){v.type=1;if(V.indexOf("msie 5")){v.version=5}}else if(V.indexOf("safari")!=-1){v.type=3}else if(V.indexOf("mozilla")!=-1){v.type=2}if(V.indexOf("x11;")!=-1){v.os=1}else if(V.indexOf("macintosh")!=-1){v.os=2} var P=Number.MAX_VALUE;function sa(a,b,c){var d=window.setTimeout(function(){b.apply(a)} ,c);return d} function Kc(a,b,c){var d=window.setInterval(function(){b.apply(a)} ,c);return d} function la(a){return a.replace(/&/g,"&").replace(//g,">")} function Tc(a){return la(a).replace(/\"/g,""")} Array.prototype.clear=function(){while(this.length>0)this.pop()} ;document.getElementsByClassName=function(a){var b=document.all;if(!b)b=document.getElementsByTagName("*");var c=[];for(var d=0;d0){var e=[];for(var f=2;f=0;b--)this.add(a[b])}} ma.prototype.add=function(a){if(!this.contains(a)){this[":"+a]=1;this.size++}} ;ma.prototype.remove=function(a){if(this.contains(a)){delete this[":"+a];this.size--}} ;ma.prototype.contains=function(a){return this[":"+a]==1} ;function ta(){return false} function fb(a){if(!a){if(Error){throw"assertion failed: "+Error().stack;}else{throw"assertion failed";}}} function Z(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(v.type==2){j.bindDom(window,"mouseout",this,this.onWindowMouseOut)}this.eventSrc=this.src.setCapture?this.src:window;j.addBuiltInListener(this.src,"mousedown",this.mouseDownHandler)} Z.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")}} ;Z.prototype.onMouseDown=function(a){j.trigger(this,"mousedown");if(a.cancelDrag){return}var b=a.button==0||a.button==1;if(this.disabled||!b){A(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;C(this.src,"move");A(a)} ;Z.prototype.onMouseMove=function(a){if(v.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)} ,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(bh){f=h}}d=f-b;b=f;var g=c;if(ci)g=i}e=g-c;c=g}this.moveTo(b,c);this.dragPoint.x=a.clientX+d;this.dragPoint.y=a.clientY+e;j.trigger(this,"drag")} ;Z.prototype.onMouseUp=function(a){j.removeBuiltInListener(this.eventSrc,"mousemove",this.mouseMoveHandler);j.removeBuiltInListener(this.eventSrc,"mouseup",this.mouseUpHandler);this.dragging=false;C(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)}} ;Z.prototype.onWindowMouseOut=function(a){if(!a.relatedTarget&&this.dragging){this.onMouseUp(a)}} ;Z.prototype.disable=function(){this.disabled=true} ;Z.prototype.enable=function(){this.disabled=false} var p="http://www.google.com/mapfiles/";var eb="http://maps.google.com";var ja=p+"transparent.gif";var Ea=["q","ll","sll","spn","sspn","vp","z","t","output","deb","f","file","saddr","daddr","near","stat_m","key"];function E(){this.args=new Object();this.reset()} E.prototype.setValue=function(a,b){this.args[a]=b} ;E.prototype.setQueryValue=function(a,b){var c=b.replace(/^\s*|\s*$/g,"");this.setValue(a,c)} ;E.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())} ;E.prototype.getLatLngArg=function(a){return Ha(a.y)+","+Ha(a.x)} ;E.prototype.getSpanArg=function(a){return Ha(a.height)+","+Ha(a.width)} ;E.prototype.reset=function(){for(var a=0;a0){b.push(window._sf)}var e="/maps";if(b.length>0)e+="?"+b.join("&");if(a)return eb+e;return e} ;E.prototype.beautify=function(a){return a.replace(/%20/g,"+").replace(/%2C/gi,",")} ;E.getFileURL=function(a){var b=new E();b.setValue("file",a);return b.getURL()} ;E.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 h=a.map.spec.zoomBitmapCoord(f+1,f,e);var g=a.map.spec.zoomBitmapCoord(f+1,f,d);f=f+1;e=h;d=g}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 n=a.vpage.overlays[0].markers;for(var m=0;m900);var t="&p="+g;var w=e.getPoint(0);var Q=(e.points.length>>1)-1;var R=e.getPoint(Q);t+=this.locationAsUrlParam(w.x,w.y,31);t+=this.locationAsUrlParam(R.x,R.y,32);return t} ;E.getTileBaseUrl=function(a,b,c){var d=a||(b||"");if(d.indexOf("?")==-1){d+="?"}else{d+="&"}if(c){d+="v="+encodeURIComponent(c)+"&"}return d} ;function Ha(a){if(a.toFixed){return a.toFixed(6).toString()}else{return a.toString()}} var ba=new Object();function Y(a,b){this.id=a;this.ticketClass=b} Y.create=function(a){if(!a)a="_dtc";if(!ba[a])ba[a]=1;else ba[a]++;return new Y(ba[a],a)} ;Y.invalidateAll=function(){for(var a in ba){try{ba[a]++}catch(b){}}} ;Y.invalidate=function(a){ba[a]++} ;Y.prototype.isValid=function(){return ba[this.ticketClass]==this.id} function Fa(){} Fa.create=function(){if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest()}return null} ;function va(){} va.create=function(a,b){var c=Fa.create();if(c){return new bb(c)}else if(b){var d="mapsxmlhttpiframe"+(a||"");return new Xa(d)}else{return null}} ;function bb(a){this.xmlhttp=a} bb.prototype.continueWith=function(a,b){x.writeURL(a);var c=this.xmlhttp;c.open("GET",a,true);c.onreadystatechange=function(){if(c.readyState==4){b(c.responseText);c.onreadystatechange=_nullFunction}} ;c.send(null)} ;function Xa(a){this.frameid=a} Xa.prototype.continueWith=function(a,b){x.writeURL(a);var c=window.document.getElementById(this.frameid);if(!c){x.write("IFRAME create "+this.frameid);c=gb(this.frameid)}else{x.write("IFRAME found "+this.frameid)}j.addBuiltInListener(c,"load",function(){x.write("IFRAME loaded "+d);var f=ib(c);x.write(f);b(f.jsfile)} );var d=a+"&wrap=js";x.write("IFRAME load "+d);if(v.type==4&&v.version==7){c.src=d}else{var e=ib(c);e.location.replace(d)}x.write("IFRAME loading "+d)} ;function I(a){this.stylesheet=a} I.cache_=new Object();I.create=function(a){return new I(a)} ;I.getCached=function(a){return I.cache_[a]} ;I.cache=function(a,b){I.cache_[a]=b} ;I.prototype.transformToHtml=function(a,b){if(typeof a.transformNode!="undefined"){b.innerHTML=a.transformNode(this.stylesheet)}else if(!Fc&&(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}} ;I.asynchronousTransform=function(a,b,c,d,e){if(v.type==3&&I.scriptedTransform){var f=function(){try{I.scriptedTransform(a,b,c)}catch(m){x.dump(m)}if(d){d()}} ;if(!document.getElementById("nxsl")){var h=gb("nxsl");h.onload=f;h.src="/maps?file=sf"}else{window.setTimeout(f,1)}return}var g=I.getCached(c);if(g){window.setTimeout(function(){g.transformToHtml(a,b);if(d){d()}} ,1)}else{var i=Y.create(e);var n=va.create(e,true);n.continueWith(c,function(m){if(i.isValid()){var r=m.replace(/\{\{[#\/!].*?\}\}/g,"").replace(/^[^<]*/,"");var t=Ra(r);var w=I.create(t);w.transformToHtml(a,b);I.cache(c,w);if(d){d()}}} )}} ;function Qc(a){while(a.hasChildNodes()){a.removeChild(a.lastChild)}} function Ra(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 qb(a)}}catch(c){x.write(c.toString());x.incompatible("xmlparse")}try{x.write("XML xmlParse catch");return qb(a)}catch(c){x.write(c.toString());x.incompatible("xmlparse");return document.createElement("div")}} function jb(a){var b="";if(a.nodeName=="#text"){b+=la(a.nodeValue)}else{b+="<"+a.nodeName;if(a.hasAttributes()){for(var c=0;c"}else{b+=">";for(var c=0;c"}}return b} function Gc(a){if(!a)return"";var b="";if(a.nodeName=="#text"){b+=la(a.nodeValue)}else{for(var c=0;c0){return null}var b=null;for(var c=0;cthis.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.maxXa.x&&this.minX>b.x)return false;if(this.maxXa.y&&this.minY>b.y)return false;if(this.maxYa.maxX&&(this.minYa.maxY))} ;z.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)} ;z.intersection=function(a,b){return new z(Math.max(a.minX,b.minX),Math.max(a.minY,b.minY),Math.min(a.maxX,b.maxX),Math.min(a.maxY,b.maxY))} ;function na(a){this.ticks=a;this.tick=0} na.prototype.reset=function(){this.tick=0} ;na.prototype.next=function(){this.tick++;var a=Math.PI*(this.tick/this.ticks-0.5);return(Math.sin(a)+1)/2} ;na.prototype.more=function(){return this.tickthis.tableSize.width){var a=this.tileImages.pop();for(var b=0;bthis.tableSize.height){var c=this.tileImages[b].pop();this.div.removeChild(c)}for(var d=this.tileImages[b].length;d10000000||Math.abs(this.dragObject.top)>10000000){this.cancelPan();this.centerAtBitmap(this.centerBitmap);return}while(a.width<-this.tilePaddingOffset.width/2){this.rotateRight();this.getCurrentOffset(a)}while(a.width>this.tilePaddingOffset.width/2){this.rotateLeft();this.getCurrentOffset(a)}while(a.height<-this.tilePaddingOffset.height/2){this.rotateDown();this.getCurrentOffset(a)}while(a.height>this.tilePaddingOffset.height/2){this.rotateUp();this.getCurrentOffset(a)}} ;l.prototype.rotateLeft=function(){this.currentPanOffset.width--;this.topLeftTile.x--;var a=this.tileImages.pop();if(a){this.tileImages.unshift(a);for(var b=0;bthis.tilePaddingOffset.width/2){e--;h-=this.spec.tileSize}if(g<-this.tilePaddingOffset.height/2){f++;g+=this.spec.tileSize}else if(g>this.tilePaddingOffset.height/2){f--;g-=this.spec.tileSize}if(!this.isLoaded()){this.topLeftTile=new q(e,f);if(!this.stateMonitor){this.stateMonitor=new qa(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(h,g);this.reconfigureAllImages();this.redrawOverlays();screen.updateInterval=i;j.trigger(this,"move");j.trigger(this,"moveend")} ;l.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")}} ;l.prototype.getCurrentOffset=function(a){if(!a)a=new D(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} ;l.prototype.switchSpecification=function(a,b,c){if(this.spec==a)return;var d=this.spec;var e=b||this.getCenterLatLng();this.setSpecification(a);if(d.tileSize!=a.tileSize){this.topLeftTile=null;this.initializeMap()}if(!c&&c!=0){this.centerAtLatLng(e)}else{this.centerAndZoom(e,c)}j.trigger(this,"maptypechanged",d,a)} ;l.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=k(-200);b.style.left=k(-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} ;l.prototype.zoomTo=function(a){if(!this.isLoaded()){return}if(a>=this.spec.numZoomLevels){a=this.spec.numZoomLevels-1}else if(a<0){a=0}if(a!=this.zoomLevel){var b=this.zoomLevel;this.zoomLevel=a;var c;if(this.zoomLeveld)return-1;if(c=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()}} ;l.prototype.getScreenCoord=function(a){var b=this.getBoundsLatLng();var c=(a.x-b.minX)/(b.maxX-b.minX);var d=(b.maxY-a.y)/(b.maxY-b.minY);return new q(c,d)} ;l.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 h=this.viewSize.width-f;var g=Math.round(this.viewSize.height*this.centerScreen.y);var i=this.viewSize.height-g;c.y=Math.min(c.y,e+g-25);c.y=Math.max(c.y,a.y-i+25);var n=25;var m=a.y-this.infoWindow.getTotalHeightAboveGround()-(c.y-g);if(m<55){n=n+50}else if(m<295){n=n+35}c.x=Math.min(c.x,d+f-n);c.x=Math.max(c.x,d+this.infoWindow.getTotalWidth()-h+25);this.centerLatLng=null;this.recenterOrPanToBitmap(c)} ;l.prototype.showSizedInfoWindow=function(a,b,c){var d=Y.create("infoWindowOffscreen");this.infoWindow.prepareOffscreen();sa(this,function(){if(d.isValid()){this.infoWindow.flipOffscreenAndSize();this.infoWindow.positionAt(a,b,c);if(v.type!=1&&this.infoWindow.hasMask()){this.addOverlaysToInfoWindowMask()}this.infoWindow.show();this.panToInfoWindow();if(this.infoWindow.onOpenFn){this.infoWindow.onOpenFn()}j.trigger(this,"infowindowopen")}} ,0)} ;l.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;cb.y){break}d.addToInfoWindowMask(a,b)}}} ;l.prototype.showMapBlowup=function(a,b,c,d,e,f){if(!this.infoWindowEnabled())return;var h=b?b:this.mapBlowupZoom;var g=c?c:this.mapBlowupSpec;var i=document.createElement("div");i.style.border="1px solid #979797";i.style.width=k(200);i.style.height=k(200);var n=this.copy(i,200,200,a,h,g,true);n.disableDragging();n.disableInfoWindow();n.addControl(new pa());var m=e;if(v.type==1){m=function(){try{n.redrawOverlays()}catch(r){x.dump(r)}if(e)e()} }if(n.mapTypes.length>1){n.addControl(new aa(true))}this.openInfoWindow(a,i,d,m,f);j.bind(n,"moveend",this,function(){this.mapBlowupZoom=n.zoomLevel;this.mapBlowupSpec=n.spec} );return n} ;l.prototype.copy=function(a,b,c,d,e,f,h){var g=new l(a,this.mapTypes,b,c,h);var i=d?d:this.getCenterLatLng();var n=f?f:this.spec;var m=e||e==0?e:this.zoomLevel;if(n==g.spec){g.centerAndZoom(i,m)}else{g.switchSpecification(n,i,m)}for(var r=0;r0){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()} ,10)}else{this.continuousPanTimeout=null;j.trigger(this,"moveend")}} ;l.prototype.onWindowBlur=function(a){if(this.panKeys.size>0){this.panKeys=new ma()}} ;l.prototype.addControl=function(a){a.initialize(this)} ;l.prototype.removeControl=function(a){a.remove()} ;l.prototype.applyControlStyles=function(a){a.style.position="absolute";C(a,"default");a.unselectable="on";a.onselectstart=ta;a.style.fontSize=k(11);a.style.fontFamily="Arial, sans serif";a.style.MozUserSelect="none"} ;l.prototype.hideOverlays=function(){this.infoWindowVisible=this.infoWindow&&this.infoWindow.isVisible();if(this.infoWindowVisible){this.infoWindow.hide()}for(var a=0;a=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)}} ;F.prototype.getOffsetTop=function(){return this.iconImage.offsetTop} ;F.prototype.display=function(a){if(a){for(var b=0;b0;--g){h*=this.zoomFactor}var i=new z();i.minX=Math.floor((a.minX-h)*100000);i.minY=Math.floor((a.minY-h)*100000);i.maxX=Math.ceil((a.maxX+h)*100000);i.maxY=Math.ceil((a.maxY+h)*100000);var n=b;var m;var r=new q();r.y=this.points[n<<1];r.x=this.points[(n<<1)+1];var t=new q();while((m=this.nextPointIndexAtLevel[d][n])<=c){t.y=this.points[m<<1];t.x=this.points[(m<<1)+1];if(i.containsSegment(r,t)){if(d>e){this.getVectorsHelper(a,n,m,d-1,e,f)}else{f.push(r.y*1.0E-5);f.push(r.x*1.0E-5);f.push(t.y*1.0E-5);f.push(t.x*1.0E-5)}}var w=r;r=t;t=w;n=m}} ;B.decodePolyline=function(a){K.start("Polyline","decodePolyline");var b=a.length;var c=0;var d=new Array();var e=0;var f=0;while(c=32);var n=i&1?~(i>>1):i>>1;e+=n;d.push(e);g=0;i=0;do{h=a.charCodeAt(c++)-63;i|=(h&31)<=32);var m=i&1?~(i>>1):i>>1;f+=m;d.push(f)}K.end("Polyline","decodePolyline");return d} ;B.decodeLevels=function(a,b,c){K.start("Polyline","decodeLevels");var d=new Array(b);for(var e=0;e=0){var i=d[g--];while(i.length=32){b.push(String.fromCharCode((32|a&31)+63));a>>=5}b.push(String.fromCharCode(a+63));return b} ;B.prototype.getDrawingTolerance=function(){var a=0;var b=this.getPoint(0);var c=new D(this.minTolerance,this.minTolerance);var d=new D(2,2);while(a0){var i=this.map.centerBitmap;var n=this.map.getDivCoordinate(i.x,i.y,cb);g=document.createElement("v:shape");g.unselectable="on";g.fill=false;g.filled=false;var m=1;var r=1;g.style.position="absolute";g.style.width=k(m);g.style.height=k(r);g.style.left=k(n.x);g.style.top=k(n.y);var t=i.x+" "+i.y;g.coordorigin=t;g.coordsize=m+" "+r;g.path=this.getVectorPath(e);var w=document.createElement("v:stroke");w.joinstyle="round";w.endcap="round";w.opacity=this.opacity;w.color=this.color;w.weight=k(this.weight);g.appendChild(w)}else{g=document.createElement("div")}K.end("Polyline","createVectorSegments");return g} ;var vc=new q(0,0);B.prototype.getBitmapVectors=function(a,b,c,d){if(!b)b=new Array();if(!c)c=new z();c.minX=P;c.minY=P;c.maxX=-P;c.maxY=-P;var e=typeof d!="undefined"?d:this.map.zoomLevel;for(var f=0;fc.maxX)c.maxX=i.x;if(i.y>c.maxY)c.maxY=i.y}return b} ;B.prototype.getVectorPath=function(a){var b=new Array();var c;var d;for(var e=0;e900);var i;if(d.length>0){var n=this.map.getDivCoordinate(e.minX,e.minY,cb);var m=0;var r=0;var t=255;try{var w=this.color;if(w.charAt(0)=="#"){w=w.substring(1)}m=parseInt(w.substring(0,2),16);r=parseInt(w.substring(2,4),16);t=parseInt(w.substring(4,6),16)}catch(Q){x.dump(Q)}var R=(1-this.opacity)*255;var $=Math.ceil(e.maxX-e.minX);var da=Math.ceil(e.maxY-e.minY);var H="http://www.google.com/maplinedraw?width="+$+"&height="+da+"&path="+d+"&color="+m+","+r+","+t+","+R+"&weight="+this.weight;x.writeURL(H);if(v.type!=1){$=null;da=null}var za=v.type==2?"noprint":null;i=o.create(H,$,da,n.x,n.y,0,false,za)}else{i=document.createElement("div")}K.end("Polyline","createImageSegments");return i} ;B.prototype.getEncodedImageSource=function(a,b,c){var d=[];var e;var f;for(var h=0;h0){this.encodeSigned(9999,d)}this.encodeSigned(g-b,d);this.encodeSigned(i-c,d)}this.encodeSigned(n-g,d);this.encodeSigned(m-i,d);f=m;e=n}this.encodeSigned(9999,d);return d.join("")} var sb=p+"dir_";function T(a,b,c){this.point=a;this.start=b;this.end=c;this.element=null;this.angle=null;this.lastSpec=null} T.fromPolylinePoint=function(a,b){fb(b>=2);var c=a.getPoint(b);var d=a.getPoint(b-2);return new T(c,d,c)} ;T.prototype.initialize=function(a){this.map=a} ;T.prototype.remove=function(){if(this.element){this.map.div.removeChild(this.element);this.element=null}} ;T.prototype.copy=function(){return new T(this.point,this.start,this.end)} ;T.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.div.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 h=this.map.getDivCoordinate(f.x,f.y);this.element.style.left=k(h.x+d);this.element.style.top=k(h.y+e)} ;T.prototype.getLatitude=function(){return this.point.y} ;T.prototype.setZIndex=function(a){this.element.style.zIndex=a[0]} ;T.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)} ;T.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=sb+b+".png";return c} var zb=p+"center.png";var Ab=p+"east.png";var Eb=p+"west.png";var Bb=p+"north.png";var Db=p+"south.png";var Cb=p+"panshadow.png";var Fb=p+"zoom-plus.png";var Gb=p+"zoom-minus.png";var Hb=p+"slider.png";var vb=p+"east-mini.png";var yb=p+"west-mini.png";var wb=p+"north-mini.png";var xb=p+"south-mini.png";var Ua=p+"zoom-plus-mini.png";var Va=p+"zoom-minus-mini.png";function S(){} S.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");b.style.position="absolute";b.style.left=k(8);b.style.top=k(8);ka(b,"noprint");this.div=b;this.createPanningControls(a);this.createZoomControls(a);this.createZoomSlider(a);this.map.container.appendChild(this.div)} ;S.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} ;S.prototype.createPanningControls=function(a){var b=o.create(Cb,59,64,0,0,0,false,null,a.ownerDocument);this.div.appendChild(b);var c=o.create(Bb,17,17,20,0,1,false,null,a.ownerDocument);C(c,"pointer");j.bindDom(c,"click",this,function(g){a.pan(0,Math.floor(a.viewSize.height*0.5));A(g)} );c.title=_mPanNorth;this.div.appendChild(c);var d=o.create(Ab,17,17,40,20,1,false,null,a.ownerDocument);C(d,"pointer");j.bindDom(d,"click",this,function(g){a.pan(-Math.floor(a.viewSize.width*0.5),0);A(g)} );d.title=_mPanEast;this.div.appendChild(d);var e=o.create(Db,17,17,20,40,1,false,null,a.ownerDocument);C(e,"pointer");j.bindDom(e,"click",this,function(g){a.pan(0,-Math.floor(a.viewSize.height*0.5));A(g)} );e.title=_mPanSouth;this.div.appendChild(e);var f=o.create(Eb,17,17,0,20,1,false,null,a.ownerDocument);C(f,"pointer");j.bindDom(f,"click",this,function(g){a.pan(Math.floor(a.viewSize.width*0.5),0);A(g)} );f.title=_mPanWest;this.div.appendChild(f);var h=o.create(zb,17,17,20,20,1,false,null,a.ownerDocument);C(h,"pointer");j.bindDom(h,"click",this,function(g){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)}A(g)} );h.title=_mLastResult;this.div.appendChild(h)} ;S.prototype.createZoomControls=function(a){var b=o.create(Fb,17,17,20,70,1,false,null,a.ownerDocument);C(b,"pointer");j.bindDom(b,"click",this,function(d){a.zoomTo(a.zoomLevel-1);A(d)} );b.title=_mZoomIn;this.div.appendChild(b);var c=o.create(Gb,17,17,20,260,1,false,null,a.ownerDocument);C(c,"pointer");j.bindDom(c,"click",this,function(d){a.zoomTo(a.zoomLevel+1);A(d)} );c.title=_mZoomOut;this.div.appendChild(c)} ;S.prototype.createZoomSlider=function(a){if(a.mapTypes[0].numZoomLevels>=18){var b=p+"18sliderbar.png";var c=p+"18slidershadow.png";var d=166;var e=214;this.sliderNotchHeight=9}else{var b=p+"sliderbar.png";var c=p+"slidershadow.png";var d=167;var e=215;this.sliderNotchHeight=11}var f=o.create(c,19,e,20,64,0,false,null,a.ownerDocument);this.div.appendChild(f);var h=a.ownerDocument.createElement("div");h.style.position="absolute";h.style.left=k(21);h.style.top=k(90);h.style.width=k(15);h.style.height=k(d);var b=o.create(b,15,d,0,0,1,false,null,a.ownerDocument);h.appendChild(b);var g=-1*Math.floor(3.5)+1;var i=o.create(Hb,22,14,g,this.getRelativeZoomSliderPos(),2,false,null,a.ownerDocument);i.title=_mZoomDrag;h.appendChild(i);this.div.appendChild(h);var n=new z(g,1,g+22,d-1);var m=new Z(i,g,this.getRelativeZoomSliderPos(),n);j.bind(a,"zoom",this,function(){m.moveTo(g,this.getRelativeZoomSliderPos())} );if(v.type==1){j.bind(m,"dragstart",this,function(){this.savedOffset={"x":this.map.div.offsetLeft,"y":this.map.div.offsetTop};this.map.hideOverlays()} );j.bind(m,"drag",this,function(){var r=m.top+Math.floor(this.sliderNotchHeight/2);var t=this.getZoomFactorFromRelativeCoord(r);this.applyZoom(t)} );j.bind(m,"dragend",this,function(){var r=m.top+Math.floor(this.sliderNotchHeight/2);this.targetZoom=this.getZoomFromRelativeCoord(r);this.currentZoom=this.getZoomFactorFromRelativeCoord(r);this.zoomInterval=Kc(this,this.animateZoom,50)} )}else{j.bind(m,"dragend",this,function(){var r=m.top+Math.floor(this.sliderNotchHeight/2);this.map.zoomTo(this.getZoomFromRelativeCoord(r))} )}C(b,"pointer");b.title=_mZoomSet;j.bindDom(b,"click",this,function(r){var t;if(v.type==1){t=window.event.offsetY}else{var w=Ia(h);t=r.pageY-w.y-2}A(r);a.zoomTo(this.getZoomFromRelativeCoord(t))} )} ;S.prototype.getRelativeZoomSliderPos=function(){return 1+this.map.zoomLevel*this.sliderNotchHeight} ;S.prototype.getZoomFromRelativeCoord=function(a){var b=Math.floor((a-1)/this.sliderNotchHeight);return Math.max(0,Math.min(this.map.spec.numZoomLevels-1,b))} ;S.prototype.getZoomFactorFromRelativeCoord=function(a){var b=(a-1)/this.sliderNotchHeight;return Math.max(0,Math.min(this.map.spec.numZoomLevels-1,b))} ;S.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 h=b.viewSize.height*b.centerScreen.y;b.div.style.left=k((this.savedOffset.x-f)*e+f);b.div.style.top=k((this.savedOffset.y-h)*e+h)} ;S.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=k(this.savedOffset.x);a.div.style.top=k(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)}} ;function oa(){} oa.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");b.style.position="absolute";b.style.left=k(9);b.style.top=k(9);ka(b,"noprint");this.div=b;var c=o.create(wb,18,18,9,0,1,false,null,a.ownerDocument);C(c,"pointer");j.bindDom(c,"click",this,function(i){a.pan(0,Math.floor(a.viewSize.height*0.5));A(i)} );c.title=_mPanNorth;this.div.appendChild(c);var d=o.create(vb,18,18,18,18,1,false,null,a.ownerDocument);C(d,"pointer");j.bindDom(d,"click",this,function(i){a.pan(-Math.floor(a.viewSize.width*0.5),0);A(i)} );d.title=_mPanEast;this.div.appendChild(d);var e=o.create(xb,18,18,9,36,1,false,null,a.ownerDocument);C(e,"pointer");j.bindDom(e,"click",this,function(i){a.pan(0,-Math.floor(a.viewSize.height*0.5));A(i)} );e.title=_mPanSouth;this.div.appendChild(e);var f=o.create(yb,18,18,0,18,1,false,null,a.ownerDocument);C(f,"pointer");j.bindDom(f,"click",this,function(i){a.pan(Math.floor(a.viewSize.width*0.5),0);A(i)} );f.title=_mPanWest;this.div.appendChild(f);var h=o.create(Ua,18,18,9,57,1,false,null,a.ownerDocument);C(h,"pointer");j.bindDom(h,"click",this,function(i){a.zoomTo(a.zoomLevel-1);A(i)} );h.title=_mZoomIn;this.div.appendChild(h);var g=o.create(Va,18,18,9,75,1,false,null,a.ownerDocument);C(g,"pointer");j.bindDom(g,"click",this,function(i){a.zoomTo(a.zoomLevel+1);A(i)} );g.title=_mZoomOut;this.div.appendChild(g);a.container.appendChild(this.div)} ;oa.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} ;function pa(){} pa.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");b.style.position="absolute";b.style.left=k(6);b.style.top=k(6);ka(b,"noprint");this.div=b;var c=o.create(Ua,18,18,0,0,1,false,null,a.ownerDocument);C(c,"pointer");j.bindDom(c,"click",this,function(e){a.zoomTo(a.zoomLevel-1);A(e)} );c.title=_mZoomIn;this.div.appendChild(c);var d=o.create(Va,18,18,0,18,1,false,null,a.ownerDocument);C(d,"pointer");j.bindDom(d,"click",this,function(e){a.zoomTo(a.zoomLevel+1);A(e)} );d.title=_mZoomOut;this.div.appendChild(d);a.container.appendChild(this.div)} ;pa.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} var ub=p+"poweredby.png";function xa(){} xa.prototype.initialize=function(a){var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);b.style.left=k(3);b.style.bottom=k(3);b.innerHTML=_mGoogleCopy;a.container.appendChild(b);this.div=b;this.map=a;this.updateColor();j.bind(a,"maptypechanged",this,this.updateColor)} ;xa.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} ;xa.prototype.updateColor=function(){if(this.map.spec.getCopyrightColor){this.div.style.color=this.map.spec.getCopyrightColor()}else{this.div.style.color="black"}} ;function ga(a){this.enableTermsLink=a} ga.prototype.initialize=function(a){this.map=a;var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);b.style.right=k(3);b.style.bottom=k(3);this.div=b;this.contentSpan=a.ownerDocument.createElement("span");b.appendChild(this.contentSpan);if(this.enableTermsLink){var c=a.ownerDocument.createElement("a");c.href=_mTermsURL;c.appendChild(a.ownerDocument.createTextNode(_mTerms));b.appendChild(c);this.termsLink=c}this.map.container.appendChild(this.div);this.updateColor();this.updateNotice();j.bind(this.map,"maptypechanged",this,this.updateColor);j.bind(this.map,"moveend",this,this.updateNotice)} ;ga.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} ;ga.prototype.updateColor=function(){if(this.map.spec.getCopyrightColor){this.div.style.color=this.map.spec.getCopyrightColor()}else{this.div.style.color="black"}if(this.termsLink){if(this.map.spec.getTermsLinkColor){this.termsLink.style.color=this.map.spec.getTermsLinkColor()}else{this.termsLink.style.color="#7777cc"}}} ;ga.prototype.updateNotice=function(){if(this.map.spec.getCopyright){var a=this.map.spec.getCopyright(this.map);if(a&&this.termsLink){a=a+" - "}this.contentSpan.innerHTML=a}else{this.contentSpan.innerHTML=""}} ;function Ma(){} Ma.prototype.initialize=function(a){var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);C(b,"auto");b.style.left=k(3);b.style.bottom=k(1);b.style.height=k(30);var c=a.ownerDocument.createElement("a");c.href=eb;c.title=_mSiteName;c.appendChild(o.create(ub,62,30,null,null,false,null,a.ownerDocument));b.appendChild(c);c.onclick=function(){var d=new E();d.setAllMapValues(a);window.location.href=d.getURL(true);return false} ;a.container.appendChild(b);this.div=b;this.map=a} ;Ma.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} var Ac=p+"leftbar.png";var Bc=p+"topbar.png";var xc=p+"bottombar.png";var yc=p+"horibar400.png";var zc=p+"horibarcap.png";function Cc(a,b,c,d){this.fpsLength=a;this.metricLength=b;this.fpsText=c;this.metricText=d} function ia(a,b,c){this.maxLength=a||125;this.left=b||71;this.bottom=c||5} ia.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=k(26);this.div.style.left=k(this.left);this.div.style.bottom=k(this.bottom);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=k(8);this.fps.style.width=k(e);this.fps.style.top=k(0);this.metric.style.left=k(8);this.metric.style.width=k(e);this.metric.style.top=k(16);this.setText(this.fps,b.fpsText);this.setText(this.metric,b.metricText);this.leftBar=o.create(Ac,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(Bc,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;a.container.appendChild(this.div);j.bind(a,"moveend",this,this.update);j.bind(a,"zoom",this,this.update);j.bind(a,"move",this,this.update)} ;ia.prototype.remove=function(){this.map.container.removeChild(this.div);this.div=null} ;ia.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=k(b+4);this.rightTopBar.style.left=k(a.fpsLength);this.rightBottomBar.style.left=k(a.metricLength);this.horizontalBar.style.width=k(b);this.horizontalBarCap.style.left=k(b+3);this.metric.style.width=k(a.metricLength);this.fps.style.width=k(a.fpsLength)} ;ia.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=Hc(a,b);var d=this.round125(c);var e;var f;if(d>=1000){var h=this.round125(c/1000);f=Math.round(this.maxLength*h/(c/1000));e=h+" "+_mKilometers}else{var f=Math.round(this.maxLength*d/c);var e=d+" "+_mMeters}var g=c/1609.344;var i=c*3.28084;var n;var m;if(g>=1){var r=this.round125(g);n=Math.round(this.maxLength*r/g);m=r+" "+_mMiles}else{var t=this.round125(i);n=Math.round(this.maxLength*t/i);m=t+" "+_mFeet}return new Cc(n,f,m,e)} ;ia.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} ;ia.prototype.setText=function(a,b){if(a.innerHTML!=b){a.innerHTML=b}} var oc=p+"l1.png";var qc=p+"m1.png";var sc=p+"r1.png";var pc=p+"l5.png";var rc=p+"m5.png";var tc=p+"r5.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} function aa(a){this.tiny=a;if(a){this.buttonWidth=50}else{this.buttonWidth=75}} aa.prototype.initialize=function(a){var b=a.ownerDocument.createElement("div");a.applyControlStyles(b);b.style.top=k(7);b.style.right=k(7);b.style.height=k(19);b.style.width=k(this.buttonWidth*a.mapTypes.length+2*(a.mapTypes.length-1));var c=[];for(var d=0;da.maxX){break}if(g.bounds.intersectsLatLng(a)){if(g.text){c[g.text]=1}if(g.bounds.containsBounds(a)){f=true}}}if(f){break}}var i=[];for(var d in c){i.push(d)}return i} var Aa=_mNavteq;var gc=_mTeleAtlas;var hc=_mZenrin;var $a=[new ea(14,new z(-125.241,22.031,-62.71,49.093),Aa),new ea(14,new z(-141.157,41.468,-50.844,83.656),Aa),new ea(14,new z(-67.277,17.88,-65.175,18.523),Aa),new ea(14,new z(-180,51.078,-129.756,71.484),Aa),new ea(14,new z(-10.649,49.781,2.593,59.687),gc),new ea(14,new z(123.748627,23.8833326,143.789063,46.072278),hc)] var wa=new q(-98.35,39.5);var Jb=ja;var Kb=p+"water.gif";var La=[131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8];function N(a,b){this.tileSize=128;this.backgroundColor="#f2efe9";this.emptyTileUrl=Jb;this.waterTileUrl=Kb;this.baseUrl=E.getTileBaseUrl(a,"http://mt.google.com/mt",b);this.numZoomLevels=La.length;this.pixelsPerDegree=[];for(var c=0;c>1);var e=d+c;while(a=e){a-=c}return a} ;N.prototype.getBitmapCoordinate=function(a,b,c,d){if(!d)d=new q(0,0);var e=b-wa.x;e-=Math.floor((e+180)/360)*360;var f=wa.y-a;d.x=Math.floor(e*this.pixelsPerDegree[c].x);d.y=Math.floor(f*this.pixelsPerDegree[c].y);return d} ;N.prototype.getLatLng=function(a,b,c,d){if(!d)d=new q(0,0);d.x=a/this.pixelsPerDegree[c].x+wa.x;d.y=wa.y-b/this.pixelsPerDegree[c].y;while(d.x<-180)d.x+=360;while(d.x>180)d.x-=360;return d} ;N.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} ;N.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((ae.maxX||(be.maxY)))&&(af.maxX||(bf.maxY)))){return this.waterTileUrl}return this.baseUrl+"x="+a+"&y="+b+"&zoom="+c} ;N.prototype.getLowestZoomLevel=function(a,b,c){var d=c.width;var e=c.height;for(var f=0;f=0;--d){this.pixelsPerLonDegree[d]=c/360;this.pixelsPerLonRadian[d]=c/wc;var e=c/2;this.bitmapOrigo[d]=new q(e,e);this.numTiles[d]=c/256;c*=2}} O.prototype.adjustBitmapX=function(a,b){var c=Math.floor(360*this.pixelsPerLonDegree[b]);var d=0;var e=d+c;while(a=e){a-=c}return a} ;O.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(Ka(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} ;O.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)/db;return d} ;O.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} ;O.prototype.getTileURL=function(a,b,c){if(b<0||b>=this.numTiles[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} ;O.prototype.getLowestZoomLevel=function(a,b,c){var d=c.width/2;var e=c.height/2;for(var f=0;f=16){i.y+=1}this.earthBounds.push(new z(g.x,g.y,i.x,i.y))}var n;if(b){n="http://kh."+b+"/kh"}else{n="http://kh.google.com/kh?"}this.baseUrl=E.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} J.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){x.dump(c)}return false} ;J.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} ;J.prototype.getBitmapCoordinate=function(a,b,c,d){if(!d){d=new q(0,0)}var e=b-ya.x;e-=Math.floor((e+180)/360)*360;var f=ya.y-a;d.x=Math.floor(e*this.pixelsPerDegree[c].x);d.y=Math.floor(f*this.pixelsPerDegree[c].y);return d} ;J.prototype.getLatLng=function(a,b,c,d){if(!d){d=new q(0,0)}d.x=a/this.pixelsPerDegree[c].x+ya.x;d.y=ya.y-b/this.pixelsPerDegree[c].y;while(d.x<-180)d.x+=360;while(d.x>180)d.x-=360;return d} ;J.prototype.getTileURL=function(a,b,c){var d=this.earthBounds[c];if(b=d.maxY){return this.emptyTileUrl}var e=Math.pow(2,18-c-1);if(b<0||e-1=c;h--){e=e/2;if(b>>30)*8;e[d-1][15]=(a.length-1)*8&4294967295;var g=1732584193;var i=4023233417;var n=2562383102;var m=271733878;var r=3285377520;var t=new Array(80);var w,Q,R,$,da;for(var f=0;f>>32-b} Number.prototype.toHexStr=function(){var a="";var b;for(var c=7;c>=0;c--){b=this>>>c*4&15;a+=b.toString(16)}return a} l.prototype.loadLocal=function(a,b){this.addControl(new oa());this.addControl(new aa(b));var c=ha.fromXml(ra.parse(a));var d=b?c.overlays[0].markers[0].point:c.center;var e=this.spec.getLowestZoomLevel(d,c.viewSpan,this.viewSize);this.centerAndZoom(d,e);var f=c.overlays[0].markers;var h=this;for(var g=0;g0&&this.vpage.overlays[0].markers.length>1){d=4.5}}var e=b/a;if(c*e>d){e=d/c}var f=a*e;if(f0){var e=c.overlays[0];if(e.panelStyle&&e.markers){this.showOverlayPanel(e)}}else if(c.directions){this.showDirectionsPanel(c.directions)}if(c.debug){x.writeRaw(c.debug);this.debugPanel.style.display="";this.debugPanel.innerHTML=c.debug}else{this.debugPanel.style.display="none";this.debugPanel.innerHTML=""}if(b==null){b={}}if(this.vpageDoc){this.parseState(this.vpageDoc.getElementById("state").value,b)}this.vpageSpan=typeof b.zoom!="undefined"||b.span?null:c.viewSpan;this.lastSearchSpan=null;this.updateSoftState();this.setPrintHeader();this.loadMapWithState(c,b);this.map.saveMapState()} ;u.prototype.loadMapWithState=function(a,b){this.map.clearOverlays();var c=b.center||(a.center||this.map.getCenterLatLng());var d=b.zoom;if(d==null){var e=b.span||a.viewSpan;if(e){var f=b.spec||this.map.spec;d=f.getLowestZoomLevel(c,e,this.map.viewSize)}else if(typeof this.map.zoomLevel!="undefined"){d=this.map.zoomLevel}else{d=4}}if(b.spec){this.map.switchSpecification(b.spec,c,d)}if(c){if(!this.map.isLoaded()||d!=this.map.zoomLevel){this.map.centerAndZoom(c,d)}else{this.map.recenterOrPanToLatLng(c)}}var h=0;for(var g=0;g=2){i.addOverlay(T.fromPolylinePoint(a.polyline,e.pointIndex))}}} ;window.showDirectionsStart=function(){b.directionsStart.showMapBlowup()} ;window.showDirectionsEnd=function(){b.directionsEnd.showMapBlowup()} ;var c=E.getFileURL("dp");I.asynchronousTransform(a.xml,this.panel,c,null,"panel")} ;var jc=p+"dd-start.png";var ic=p+"dd-end.png";u.prototype.createDirectionsMarkers=function(a){var b=a.getPoint(0);var c=(a.points.length>>1)-1;var d=a.getPoint(c);var e=new W(M);e.image=jc;var f=new W(M);f.image=ic;var h=new F(b,e);var g=new F(d,f);j.addListener(h,"click",function(){h.showMapBlowup()} );j.addListener(g,"click",function(){g.showMapBlowup()} );this.map.addOverlay(h);this.map.addOverlay(g);this.directionsStart=h;this.directionsEnd=g} ;u.prototype.highlight=function(a){if(a){var b=hb("panel_"+a);if(b){pb(b,Ta)}}} ;u.prototype.unhighlight=function(a){if(a){var b=hb("panel_"+a);if(b){rb(b,Ta)}}} ;u.prototype.onInfoWindowOpen=function(a){this.openMarker=a;this.highlight(a.id);if(this.infoWindowOpenHandler){this.infoWindowOpenHandler();this.infoWindowOpenHandler=null}} ;u.prototype.onInfoWindowClose=function(a){this.openMarker=null;this.unhighlight(a.id)} ;u.prototype.onMapClick=function(a){if(a){this.openMarkerInfoWindow(a)}} ;u.prototype.openMarkerInfoWindow=function(a){if(a.xml&&a.infoStyle){this.clearInfoWindowArgs(a);a.openInfoWindowXslt(a.xml,a.infoStyle)}} ;u.prototype.prepareSearchForm=function(a,b){Y.invalidateAll();this.panel.innerHTML=_mSearching;var c=new E();this.setFormField(a,"sll",c.getLatLngArg(this.map.getCenterLatLng()));this.setFormField(a,"sspn",c.getSpanArg(this.map.getSpanLatLng()));this.setFormField(a,"z",this.map.zoomLevel);this.setFormField(a,"t",this.map.spec.getURLArg());this.setFormField(a,"f",b);this.setFormField(a,"output","js");if(window._sf){var d=window._sf.split(/&/);for(var e=0;e'+la(a)+""} ;u.prototype.printSubTitle=function(a,b){var c='
';if(a){c+=''+la(a)+"  "}if(b){c+=''+la(b)+""}c+="
";return c} ;u.prototype.reportStats=function(a){var b=[];for(var c in a){b.push(c+":"+a[c])}var d=this.getPageURL();d+="&stat_m="+b.join(",");x.writeURL(d);if(!this.statsSender){this.statsSender=document.createElement("img");this.statsSender.style.position="absolute";this.statsSender.style.visibility="hidden";this.statsSender.style.top=k(-10);this.statsSender.style.left=k(-10);this.statsSender.style.width=k(1);this.statsSender.style.height=k(1);document.body.appendChild(this.statsSender)}this.statsSender.src=d} function qb(a){return null} function mb(a){var b=a||window;b._MapsApplication=u;b._VPage=ha;b._Point=q;b._Size=D;b._Bounds=z;b._Map=l;b._Icon=W;b._Marker=F;b._Polyline=B;b._LargeMapControl=S;b._SmallMapControl=oa;b._SmallZoomControl=pa;b._MapTypeControl=aa;b._GoogleMapSpec=N;b._GoogleMapMercSpec=O;b._KeyholeMapSpec=J;b._GOOGLE_MAP_TYPE=null;b._SATELLITE_TYPE=null;b._DocumentTransport=va;b._XmlHttp=Fa;b._Xml=ra;b._Xslt=I;b._Event=j;b._Timer=K;b._Log=x;b._makePasteBox=nb;b.GMapsApplication=u;b.GVPage=ha;b.GPoint=q;b.GSize=D;b.GBounds=z;b.GMap=l;b.GIcon=W;b.GMarker=F;b.GPolyline=B;b.GLargeMapControl=S;b.GSmallMapControl=oa;b.GSmallZoomControl=pa;b.GMapTypeControl=aa;b.GGoogleMapSpec=N;b.GGoogleMapMercSpec=O;b.GKeyholeMapSpec=J;b.G_MAP_TYPE=null;b.G_SATELLITE_TYPE=null;b.GDocumentTransport=va;b.GXmlHttp=Fa;b.GXml=ra;b.GXslt=I;b.GEvent=j;b.GTimer=K;b.GLog=x;b.GMakePasteBox=nb} if(typeof _apiHash!="undefined"){var Jc=_apiHash;var Ja=window.location.href;var ob=Ja.lastIndexOf("/");if(ob>=0){Ja=Ja.substring(0,ob+1)}var Sc=Rc(Ja);if(Jc==Sc){mb()}else{_c=false;alert(_mApiBadKey)}}else{mb()} }; GMapsNamespace();