// Copyright 2005 Google function rj(oe,Sg,Ki) { this.type=oe; this.version=Sg; this.os=Ki } ; var A=new rj(0,0,null); var Kb=navigator.userAgent.toLowerCase(); if(Kb.indexOf("opera")!=-1) { A.type=4 } else if(Kb.indexOf("msie")!=-1&&document.all) { A.type=1; if(Kb.indexOf("msie 5")) { A.version=5 } } else if(Kb.indexOf("safari")!=-1) { A.type=3; if(Kb.indexOf("safari/125")!=-1) { A.version=1 } } else if(Kb.indexOf("mozilla")!=-1) { A.type=2 } if(Kb.indexOf("x11; ")!=-1) { A.os=1 } ; var U=Number.MAX_VALUE; var _timeoutCounter=0; Object.prototype.setTimeout=function(He,Zi) { var Ie="tempVar"+_timeoutCounter; _timeoutCounter++; eval(Ie+" = this; "); var oi=He.replace(/\\/g,"\\\\").replace(/\"/g,'\\"'); return window.setTimeout(Ie+'._setTimeoutDispatcher("'+oi+'"); '+Ie+" = null; ",Zi) } ; Object.prototype._setTimeoutDispatcher=function(He) { eval(He) } ; Object.prototype.eventHandler=function(Vg) { var i=this; i=i; return function(b) { if(!b) { b=window.event } if(b&&!b.target) { b.target=b.srcElement } i[Vg](b) } } ; function Jb(Qa) { return Qa.replace(/&/g,"& ").replace(/</g,"< ").replace(/>/g,"> ") } function db(Qa) { return Jb(Qa).replace(/\"/g,"" ").replace(/\'/g,"' ") } function Ma(Qa) { return Qa.replace(/</g,"< ").replace(/>/g,"> ") } function Rd(Qa) { return Qa.replace(/\\/g,"\\\\").replace(/\'/g,'\\"') } Array.prototype.clear=function() { while(this.length>0)this.pop() } ; document.getElementsByClassName=function(w) { var Ac=document.all; if(!Ac)Ac=document.getElementsByTagName("*"); var Pe=new Array(); for(var a=0; a<Ac.length; a++) { if(Ac[a].className==w) { Pe[Pe.length]=Ac[a] } } return Pe } ; function ga(c,Ef) { try { c.style.cursor=Ef } catch(b) { if(Ef=="pointer") { ga(c,"hand") } } } function n() { } n.count=0; n.createElement=function(J,xc) { if(typeof arguments.callee.hasFilters=="undefined") { var ri=document.createElement("div"); arguments.callee.hasFilters=typeof ri.style.filter!="undefined" } var f; if(arguments.callee.hasFilters) { f=document.createElement("div"); f.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+J+(xc?'",sizingMethod=crop)':'")') } else { f=document.createElement("img"); f.src=J } return f } ; n.create=function(J,h,l,O,top,Ua,xc,Ha) { return Wb.create(J,h,l,O,top,Ua,xc,Ha,n.createElement) } ; function Wb() { } Wb.create=function(J,h,l,O,top,Ua,xc,Ha,kg) { var f; if(!kg) { f=document.createElement("IMG"); if(J)f.src=J } else { f=kg(J,xc) } if(h&&l) { f.style.width=ha(h); f.style.height=ha(l); f.width=h; f.height=l } if(top||(O||(top==0||O==0))) { f.style.position="absolute"; f.style.left=ha(O); f.style.top=ha(top) } if(Ua||Ua==0) { f.style.zIndex=Ua } if(A.type==1) { f.unselectable="on"; f.onselectstart=Be } else { f.className="noselect" } f.oncontextmenu=Be; if(Ha) { ic(f,Ha) } return f } ; function P(qa,w,Mb) { if(A.type==3&&w=="dblclick") { qa["on"+w]=Mb; return } if(qa.addEventListener) { qa.addEventListener(w,Mb,false) } else if(qa.attachEvent) { qa.attachEvent("on"+w,Mb) } else { qa["on"+w]=Mb } } function nf(qa,w,Mb) { if(qa.removeEventListener) { qa.removeEventListener(w,Mb,false) } else if(qa.detachEvent) { qa.detachEvent("on"+w,Mb) } else { qa["on"+w]=null } } function ja(b) { if(A.type==1) { window.event.cancelBubble=true } else { b.cancelBubble=true; b.preventDefault(); b.stopPropagation() } } function ai(Lb,oj) { var Ra=window.document.createElement("a"); Ra.href="javascript:void(0)"; Ra.onclick=oj; Ra.appendChild(window.document.createTextNode(Lb)); return Ra } if(!Array.prototype.push) { Array.prototype.push=function(Of) { this[this.length]=Of } } function Of(H) { return document.getElementById(H) } function ha(x) { return x+"px" } function ic(c,Ha) { if(c.className) { c.className+=" "+Ha } else { c.className=Ha } } function gd(g) { var I= { "x":0,"y":0 } ; while(g) { I.x+=g.offsetLeft; I.y+=g.offsetTop; g=g.offsetParent } return I } function vh(g,eh) { var I= { "x":0,"y":0 } ; while(g&&g!=eh) { I.x+=g.offsetLeft; I.y+=g.offsetTop; g=g.offsetParent } return I } function Nc(la) { this.size=0; if(la) { for(var a=la.length-1; a>=0; a--)this.add(la[a]) } } Nc.prototype.add=function(Bb) { if(!this.contains(Bb)) { this[":"+Bb]=1; this.size++ } } ; Nc.prototype.remove=function(Bb) { if(this.contains(Bb)) { delete this[":"+Bb]; this.size-- } } ; Nc.prototype.contains=function(Bb) { return this[":"+Bb]==1 } ; function Be() { return false } ; var o="/mapfiles/"; var sd=new Array("q","ll","spn","z","t","sll","sspn","vp","f","output","xsl","deb"); function ua() { this.args=new Object(); this.reset() } ua.prototype.setValue=function(w,F) { this.args[w]=F } ; ua.prototype.setAllMapValues=function(r) { this.setValue("ll",this.getLatLngArg(r.getCenterLatLng())); this.setValue("spn",this.getSpanArg(r.getSpanLatLng())); this.setValue("z",r.zoomLevel); this.setValue("t",r.spec.getURLArg()) } ; ua.prototype.getLatLngArg=function(k) { return Ed(k.y)+","+Ed(k.x) } ; ua.prototype.getSpanArg=function(Aa) { return Ed(Aa.height)+","+Ed(Aa.width) } ; ua.prototype.reset=function() { for(var a=0; a<sd.length; a++) { this.args[sd[a]]=null } } ; ua.prototype.getURL=function(Le) { var ld=new Array(); for(var a=0; a<sd.length; a++) { var w=sd[a]; if(this.args[w]) { ld.push(w+"="+encodeURIComponent(this.args[w])) } } if(window._sf&&window._sf.length>0) { ld.push(window._sf) } var Db="/maps"; if(ld.length>0)Db+="?"+ld.join("&"); if(Le)return"http://maps.google.com"+Db; return Db } ; ua.getXSLTURL=function(H) { var z=new ua(); z.setValue("xsl",H); return z.getURL() } ; function Ed(wb) { if(wb.toFixed) { return wb.toFixed(6).toString() } else { return wb.toString() } } ; var sb=new Object(); function La(H,ya) { this.id=H; this.ticketClass=ya } La.create=function(ya) { if(!ya)ya="_dtc"; if(!sb[ya])sb[ya]=1; else sb[ya]++; return new La(sb[ya],ya) } ; La.invalidateAll=function() { for(var a in sb) { try { sb[a]++ } catch(b) { } } } ; La.invalidate=function(Ha) { sb[Ha]++ } ; La.prototype.isValid=function() { return sb[this.ticketClass]==this.id } ; function cg() { } cg.create=function() { if(typeof ActiveXObject!="undefined") { return new ActiveXObject("Microsoft.XMLHTTP") } else if(typeof XMLHttpRequest!="undefined") { return new XMLHttpRequest() } else { ; return null } } ; function ka(Ae) { this.stylesheet=Ae } ka.cache_=new Object(); ka.isSupported=function(ub) { return typeof ub.transformNode!="undefined"||typeof XSLTProcessor!="undefined"&&(XSLTProcessor.prototype&&XSLTProcessor.prototype.importStylesheet) } ; ka.create=function(Ae) { return new ka(Ae) } ; ka.getCached=function(Db) { return ka.cache_[Db] } ; ka.cache=function(Db,Qg) { ka.cache_[Db]=Qg } ; ka.prototype.transformToHTML=function(ub,Wa) { if(typeof ub.transformNode!="undefined") { Wa.innerHTML=ub.transformNode(this.stylesheet) } else if(typeof XSLTProcessor!="undefined") { var Ff=new XSLTProcessor(); Ff.importStylesheet(this.stylesheet); var ij=Ff.transformToFragment(ub,window.document); Wa.innerHTML=""; Wa.appendChild(ij) } else { } } ; ka.asynchronousTransform=function(ub,Wa,Gc,hb,ya) { var zc=ka.getCached(Gc); if(zc) { zc.transformToHTML(ub,Wa); if(hb) { hb() } return } var df=La.create(ya); var pc=cg.create(); Sd('<a href="'+db(Gc)+'">'+Jb(Gc)+"</a>",0); pc.open("GET",Gc,true); pc.onreadystatechange=function() { if(pc.readyState==4) { if(df.isValid()) { try { var Hd=pc.responseXML; var zc=ka.create(Hd); ka.cache(Gc,zc); zc.transformToHTML(ub,Wa); if(hb) { hb() } } catch(b) { } } } } ; pc.send(null) } ; function Od(Ee,Wa,Fh,hb,ya,Nf) { if(ka.isSupported(Ee.xml)) { ka.asynchronousTransform(Ee.xml,Wa,Fh,hb,ya) } else if(Nf) { Nf.call(Ee,Wa); if(hb) { hb() } } else { } } function ci(c) { while(c.hasChildNodes()) { c.removeChild(c.lastChild) } } function uf(str) { try { if(typeof ActiveXObject!="undefined"&&typeof GetObject!="undefined") { var Hd=new ActiveXObject("Microsoft.XMLDOM"); Hd.loadXML(str); return Hd } else if(typeof DOMParser!="undefined") { return(new DOMParser()).parseFromString(str,"text/xml") } else { return Ag(str) } } catch(b) { } try { return Ag(str) } catch(b) { ; return document.createElement("div") } } function Af(Qa) { var cd=Qa.split(/&/); if(cd.length==1) { return Qa } var I=""; for(var a=0; a<cd.length; ++a) { var Md=cd[a].split(/; /); if(Md.length!=2) { I+=cd[a]; continue } var lb; switch(Md[0]) { case "lt":lb="<"; break; case "gt":lb=">"; break; case "amp":lb="&"; break; case "quot":lb='"'; break; case "apos":lb="'"; break; case "nbsp":lb=String.fromCharCode(160); break; default:var Aa=window.document.createElement("span"); Aa.innerHTML="&"+Md[0]+"; "; lb=Aa.innerHTML } I+=lb+Md[1] } return I } function Ag(M) { var Ri=/\/$/; var Ch=/^(\S*)/; var Lh=/(\S+)\s?=\s?('([^\']*)'|"([^\"]*)")/g; var Qe=y.createDocument(); var qe=Qe; var Kc=[]; var Ib=qe; Kc.push(Ib); var x=M.split(/</); for(var a=1; a<x.length; ++a) { var zg=x[a].split(/>/); var fc=zg[0]; var Lb=Af(zg[1]); if(fc.charAt(0)=="/") { Kc.pop(); Ib=Kc[Kc.length-1] } else if(fc.charAt(0)=="?") { } else if(fc.charAt(0)=="!") { } else { var Og=fc.match(Ri); var Qi=Ch.exec(fc)[1]; var g=Qe.createElement(Qi); var nd; while(nd=Lh.exec(fc)) { var fi=Af(nd[3]||nd[4]); g.setAttribute(nd[1],fi) } if(Og) { Ib.appendChild(g) } else { Ib.appendChild(g); Ib=g; Kc.push(g) } } if(Lb&&Ib!=qe) { Ib.appendChild(Qe.createTextNode(Lb)) } } return qe } function bg(g) { var I=""; if(g.nodeName=="#text") { I+=Jb(g.nodeValue) } else { I+="<"+g.nodeName; if(g.hasAttributes()) { for(var a=0; a<g.attributes.length; ++a) { I+=" "+g.attributes[a].nodeName+'="'+db(g.attributes[a].nodeValue)+'"' } } if(g.childNodes.length==0) { I+="/>" } else { I+=">"; for(var a=0; a<g.childNodes.length; ++a) { I+=bg(g.childNodes[a]) } I+="</"+g.nodeName+">" } } return I } function Wg(g) { var I=""; if(g.nodeName=="#text") { I+=Jb(g.nodeValue) } else { for(var a=0; a<g.childNodes.length; ++a) { I+=bg(g.childNodes[a]) } } return I } function ia(g) { if(!g) { return"" } if(typeof g.text!="undefined") { return g.text } if(g.nodeType==3||g.nodeType==4) { return g.nodeValue } var F=""; if(g.nodeType==1) { for(var Zc=g.firstChild; Zc!=null; Zc=Zc.nextSibling) { F+=ia(Zc) } } return F } function y(oe,w,F) { this.nodeType=oe; this.nodeName=w; this.nodeValue=F; this.attributes=[]; this.childNodes=[]; this.firstChild=null; this.lastChild=null; this.nextSibling=null; this.previousSibling=null; this.parentNode=null } y.ELEMENT_NODE=1; y.ATTRIBUTE_NODE=2; y.TEXT_NODE=3; y.CDATA_SECTION_NODE=4; y.ENTITY_REFERENCE_NODE=5; y.ENTITY_NODE=6; y.PROCESSING_INSTRUCTION_NODE=7; y.COMMENT_NODE=8; y.DOCUMENT_NODE=9; y.DOCUMENT_TYPE_NODE=10; y.DOCUMENT_FRAGMENT_NODE=11; y.NOTATION_NODE=12; y.prototype.appendChild=function(g) { if(this.childNodes.length==0) { this.firstChild=g } g.previousSibling=this.lastChild; g.nextSibling=null; if(this.lastChild) { this.lastChild.nextSibling=g } g.parentNode=this; this.lastChild=g; this.childNodes.push(g) } ; y.prototype.hasAttributes=function() { return this.attributes.length>0 } ; y.prototype.setAttribute=function(w,F) { for(var a=0; a<this.attributes.length; ++a) { if(this.attributes[a].nodeName==w) { this.attributes[a].nodeValue=F; return } } this.attributes.push(new y(y.ATTRIBUTE_NODE,w,F)) } ; y.prototype.getAttribute=function(w) { for(var a=0; a<this.attributes.length; ++a) { if(this.attributes[a].nodeName==w) { return this.attributes[a].nodeValue } } return null } ; y.prototype.createElement=(y.createElement=function(w) { return new y(y.ELEMENT_NODE,w,null) } ); y.prototype.createTextNode=(y.createTextNode=function(F) { return new y(y.TEXT_NODE,"#text",F) } ); y.prototype.createDocument=(y.createDocument=function() { return new y(y.DOCUMENT_NODE,"#document",null) } ); y.prototype.getElementsByTagName=function(w,Sc) { if(!Sc) { Sc=[] } if(this.nodeName==w) { Sc.push(this) } for(var a=0; a<this.childNodes.length; ++a) { this.childNodes[a].getElementsByTagName(w,Sc) } return Sc } ; function Sd(gj,va) { } Object.prototype.trace=function(gj,va,vj) { } ; function L() { } L.start=function() { } ; L.end=function() { } ; L.addTime=function(gf) { } ; function q(x,m) { this.x=x; this.y=m } q.prototype.toString=function() { return"("+this.x+", "+this.y+")" } ; q.prototype.equals=function(X) { if(!X)return false; return this.x==X.x&&this.y==X.y } ; q.prototype.distanceFrom=function(X) { var Fa=this.x-X.x; var Ja=this.y-X.y; return Math.sqrt(Fa*Fa+Ja*Ja) } ; q.prototype.approxEquals=function(X) { if(!X)return false; return Vc(this.x,X.x)&&Vc(this.y,X.y) } ; function aa(h,l) { this.width=h; this.height=l } aa.prototype.toString=function() { return"("+this.width+", "+this.height+")" } ; aa.prototype.equals=function(X) { if(!X)return false; return this.width==X.width&&this.height==X.height } ; aa.prototype.approxEquals=function(X) { if(!X)return false; return Vc(this.width,X.width)&&Vc(this.height,X.height) } ; function Vc(rh,Ai) { return Math.round(rh*1000000)==Math.round(Ai*1000000) } function Z(cj,Sh,Gd,id) { this.minX=cj; this.minY=Sh; this.maxX=Gd; this.maxY=id } Z.prototype.toString=function() { return"Bounds("+this.minX+","+this.minY+","+this.maxX+","+this.maxY+")" } ; Z.prototype.containsSegment=function(Qd,qd) { if(this.minX>Qd.x&&this.minX>qd.x)return false; if(this.maxX<Qd.x&&this.maxX<qd.x)return false; if(this.minY>Qd.y&&this.minY>qd.y)return false; if(this.maxY<Qd.y&&this.maxY<qd.y)return false; return true } ; Z.prototype.containsBounds=function(Ud) { return this.minX<Ud.minX&&(this.maxX>Ud.maxX&&(this.minY<Ud.minY&&this.maxY>Ud.maxY)) } ; function tc(Xg) { this.ticks=Xg; this.tick=0 } tc.prototype.reset=function() { this.tick=0 } ; tc.prototype.next=function() { this.tick++; var jb=Math.PI*(this.tick/this.ticks-0.5); return(Math.sin(jb)+1)/2 } ; tc.prototype.more=function() { return this.tick<this.ticks } ; function Wh(F,la) { if(!la)la=new Array(); while(F>=32) { la.push(String.fromCharCode((32|F&31)+63)); F>>=5 } la.push(String.fromCharCode(F+63)); return la } function hc(F,la) { return Wh(F<0?~(F<<1):F<<1,la) } function gc(li,ee,Re,je) { this.numLevels=Re; this.zoomFactor=je; this.decodePolyline(li); this.decodeLevels(ee); this.minTolerance=1.0E-5 } gc.prototype.decodePolyline=function(sc) { L.start("Polyline","decodePolyline"); var Oi=sc.length; var Nb=0; var la=new Array(); var gb=0; var tb=0; while(Nb<Oi) { var Sb; var Lc=0; var Ta=0; do { Sb=sc.charCodeAt(Nb++)-63; Ta|=(Sb&31)<<Lc; Lc+=5 } while(Sb>=32); var Vi=Ta&1?~(Ta>>1):Ta>>1; gb+=Vi; la.push(gb); Lc=0; Ta=0; do { Sb=sc.charCodeAt(Nb++)-63; Ta|=(Sb&31)<<Lc; Lc+=5 } while(Sb>=32); var ki=Ta&1?~(Ta>>1):Ta>>1; tb+=ki; la.push(tb) } this.points=la; this.numPoints=this.points.length>>1; L.end("Polyline","decodePolyline") } ; gc.prototype.decodeLevels=function(sc) { L.start("Polyline","decodeLevels"); var zd=new Array(this.numLevels); for(var Ze=0; Ze<this.numLevels; ++Ze)zd[Ze]=new Array(); var a=0; for(var ba=0; ba<this.numPoints; ++ba) { var Tb=sc.charCodeAt(a++)-63; while(Tb>=0) { var jc=zd[Tb--]; while(jc.length<ba) { jc.push(ba) } } } for(var Tb=0; Tb<this.numLevels; ++Tb) { var jc=zd[Tb]; for(var ba=jc.length; ba<this.numPoints; ++ba) { jc.push(this.numPoints) } } this.nextPointIndexAtLevel=zd; L.end("Polyline","decodeLevels") } ; gc.prototype.getPoint=function(Nb,k) { if(k==null)k=new q(); Nb<<=1; k.y=this.points[Nb]*1.0E-5; k.x=this.points[Nb+1]*1.0E-5; return k } ; gc.prototype.getVectors=function(D,N,v) { L.start("Polyline","getVectors"); if(v==null)v=new Array(); this.getVectorsHelper(D,0,this.numPoints-1,this.numLevels-1,N,v); L.end("Polyline","getVectors"); return v } ; gc.prototype.getVectorsHelper=function(D,fj,Rb,va,Cg,v) { var Rc=7.62939453125E-6; for(var a=va; a>0; --a) { Rc*=this.zoomFactor } var rc=new Z(); rc.minX=Math.floor((D.minX-Rc)*100000); rc.minY=Math.floor((D.minY-Rc)*100000); rc.maxX=Math.ceil((D.maxX+Rc)*100000); rc.maxY=Math.ceil((D.maxY+Rc)*100000); var yc=fj; var Ic; var wa=new q(); wa.y=this.points[yc<<1]; wa.x=this.points[(yc<<1)+1]; var za=new q(); while((Ic=this.nextPointIndexAtLevel[va][yc])<=Rb) { za.y=this.points[Ic<<1]; za.x=this.points[(Ic<<1)+1]; if(rc.containsSegment(wa,za)) { if(va>Cg) { this.getVectorsHelper(D,yc,Ic,va-1,Cg,v) } else { v.push(wa.y*1.0E-5); v.push(wa.x*1.0E-5); v.push(za.y*1.0E-5); v.push(za.x*1.0E-5) } } var Ge=wa; wa=za; za=Ge; yc=Ic } } ; var tj=o+"markerTransparent.png"; function d(W,ta,h,l,fh,mf,Hh) { if(!W)return; this.container=W; this.disablePopups=fh; this.disableDragging=mf; this.mapTypes=Hh; if(!this.mapTypes)this.mapTypes=new Array(this.spec); this.zoomLevel=0; this.topLeftTile=null; this.currentPanOffset=new aa(0,0); this.centerBitmap=new q(0,0); this.tilePaddingOffset=new aa(0,0); this.tableSize=new aa(0,0); this.overlays=new Array(); this.locations=new Array(); this.panDistance=new aa(0,0); this.panKeys=new Nc(); this.setSpecification(ta); this.container.style.overflow="hidden"; if(this.container.style.position!="absolute")this.container.style.position="relative"; this.container.style.backgroundColor=this.spec.backgroundColor; if(!h||!l) { h=this.container.offsetWidth; l=this.container.offsetHeight } this.viewSize=new aa(h,l); P(window,"blur",this.eventHandler("onWindowBlur")); this.div=this.createMapDiv(); this.container.appendChild(this.div); if(!this.disablePopups) { this.infoWindow=new t("14em",this.eventHandler("onInfoCloseClick"),this.div,50,20) } this.directionsDiv=document.createElement("div"); this.directionsDiv.directionsBounds=new Z(-U,-U,U,U); this.div.appendChild(this.directionsDiv); this.dragObject=new ab(this.div,0,0); this.dragObject.ondrag=this.eventHandler("onDrag"); this.dragObject.ondragstart=this.eventHandler("onDragStart"); this.dragObject.ondragend=this.eventHandler("onDragEnd"); P(this.div,"dblclick",this.eventHandler("onDoubleClick")); this.dragObject.onclick=this.eventHandler("onClick"); if(mf) { this.dragObject.disable() } this.initializeMap(); this.onzoom=null; this.onpan=null; this.onmousedown=null; this.onspecificationchange=null; this.oninfowindowclose=null; this.onresize=null; this.stateListeners=null; this.useRawVml=false } d.prototype.createMapDiv=function() { var j=document.createElement("div"); j.style.position="absolute"; j.style.top="0px"; j.style.left="0px"; j.style.zIndex=0; j.style.backgroundColor=this.spec.backgroundColor; return j } ; d.prototype.loadTileImages=function() { while(this.tileImages.length>this.tableSize.width) { var Qf=this.tileImages.pop(); for(var a=0; a<Qf.length; a++) { this.div.removeChild(Qf[a]) } } for(var a=this.tileImages.length; a<this.tableSize.width; a++) { this.tileImages.push(new Array()) } for(var a=0; a<this.tileImages.length; a++) { while(this.tileImages[a].length>this.tableSize.height) { var f=this.tileImages[a].pop(); this.div.removeChild(f) } for(var K=this.tileImages[a].length; K<this.tableSize.height; K++) { var f=Wb.create(null,this.spec.tileSize,this.spec.tileSize,null,null,0,null,null); f.style.position="absolute"; this.tileImages[a].push(f); this.div.appendChild(f); this.configureImage(f,a,K) } } } ; d.prototype.deleteTiles=function() { if(this.tileImages) { for(var a=0; a<this.tileImages.length; a++) { if(this.tileImages[a]) { for(var K=0; K<this.tileImages[a].length; K++) { this.div.removeChild(this.tileImages[a][K]) } } } } this.tileImages=null } ; d.prototype.initializeMap=function() { this.deleteTiles(); this.tileImages=new Array(); this.calculateTileMeasurements(); this.loadTileImages() } ; d.prototype.getSpanLatLng=function(e) { if(!e)e=new aa(0,0); var Ga=this.spec.getLatLng(this.centerBitmap.x-this.viewSize.width/2,this.centerBitmap.y-this.viewSize.height/2,this.zoomLevel); var Ca=this.spec.getLatLng(this.centerBitmap.x+this.viewSize.width/2,this.centerBitmap.y+this.viewSize.height/2,this.zoomLevel); e.width=Math.abs(Ca.x-Ga.x); e.height=Math.abs(Ca.y-Ga.y); return e } ; d.prototype.getCenterLatLng=function(e) { if(!e)e=new q(0,0); if(this.centerLatLng) { e.x=this.centerLatLng.x; e.y=this.centerLatLng.y; return e } if(this.lastLatLng) { var ca=this.spec.getBitmapCoordinate(this.lastLatLng.y,this.lastLatLng.x,this.zoomLevel); if(ca.equals(this.centerBitmap)) { e.x=this.lastLatLng.x; e.y=this.lastLatLng.y; return e } } var k=this.spec.getLatLng(this.centerBitmap.x,this.centerBitmap.y,this.zoomLevel); e.x=k.x; e.y=k.y; return e } ; d.prototype.getBoundsBitmap=function(e) { if(!e)e=new Z(0,0,0,0); e.minX=this.centerBitmap.x-this.viewSize.width/2; e.minY=this.centerBitmap.y-this.viewSize.height/2; e.maxX=this.centerBitmap.x+this.viewSize.width/2; e.maxY=this.centerBitmap.y+this.viewSize.height/2; return e } ; d.prototype.getBoundsLatLng=function(e) { e=this.getBoundsBitmap(e); var Ga=this.spec.getLatLng(e.minX,e.minY,this.zoomLevel); var Ca=this.spec.getLatLng(e.maxX,e.maxY,this.zoomLevel); e.minX=Ga.x; e.minY=Ca.y; e.maxX=Ca.x; e.maxY=Ga.y; return e } ; d.prototype.calculateTileMeasurements=function() { var wi=Math.ceil(this.viewSize.width/this.spec.tileSize)+2; var Uh=Math.ceil(this.viewSize.height/this.spec.tileSize)+2; this.tableSize.width=wi; this.tableSize.height=Uh; var Qb=Math.floor((this.tableSize.width*this.spec.tileSize-this.viewSize.width)/2); var Ab=Math.floor((this.tableSize.height*this.spec.tileSize-this.viewSize.height)/2); this.tilePaddingOffset.width=Qb; this.tilePaddingOffset.height=Ab } ; d.prototype.configureImage=function(f,x,m) { var Ah=(this.currentPanOffset.width+x)*this.spec.tileSize; var kj=(this.currentPanOffset.height+m)*this.spec.tileSize; var O=-this.tilePaddingOffset.width+Ah; var top=-this.tilePaddingOffset.height+kj; if(f.tileLeft!=O||f.tileTop!=top) { f.style.left=O+"px"; f.style.top=top+"px"; f.tileLeft=O; f.tileTop=top } if(!this.topLeftTile) { f.src=this.spec.emptyTileURL } else { var J=this.spec.getTileURL(this.topLeftTile.x+x,this.topLeftTile.y+m,this.zoomLevel); if(f.src!=J) { f.src=this.spec.emptyTileURL; f.src=J } } } ; d.prototype.onDrag=function() { if(!this.topLeftTile)return; this.onMove(); this.rotateTiles() } ; var Ug=new aa(0,0); d.prototype.onMove=function() { this.centerLatLng=null; var Ka=this.getCurrentOffset(Ug); var x=this.topLeftTile.x*this.spec.tileSize+Math.floor(this.viewSize.width/2)+this.tilePaddingOffset.width-Ka.width; var m=this.topLeftTile.y*this.spec.tileSize+Math.floor(this.viewSize.height/2)+this.tilePaddingOffset.height-Ka.height; this.centerBitmap.x=x; this.centerBitmap.y=m; this.drawDirections(this.directions,this.directionsDiv); if(this.onpan)this.onpan(x,m) } ; var pj=new aa(0,0); d.prototype.rotateTiles=function() { var Ka=this.getCurrentOffset(pj); if(Math.abs(this.dragObject.left)>10000000||Math.abs(this.dragObject.top)>10000000) { this.cancelPan(); this.centerAtBitmap(this.centerBitmap); return } while(Ka.width<-this.tilePaddingOffset.width/2) { this.rotateRight(); this.getCurrentOffset(Ka) } while(Ka.width>this.tilePaddingOffset.width/2) { this.rotateLeft(); this.getCurrentOffset(Ka) } while(Ka.height<-this.tilePaddingOffset.height/2) { this.rotateDown(); this.getCurrentOffset(Ka) } while(Ka.height>this.tilePaddingOffset.height/2) { this.rotateUp(); this.getCurrentOffset(Ka) } } ; d.prototype.rotateLeft=function() { this.currentPanOffset.width--; this.topLeftTile.x--; var eb=this.tileImages.pop(); if(eb) { this.tileImages.unshift(eb); for(var a=0; a<eb.length; a++) { this.configureImage(eb[a],0,a) } } } ; d.prototype.rotateRight=function() { this.currentPanOffset.width++; this.topLeftTile.x++; var eb=this.tileImages.shift(); this.tileImages.push(eb); var x=this.tileImages.length-1; for(var a=0; a<eb.length; a++) { this.configureImage(eb[a],x,a) } } ; d.prototype.rotateUp=function() { this.currentPanOffset.height--; this.topLeftTile.y--; for(var a=0; a<this.tileImages.length; a++) { var f=this.tileImages[a].pop(); this.tileImages[a].unshift(f); this.configureImage(f,a,0) } } ; d.prototype.rotateDown=function() { this.currentPanOffset.height++; this.topLeftTile.y++; var m=this.tileImages[0].length-1; for(var a=0; a<this.tileImages.length; a++) { var f=this.tileImages[a].shift(); this.tileImages[a].push(f); this.configureImage(f,a,m) } } ; d.prototype.onDragStart=function(b) { if(this.onmousedown)this.onmousedown(b) } ; d.prototype.onDragEnd=function(b) { this.onStateChanged() } ; d.prototype.onDoubleClick=function(b) { if(this.disableDragging) { return } var k=this.getRelativeClickPoint(b,this.container); var Uc=Math.floor(this.viewSize.width/2)-k.x; var wc=Math.floor(this.viewSize.height/2)-k.y; this.pan(Uc,wc) } ; d.prototype.onClick=function(b) { this.closeInfoWindow() } ; d.prototype.getRelativeClickPoint=function(b,yf,e) { if(!e) { e=new q() } if(typeof b.offsetX!="undefined") { var qa=b.target||b.srcElement; var xg=vh(qa,yf); e.x=b.offsetX+xg.x; e.y=b.offsetY+xg.y } else if(typeof b.pageX!="undefined") { var Kd=gd(yf); e.x=b.pageX-Kd.x; e.y=b.pageY-Kd.y } else { } return e } ; d.prototype.reconfigureAllImages=function() { if(this.tileImages.length==0) { return } var Ad=new Array(); for(var a=0; a<this.tileImages.length; a++) { for(var K=0; K<this.tileImages[a].length; K++) { f=this.tileImages[a][K]; f.coordX=a; f.coordY=K; var Dg=Math.min(a,this.tileImages.length-a-1); var Lf=Math.min(K,this.tileImages[a].length-K-1); if(Dg==0||Lf==0) { f.priority=0 } else { f.priority=Dg+Lf } Ad.push(f) } } Ad.sort(function(Dh,aj) { return aj.priority-Dh.priority } ); for(var a=0; a<Ad.length; a++) { var f=Ad[a]; if(A.type==1)this.div.removeChild(f); this.configureImage(f,f.coordX,f.coordY); if(A.type==1)this.div.appendChild(f) } } ; d.prototype.pan=function(Fa,Ja) { if(!this.topLeftTile) { return } var mb=Math.sqrt(Fa*Fa+Ja*Ja); var yi=Math.max(10,Math.floor(mb/20)); this.panSiner=new tc(yi); this.panSiner.reset(); this.panDistance.width=Fa; this.panDistance.height=Ja; this.panStart=new q(this.dragObject.left,this.dragObject.top); this.doPan() } ; d.prototype.doPan=function() { var jb=this.panSiner.next(); this.dragObject.moveTo(this.panStart.x+this.panDistance.width*jb,this.panStart.y+this.panDistance.height*jb); this.onMove(); if(this.panSiner.more()) { this.panTimeout=this.setTimeout("this.doPan()",10); this.rotateTiles() } else { this.panTimeout=null; this.onStateChanged() } } ; d.prototype.cancelPan=function() { if(this.panTimeout) { clearTimeout(this.panTimeout) } } ; d.prototype.recenterOrPanToLatLng=function(k) { if(!this.topLeftTile) { return } this.centerLatLng=new q(k.x,k.y); this.lastLatLng=this.centerLatLng; var k=this.spec.getBitmapCoordinate(this.centerLatLng.y,this.centerLatLng.x,this.zoomLevel); this.recenterOrPanToBitmap(k) } ; d.prototype.recenterOrPanToBitmap=function(k) { if(!this.topLeftTile)return; var Uc=this.centerBitmap.x-k.x; var wc=this.centerBitmap.y-k.y; if(Uc==0&&wc==0)return; if(Math.abs(Uc)<this.viewSize.width&&Math.abs(wc)<this.viewSize.height) { this.pan(Uc,wc); return } this.centerAtBitmap(k); this.onStateChanged() } ; d.prototype.centerAndZoom=function(fd,N) { var xf=false; if(N!=this.zoomLevel) { var Fe=this.zoomLevel; this.zoomLevel=N; xf=true } this.centerAtLatLng(fd); if(xf&&this.onzoom)this.onzoom(Fe,this.zoomLevel); this.onStateChanged() } ; d.prototype.centerAtLatLng=function(k) { this.centerLatLng=new q(k.x,k.y); this.lastLatLng=this.centerLatLng; var k=this.spec.getBitmapCoordinate(this.centerLatLng.y,this.centerLatLng.x,this.zoomLevel); this.centerAtBitmap(k) } ; d.prototype.centerAtBitmap=function(k) { this.centerBitmap.x=k.x; this.centerBitmap.y=k.y; var O=k.x-Math.floor(this.viewSize.width/2)-this.tilePaddingOffset.width; var top=k.y-Math.floor(this.viewSize.height/2)-this.tilePaddingOffset.height; var lc=Math.floor(O/this.spec.tileSize); var Cc=Math.floor(top/this.spec.tileSize); var Qb=lc*this.spec.tileSize-O; var Ab=Cc*this.spec.tileSize-top; if(Qb<-this.tilePaddingOffset.width/2) { lc++; Qb+=this.spec.tileSize } else if(Qb>this.tilePaddingOffset.width/2) { lc--; Qb-=this.spec.tileSize } if(Ab<-this.tilePaddingOffset.height/2) { Cc++; Ab+=this.spec.tileSize } else if(Ab>this.tilePaddingOffset.height/2) { Cc--; Ab-=this.spec.tileSize } if(!this.topLeftTile) { this.topLeftTile=new q(lc,Cc) } else { this.topLeftTile.x=lc; this.topLeftTile.y=Cc } this.currentPanOffset.width=0; this.currentPanOffset.height=0; this.reconfigureAllImages(); this.repositionOverlays(); this.dragObject.moveTo(Qb,Ab); this.onStateChanged() } ; d.prototype.addStateListener=function(di) { if(!this.stateListeners)this.stateListeners=new Array(); this.stateListeners.push(di) } ; d.prototype.onStateChanged=function() { if(!this.topLeftTile)return; if(this.stateListeners) { for(var a=0; a<this.stateListeners.length; a++) { this.stateListeners[a].onMapStateChanged(this) } } } ; d.prototype.onResize=function(b) { 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); if(this.onresize) { this.onresize() } } } ; d.prototype.getCurrentOffset=function(e) { if(!e)e=new aa(0,0); e.width=this.dragObject.left+this.currentPanOffset.width*this.spec.tileSize; e.height=this.dragObject.top+this.currentPanOffset.height*this.spec.tileSize; return e } ; d.prototype.switchSpecification=function(Pa) { if(this.spec==Pa)return; var be=this.spec; var E=this.getCenterLatLng(); this.setSpecification(Pa); this.div.style.backgroundColor=this.spec.backgroundColor; if(be.tileSize!=Pa.tileSize) { this.topLeftTile=null; this.initializeMap() } this.centerAtLatLng(E); if(this.onspecificationchange)this.onspecificationchange(be,Pa) } ; d.prototype.setSpecification=function(Pa) { this.spec=Pa; if(!Pa.emptyTilePreload) { var Vb=document.createElement("IMG"); Vb.style.position="absolute"; Vb.style.visibility="hidden"; Vb.style.top=ha(-200); Vb.style.left=ha(-200); document.body.appendChild(Vb); Pa.emptyTilePreload=Vb } this.spec.emptyTilePreload.src=this.spec.emptyTileURL } ; d.prototype.zoomTo=function(va) { if(!this.topLeftTile)return; if(va>=this.spec.numZoomLevels) { va=this.spec.numZoomLevels-1 } else if(va<0) { va=0 } var Fe=this.zoomLevel; if(va!=Fe) { var E=this.getCenterLatLng(); this.centerAndZoom(E,va) } } ; d.prototype.toggleTileBorders=function() { if(this.tileImages) { for(var a=0; a<this.tileImages.length; a++) { if(this.tileImages[a]) { for(var K=0; K<this.tileImages[a].length; K++) { var f=this.tileImages[a][K]; if(f.hasBorder) { f.style.border="0"; f.hasBorder=false } else { f.style.border="1px solid black"; f.hasBorder=true } } } } } } ; d.prototype.addOverlay=function(ra) { this.overlays.push(ra); this.locations.clear(); for(var a=0; a<this.overlays.length; a++) { var ra=this.overlays[a]; if(ra.locations) { for(var K=0; K<ra.locations.length; K++) { var p=ra.locations[K]; if(p.icon.iconClass.name!="noicon") { this.locations.push(p) } } } } this.locations.sort(d.orderLocations); for(var a=0; a<this.locations.length; a++) { var p=this.locations[a]; if(!p.marker) { p.marker=this.createLocalMarker(p); this.setMarkerPosition(p.marker,p.icon.iconClass,p.point) } p.marker.icon.style.zIndex=10+a; p.marker.transparentIcon.style.zIndex=30+a } if(this.locations.length==1) { this.clearInfoWindowArgs(p.xml); this.showInfoWindow(this.locations[0]) } } ; function rb(da,bc,kb,r,nc) { this.icon=da; this.transparentIcon=bc; this.shadow=kb; this.layer=[da,bc,kb]; this.map=r; this.mouseTarget=nc } rb.prototype.addLayer=function(f) { this.layer.push(f) } ; rb.prototype.setPosition=function(x,m) { for(var a=0; a<this.layer.length; ++a) { this.layer[a].style.left=ha(x); this.layer[a].style.top=ha(m) } } ; rb.prototype.appendTo=function(j) { for(var a=0; a<this.layer.length; ++a) { j.appendChild(this.layer[a]) } } ; rb.prototype.removeFrom=function(j) { for(var a=0; a<this.layer.length; ++a) { j.removeChild(this.layer[a]) } } ; rb.prototype.hide=function() { for(var a=0; a<this.layer.length; ++a) { this.layer[a].style.display="none" } } ; rb.prototype.show=function() { for(var a=0; a<this.layer.length; ++a) { this.layer[a].style.display="" } } ; rb.prototype.isVisible=function() { return this.layer[0].style.display!="none" } ; d.prototype.createLocalMarker=function(p) { var S=this.createLocationMarker(p.icon.image,p.icon.iconClass); if(A.type==3) { var i=this; S.mouseTarget.location=p; S.mouseTarget.onmousedown=function(b) { return i.onIconMouseDown(this.location,b) } } else { var i=this; S.mouseTarget.onmousedown=function(b) { return i.onIconMouseDown(p,b) } } return S } ; var wf=0; d.prototype.createLocationMarker=function(Pf,s) { var da=n.create(Pf,s.width,s.height,0,0,10,false,"noprint"); var bc=n.create(tj,s.width,s.height,0,0,30,false,"noprint"); var kb=n.create(s.shadowURL,s.shadowWidth,s.height,0,0,3,false,"noprint"); var Zg=A.type==2?"ff":"ie"; var Mg=Wb.create(Pf.replace(/\.png$/,Zg+".gif"),s.width,s.height,0,0,10,false,"noscreen"); var lh=s.shadowURL.replace(/[^\/]*$/,"dithshadow.gif"); var Kh=Wb.create(lh,s.shadowWidth,s.height,0,0,3,false,"noscreen"); var r=null; var nc=bc; if(A.type==2) { var eg="map"+wf; wf++; r=document.createElement("map"); r.setAttribute("name",eg); var C=document.createElement("area"); C.setAttribute("shape","poly"); C.setAttribute("alt",""); C.setAttribute("coords",s.imageMap); C.setAttribute("href","javascript:void(0)"); nc=C; r.appendChild(C); this.div.appendChild(r); bc.setAttribute("usemap","#"+eg) } else { ga(nc,"pointer") } var ad=new rb(da,bc,kb,r,nc); ad.addLayer(Mg); if(A.type!=2) { ad.addLayer(Kh) } ad.appendTo(this.div); return ad } ; d.prototype.clearOverlays=function() { this.lastPageCenter=this.getCenterLatLng(); this.lastPageZoom=this.zoomLevel; for(var a=0; a<this.locations.length; a++) { var p=this.locations[a]; p.marker.removeFrom(this.div); if(p.marker.map)this.div.removeChild(p.marker.map); p.marker=null } this.closeInfoWindow(); this.overlays.clear(); this.locations.clear(); this.directions=null; this.drawDirections(null,this.directionsDiv) } ; d.prototype.getDivCoordinate=function(x,m,e) { if(!e)e=new q(0,0); var Wi=x-this.topLeftTile.x*this.spec.tileSize-this.tilePaddingOffset.width+this.currentPanOffset.width*this.spec.tileSize; var zh=m-this.topLeftTile.y*this.spec.tileSize-this.tilePaddingOffset.height+this.currentPanOffset.height*this.spec.tileSize; e.x=Wi; e.y=zh; return e } ; d.orderLocations=function(Tf,of) { if(Tf.point.y>of.point.y)return-1; if(Tf.point.y<of.point.y)return 1; return 0 } ; d.prototype.repositionOverlays=function() { for(var a=0; a<this.locations.length; a++) { var ib=this.locations[a]; this.setMarkerPosition(ib.marker,ib.icon.iconClass,ib.point) } this.drawDirections(this.directions,this.directionsDiv,true); if(!this.disablePopups) { this.repositionInfoWindow(); if(A.type!=1&&this.infoWindow.hasMask())this.addMarkersToInfoWindowMask() } } ; d.prototype.setMarkerPosition=function(S,s,Eg) { var kc=this.spec.getBitmapCoordinate(Eg.y,Eg.x,this.zoomLevel); var Tc=this.getDivCoordinate(kc.x,kc.y); var x=Tc.x-s.pointCoord.x; var m=Tc.y-s.pointCoord.y; S.setPosition(x,m) } ; d.prototype.loadVPage=function(G,ug,Qh) { this.clearOverlays(); var E=ug?ug:G.center; var V=Qh; if(V==null&&G.viewSpan) { V=this.spec.getLowestZoomLevel(G.viewSpan,this.viewSize.width,this.viewSize.height) } this.lastPageZoom=V; this.lastPageCenter=E; if(E) { if(!this.topLeftTile||V!=null&&V!=this.zoomLevel) { if(V==null)V=4; this.centerAndZoom(E,V) } else { this.recenterOrPanToLatLng(E) } } for(var a=0; a<G.overlays.length; a++) { this.addOverlay(G.overlays[a]) } this.directions=G.directions; this.drawDirections(this.directions,this.directionsDiv); this.onStateChanged() } ; d.prototype.registerKeyHandlers=function(J) { P(J,"keydown",this.eventHandler("onKeyPress")); P(J,"keyup",this.eventHandler("onKeyUp")) } ; d.prototype.onKeyPress=function(b) { if(this.ignoreKeyEvent(b)) { return true } switch(b.keyCode) { case 38:case 40:case 37:case 39:this.panKeys.add(b.keyCode); this.startContinuousPan(); return false; case 34:this.pan(0,-Math.floor(this.viewSize.height*0.75)); return false; case 33:this.pan(0,Math.floor(this.viewSize.height*0.75)); return false; case 36:this.pan(Math.floor(this.viewSize.width*0.75),0); return false; case 35:this.pan(-Math.floor(this.viewSize.width*0.75),0); return false; case 187:case 107:this.zoomTo(this.zoomLevel-1); return false; case 189:case 109:this.zoomTo(this.zoomLevel+1); return false } switch(b.which) { case 61:case 43:this.zoomTo(this.zoomLevel-1); return false; case 45:case 95:this.zoomTo(this.zoomLevel+1); return false } return true } ; d.prototype.onKeyUp=function(b) { switch(b.keyCode) { case 38:case 40:case 37:case 39:this.panKeys.remove(b.keyCode); return false } } ; d.prototype.ignoreKeyEvent=function(b) { if(b.ctrlKey||(b.altKey||b.metaKey)) { return true } if(b.target&&(b.target.nodeName=="INPUT"&&b.target.getAttribute("type").toLowerCase()=="text"||b.target.nodeName=="TEXTAREA")) { return true } return false } ; d.prototype.startContinuousPan=function() { if(!this.topLeftTile) { return } this.cancelPan(); if(!this.continuousPanTimeout) { this.panSiner=new tc(100); this.continuousPanTimeout=this.setTimeout("this.doContinuousPan()",5) } } ; d.prototype.doContinuousPan=function() { if(this.panKeys.size>0) { var xe=(this.panKeys.contains(37)?1:0)+(this.panKeys.contains(39)?-1:0); var cf=(this.panKeys.contains(38)?1:0)+(this.panKeys.contains(40)?-1:0); var jb=1; if(this.panSiner.more()) { jb=this.panSiner.next() } var wb=xe>0?Math.floor:Math.ceil; var Fa=wb(7*jb*xe+5*xe); wb=cf>0?Math.floor:Math.ceil; var Ja=wb(7*jb*cf+5*cf); this.dragObject.moveTo(this.dragObject.left+Fa,this.dragObject.top+Ja); this.onMove(); this.rotateTiles(); this.continuousPanTimeout=this.setTimeout("this.doContinuousPan()",10) } else { this.continuousPanTimeout=null; this.onStateChanged() } } ; d.prototype.onWindowBlur=function(b) { if(this.panKeys.size>0) { this.panKeys=new Nc() } } ; d.prototype.onIconMouseDown=function(p,b) { ja(b); if(this.onmousedown)this.onmousedown(); this.clearInfoWindowArgs(p.xml); this.showInfoWindow(p) } ; d.prototype.clearInfoWindowArgs=function(M) { M.setAttribute("arg0",""); M.setAttribute("arg1",""); M.setAttribute("arg2","") } ; d.prototype.infoWindowNavigate=function(Ph,If,Fg,Rf) { if(!this.openLocation||this.disablePopups)return; if(If)this.openLocation.xml.setAttribute("arg0",If); if(Fg)this.openLocation.xml.setAttribute("arg1",Fg); if(Rf)this.openLocation.xml.setAttribute("arg2",Rf); this.onInfoWindowLoad=Ph; this.showInfoWindow(this.openLocation) } ; d.prototype.showInfoWindow=function(p) { if(this.disablePopups)return; if(!p.infoStyle)return; this.openLocation=p; var ca=this.spec.getBitmapCoordinate(p.point.y,p.point.x,this.zoomLevel); var Ia=this.getDivCoordinate(ca.x,ca.y); this.infoWindow.point=p.point; this.infoWindow.iconClass=p.icon.iconClass; var i=this; var bh=function() { i.showSizedInfoWindow(Ia.x,Ia.y,p.icon.iconClass) } ; Od(p,this.infoWindow.offscreenArea,p.infoStyle,bh,null,p.toHTML) } ; d.prototype.addMarkersToInfoWindowMask=function() { if(this.disablePopups||(!this.infoWindow.isVisible()||!this.infoWindow.point))return; this.infoWindow.clearMaskMap(); var Sa=new q(this.infoWindow.getOffsetLeft(),this.infoWindow.getOffsetTop()); var yb=new q(Sa.x+this.infoWindow.getTotalWidth(),Sa.y+this.infoWindow.getTotalHeight()); for(var a=0; a<this.locations.length; a++) { var S=this.locations[a].marker; if(S.icon.offsetTop>yb.y)break; this.addMarkerToInfoWindowMask(Sa,yb,S) } if(this.directionsMarkersAreVisible()) { this.addMarkerToInfoWindowMask(Sa,yb,this.directionsStart); this.addMarkerToInfoWindowMask(Sa,yb,this.directionsEnd) } } ; d.prototype.addMarkerToInfoWindowMask=function(Sa,yb,S) { var da=S.icon; if(da.offsetLeft+da.width>=Sa.x&&(da.offsetLeft<=yb.x&&(da.offsetTop+da.height>=Sa.y&&da.offsetTop<=yb.y))) { var Ve=Q.get("local").translateImageMapArray(da.offsetLeft-Sa.x,da.offsetTop-Sa.y); this.infoWindow.addAreaToMaskMap(Ve,S.mouseTarget.onmousedown) } } ; d.prototype.showSizedInfoWindow=function(x,m,s,Cd) { La.invalidate("infoWindowOffscreen"); var df=La.create("infoWindowOffscreen"); this.infoWindow.prepareOffscreen(); var r=this; var Gi=function() { if(df.isValid()) { r.infoWindow.flipOffscreenArea(); r.infoWindow.sizeToContent(Cd); r.infoWindow.positionAt(x,m,s); if(A.type!=1&&r.infoWindow.hasMask()) { r.addMarkersToInfoWindowMask() } r.infoWindow.show(); r.panToInfoWindow(); if(r.onInfoWindowLoad) { r.onInfoWindowLoad(); r.onInfoWindowLoad=null } } } ; window.setTimeout(Gi,0) } ; d.prototype.showMapBlowup=function(k,s) { if(this.disablePopups)return; var ca=this.spec.getBitmapCoordinate(k.y,k.x,this.zoomLevel); var Ia=this.getDivCoordinate(ca.x,ca.y); this.infoWindow.point=k; this.infoWindow.iconClass=s?s:Q.get("noicon"); var W=document.createElement("div"); W.style.border="1px solid silver"; W.style.width="200px"; W.style.height="200px"; var Nd=new d(W,this.spec,200,200,true,true,this.mapTypes); Nd.directions=this.directions; Nd.centerAndZoom(k,1); this.infoWindow.clearOffscreenArea(); this.infoWindow.offscreenArea.appendChild(W); if(this.mapTypes.length>1) { var xb=document.createElement("div"); xb.style.marginTop="5px"; xb.style.fontSize="small"; Nd.createSpecToggleLinks(xb); this.infoWindow.offscreenArea.appendChild(xb) } this.showSizedInfoWindow(Ia.x,Ia.y,this.infoWindow.iconClass,203); return Nd } ; d.prototype.createSpecToggleLinks=function(xb) { var kf=new Array(); for(var a=0; a<this.mapTypes.length; a++) { var ta=this.mapTypes[a]; var Ra=this.createSpecChangeLink(ta); kf.push(Ra); xb.appendChild(Ra); if(a<this.mapTypes.length-1) { xb.appendChild(document.createTextNode(" - ")) } } var i=this; this.onspecificationchange=function(be,Pa) { for(var a=0; a<i.mapTypes.length; a++) { var ta=i.mapTypes[a]; var Ra=kf[a]; if(Pa==ta) { Ra.className="selected" } else { Ra.className=null } } if(A.type==1) { i.setTimeout("this.reconfigureAllImages()",0) } } ; this.onspecificationchange(null,this.spec) } ; d.prototype.createSpecChangeLink=function(ta) { var i=this; var Th=function() { i.switchSpecification(ta) } ; return ai(ta.getLinkText(),Th) } ; d.prototype.onInfoCloseClick=function(b) { this.closeInfoWindow() } ; d.prototype.closeInfoWindow=function() { if(!this.disablePopups) { this.infoWindow.hide(); if(this.oninfowindowclose)this.oninfowindowclose() } } ; d.prototype.panToInfoWindow=function() { if(this.disablePopups) { return } var ca=this.spec.getBitmapCoordinate(this.infoWindow.point.y,this.infoWindow.point.x,this.zoomLevel); var Ia=this.getDivCoordinate(ca.x,ca.y); var xa=new q(this.centerBitmap.x,this.centerBitmap.y); var O=this.infoWindow.left+(ca.x-Ia.x); var top=this.infoWindow.top+(ca.y-Ia.y); var Lg=Math.floor(this.viewSize.width/2); var Yd=Math.floor(this.viewSize.height/2); xa.y=Math.min(xa.y,top+Yd-25); xa.y=Math.max(xa.y,ca.y-Yd+25); var Bc=25; var yg=ca.y-this.infoWindow.getTotalHeightAboveGround()-(xa.y-Yd); if(yg<55)Bc=Bc+50; else if(yg<295)Bc=Bc+35; xa.x=Math.min(xa.x,O+Lg-Bc); xa.x=Math.max(xa.x,O+this.infoWindow.getTotalWidth()-Lg+25); this.centerLatLng=null; this.recenterOrPanToBitmap(xa) } ; d.prototype.repositionInfoWindow=function() { if(this.disablePopups||(!this.infoWindow.isVisible()||!this.infoWindow.point))return; var k=this.infoWindow.point; var ca=this.spec.getBitmapCoordinate(k.y,k.x,this.zoomLevel); var Ia=this.getDivCoordinate(ca.x,ca.y); this.infoWindow.positionAt(Ia.x,Ia.y,this.infoWindow.iconClass) } ; var Bi=new q(0,0); var Xe=new q(0,0); d.prototype.getVMLPathString=function(B) { L.start("Map","getVMLPathString"); var u=new Array(); u.push("m"); u.push(B.polyline.points[0]); u.push(B.polyline.points[1]); u.push("l"); u=u.concat(B.polyline.points); for(var a=0; a<B.segments.length; a++) { var ba=B.segments[a].pointIndex<<1; var Ld=ba+4; var Gf=u[Ld]; var Bg=u[Ld+1]; u[Ld]=Gf+" "+Bg+" e m"; u[Ld+1]=Gf+" "+Bg+" l" } u.push("e"); var str=u.join(" "); L.end("Map","getVMLPathString"); return str } ; d.prototype.createRawVML=function(af,j,c) { L.start("Map","createRawVML"); var Ea; if(!c) { c=document.createElement("v:shape"); Ea=document.createElement("v:stroke"); c.appendChild(Ea); c.path=af } else { j.removeChild(c); Ea=c.firstChild } var Ob=this.centerBitmap; var Pc=this.getDivCoordinate(Ob.x,Ob.y,Xe); c.unselectable="on"; c.strokecolor="blue"; c.strokeweight=5; c.fill=false; c.filled=false; var h=100; var l=100; c.style.position="absolute"; c.style.width=h+"px"; c.style.height=l+"px"; c.style.left=Pc.x+"px"; c.style.top=Pc.y-l+"px"; c.style.rotation="-90"; var fd=this.getCenterLatLng(); var ve=fd.y*100000+" "+fd.x*100000; c.coordorigin=ve; var Hf=this.spec.getPixelsPerDegree(this.zoomLevel); c.coordsize=100000*l/Hf.y+" "+100000*h/Hf.x; Ea.joinstyle="round"; Ea.endcap="round"; Ea.opacity=0.45; L.end("Map","createRawVML"); j.appendChild(c); return c } ; d.prototype.getBitmapVectors=function(vb,v,D) { if(!v)v=new Array(); if(!D)D=new Z(); D.minX=U; D.minY=U; D.maxX=-U; D.maxY=-U; for(var a=0; a<vb.length; ) { var gb=vb[a++]; var tb=vb[a++]; var pa=this.spec.getBitmapCoordinate(gb,tb,this.zoomLevel,Bi); pa.x=Math.round(pa.x); pa.y=Math.round(pa.y); v.push(pa.x); v.push(pa.y); if(pa.x<D.minX)D.minX=pa.x; if(pa.y<D.minY)D.minY=pa.y; if(pa.x>D.maxX)D.maxX=pa.x; if(pa.y>D.maxY)D.maxY=pa.y } return v } ; d.prototype.getVectorPath=function(v,D) { var u=new Array(); var Ec; var Dc; for(var a=0; a<v.length; ) { var zb=v[a++]; var Eb=v[a++]; var ac=v[a++]; var Ub=v[a++]; if(Eb!=Ec||zb!=Dc) { u.push("m"); u.push(zb); u.push(Eb); u.push("l") } u.push(ac); u.push(Ub); Ec=Ub; Dc=ac } u.push("e"); return u.join(" ") } ; d.prototype.getEncodedImageSource=function(v,D) { var u=new Array(); var Dc; var Ec; for(var a=0; a<v.length; ) { var zb=v[a++]; var Eb=v[a++]; var ac=v[a++]; var Ub=v[a++]; if(zb==ac&&Eb==Ub) { continue } if(zb!=Dc||Eb!=Ec) { if(u.length>0) { hc(9999,u) } hc(zb-D.minX,u); hc(Eb-D.minY,u) } hc(ac-zb,u); hc(Ub-Eb,u); Ec=Ub; Dc=ac } hc(9999,u); return u.join("") } ; d.prototype.createVectorSegments=function(Pb,Xb,Za,oa) { L.start("Map","createVectorSegments"); var vb=Pb.getVectors(Xb,Za); var v=new Array(); var na=new Z(); this.getBitmapVectors(vb,v,na); if(!oa) { oa=new Z() } var Na=new Z(Math.max(oa.minX,na.minX),Math.max(oa.minY,na.minY),Math.min(oa.maxX,na.maxX),Math.min(oa.maxY,na.maxY)); var c; if(v.length>0) { var Ob=this.centerBitmap; var Pc=this.getDivCoordinate(Ob.x,Ob.y,Xe); c=document.createElement("v:shape"); c.unselectable="on"; c.strokecolor="blue"; c.strokeweight=5; c.fill=false; c.filled=false; var h=1; var l=1; c.style.position="absolute"; c.style.width=h+"px"; c.style.height=l+"px"; c.style.left=Pc.x+"px"; c.style.top=Pc.y+"px"; var ve=Ob.x+" "+Ob.y; c.coordorigin=ve; c.coordsize=h+" "+l; c.path=this.getVectorPath(v,Na); var Ea=document.createElement("v:stroke"); Ea.joinstyle="round"; Ea.endcap="round"; Ea.opacity=0.45; c.appendChild(Ea) } else { c=document.createElement("div") } c.sourceBounds=oa; L.end("Map","createVectorSegments"); return c } ; d.prototype.createImageSegments=function(Pb,Xb,Za,oa) { L.start("Map","createImageSegments"); var u; var Na; do { var vb=Pb.getVectors(Xb,Za); var v=new Array(); var na=new Z(); this.getBitmapVectors(vb,v,na); na.minX-=10; na.minY-=10; na.maxX+=10; na.maxY+=10; if(!oa) { oa=new Z() } Na=new Z(Math.max(oa.minX,na.minX),Math.max(oa.minY,na.minY),Math.min(oa.maxX,na.maxX),Math.min(oa.maxY,na.maxY)); u=this.getEncodedImageSource(v,Na); ++Za } while(u.length>900); var c; if(u.length>0) { var Zf=this.getDivCoordinate(Na.minX,Na.minY,Xe); var h=Math.ceil(Na.maxX-Na.minX); var l=Math.ceil(Na.maxY-Na.minY); var J="http://www.google.com/maplinedraw?width="+h+"&height="+l+"&path="+u; Sd('<a href="'+db(J)+'">'+Jb(J)+"</a>",0); if(A.type!=1) { h=null; l=null } var Ha=A.type==2?"noprint":null; c=n.create(J,h,l,Zf.x,Zf.y,0,false,Ha) } else { c=document.createElement("div") } c.sourceBounds=oa; L.end("Map","createImageSegments"); return c } ; d.prototype.drawDirections=function(B,R,ti) { if(!B&&!R.directions)return; var Yg=this.getBoundsBitmap(); var ma=R.directionsBounds; if(!ti) { if(B==R.directions) { if(ma.containsBounds(Yg)) { return } } } if(R.directions!=B) { while(R.hasChildNodes()) { R.removeChild(R.lastChild) } R.directions=B; if(this.useRawVml&&(B&&(A.type==1&&(!this.forceImageSegments&&B.polyline.points.length<16000)))) { var af=this.getVMLPathString(B); R.path=af } else { R.path=null } } if(B) { L.start("Map","drawDirections"); var c=null; var Cf=900; var h=Math.min(this.viewSize.width,Cf); var l=Math.min(this.viewSize.height,Cf); if(A.type==1&&!this.forceImageSegments) { h=5000; l=5000 } ma.minX=this.centerBitmap.x-h; ma.minY=this.centerBitmap.y-l; ma.maxX=this.centerBitmap.x+h; ma.maxY=this.centerBitmap.y+l; var Ga=this.spec.getLatLng(ma.minX,ma.minY,this.zoomLevel); var Ca=this.spec.getLatLng(ma.maxX,ma.maxY,this.zoomLevel); var Xb=new Z(Ga.x,Ca.y,Ca.x,Ga.y); if(R.path) { c=null; if(R.hasChildNodes()) { c=R.firstChild } c=this.createRawVML(R.path,R,c) } else { while(R.hasChildNodes()) { R.removeChild(R.lastChild) } var Za=0; var Aa=new aa(B.polyline.minTolerance,B.polyline.minTolerance); while(Za<B.polyline.numLevels) { Aa.width*=B.polyline.zoomFactor; Aa.height*=B.polyline.zoomFactor; if(this.zoomLevel<this.spec.getLowestZoomLevel(Aa,2,2)) { break } ++Za } if(A.type==1&&!this.forceImageSegments) { c=this.createVectorSegments(B.polyline,Xb,Za,ma) } else { c=this.createImageSegments(B.polyline,Xb,Za,ma) } R.appendChild(c) } c.style.zIndex=2; this.drawDirectionsMarkers(); this.setDirectionIndicatorPos(); L.end("Map","drawDirections") } else { ma.minX=-U; ma.minY=-U; ma.maxX=U; ma.maxY=U; this.hideDirectionsMarkers() } } ; var mi=o+"dd-start.png"; var Nh=o+"dd-end.png"; d.prototype.drawDirectionsMarkers=function() { if(!this.directionsStart||!this.directionsEnd) { this.directionsStart=this.createLocationMarker(mi,Q.get("local")); this.directionsEnd=this.createLocationMarker(Nh,Q.get("local")); var i=this; this.directionsStart.mouseTarget.onmousedown=function(b) { ja(b); i.showDirectionsStart() } ; this.directionsEnd.mouseTarget.onmousedown=function(b) { ja(b); i.showDirectionsEnd() } } this.setMarkerPosition(this.directionsStart,Q.get("local"),this.directions.polyline.getPoint(0)); var Rb=(this.directions.polyline.points.length>>1)-1; this.setMarkerPosition(this.directionsEnd,Q.get("local"),this.directions.polyline.getPoint(Rb)); this.directionsStart.show(); this.directionsEnd.show(); var ge=0; var De=0; if(this.directions.polyline.getPoint(0).y<this.directions.polyline.getPoint(Rb).y) { ge=1 } else { De=1 } this.directionsStart.icon.style.zIndex=10+ge; this.directionsStart.transparentIcon.style.zIndex=30+ge; this.directionsEnd.icon.style.zIndex=10+De; this.directionsEnd.transparentIcon.style.zIndex=30+De } ; d.prototype.showDirectionsStart=function() { if(!this.directions)return; this.showMapBlowup(this.directions.polyline.getPoint(0),Q.get("local")) } ; d.prototype.showDirectionsEnd=function() { if(!this.directions)return; var Rb=(this.directions.polyline.points.length>>1)-1; this.showMapBlowup(this.directions.polyline.getPoint(Rb),Q.get("local")) } ; d.prototype.showDirectionsStep=function(ec) { if(!this.directions)return; var k=this.directions.polyline.getPoint(ec.pointIndex); var Gb=this.showMapBlowup(k); if(ec.pointIndex!=0) { var Oa=Gb.getDirIndicatorAngle(ec.pointIndex); var sj=Gb.getDirIndicatorPath(Oa); var S=n.create(sj,24,24,0,0,2,false); Gb.directionMarker=S; Gb.directionMarkerAngle=Oa; Gb.directionMarkerPoint=k; Gb.setDirectionIndicatorPos(); Gb.div.appendChild(S) } } ; d.prototype.setDirectionIndicatorPos=function() { var S=this.directionMarker; if(!S)return; var Oa=this.directionMarkerAngle; var k=this.directionMarkerPoint; var mc=12*Math.cos(Oa); var Fc=12*Math.sin(Oa); mc=Math.floor(-12-mc); Fc=Math.floor(-12-Fc); var kc=this.spec.getBitmapCoordinate(k.y,k.x,this.zoomLevel); var Tc=this.getDivCoordinate(kc.x,kc.y); S.style.left=ha(Tc.x+mc); S.style.top=ha(Tc.y+Fc) } ; d.prototype.getDirIndicatorAngle=function(ba) { var Oa=0; if(ba>1) { var wa=this.directions.polyline.getPoint(ba-2); var za=this.directions.polyline.getPoint(ba); wa=this.spec.getBitmapCoordinate(wa.y,wa.x,this.zoomLevel); za=this.spec.getBitmapCoordinate(za.y,za.x,this.zoomLevel); Oa=Math.atan2(za.y-wa.y,za.x-wa.x) } return Oa } ; var lj=o+"dir_"; d.prototype.getDirIndicatorPath=function(Oa) { var uc=Math.round(Oa*60/Math.PI)*3+90; while(uc>=120)uc-=120; while(uc<0)uc+=120; var J=lj+uc+".png"; return J } ; d.prototype.hideDirectionsMarkers=function() { if(this.directionsStart&&this.directionsEnd) { this.directionsStart.hide(); this.directionsEnd.hide() } } ; d.prototype.directionsMarkersAreVisible=function() { return this.directionsStart&&(this.directionsEnd&&(this.directionsStart.isVisible()&&this.directionsEnd.isVisible())) } ; d.prototype.createMapControl=function() { var ea=document.createElement("div"); this.createPanningControls(ea); this.createZoomControls(ea); this.createZoomSlider(ea); return ea } ; var Ci=o+"zoom-plus.png"; var vi=o+"zoom-minus.png"; var zi=o+"sliderbar.png"; var ei=o+"slider.png"; d.prototype.createZoomControls=function(ea) { var i=this; var Bd=n.create(Ci,17,17,20,70,1,false); ga(Bd,"pointer"); P(Bd,"click",function(b) { i.zoomTo(i.zoomLevel-1); ja(b) } ); Bd.title=_mZoomIn; ea.appendChild(Bd); var Dd=n.create(vi,17,17,20,260,1,false); ga(Dd,"pointer"); P(Dd,"click",function(b) { i.zoomTo(i.zoomLevel+1); ja(b) } ); Dd.title=_mZoomOut; ea.appendChild(Dd) } ; var Mh=o+"center.png"; var Li=o+"east.png"; var ui=o+"west.png"; var Ng=o+"north.png"; var Ii=o+"south.png"; var ej=o+"panshadow.png"; d.prototype.createPanningControls=function(ea) { var i=this; var kb=n.create(ej,59,64,0,0,0,false); ea.appendChild(kb); var dd=n.create(Ng,17,17,20,0,1,false); ga(dd,"pointer"); P(dd,"click",function(b) { i.pan(0,Math.floor(i.viewSize.height*0.5)); ja(b) } ); dd.title=_mPanNorth; ea.appendChild(dd); var hd=n.create(Li,17,17,40,20,1,false); ga(hd,"pointer"); P(hd,"click",function(b) { i.pan(-Math.floor(i.viewSize.width*0.5),0); ja(b) } ); hd.title=_mPanEast; ea.appendChild(hd); var Vd=n.create(Ii,17,17,20,40,1,false); ga(Vd,"pointer"); P(Vd,"click",function(b) { i.pan(0,-Math.floor(i.viewSize.height*0.5)); ja(b) } ); Vd.title=_mPanSouth; ea.appendChild(Vd); var yd=n.create(ui,17,17,0,20,1,false); ga(yd,"pointer"); P(yd,"click",function(b) { i.pan(Math.floor(i.viewSize.width*0.5),0); ja(b) } ); yd.title=_mPanWest; ea.appendChild(yd); var E=n.create(Mh,17,17,20,20,1,false); ga(E,"pointer"); P(E,"click",function(b) { if(i.lastPageCenter) { if(i.lastPageZoom!=i.zoomLevel) { i.centerAndZoom(i.lastPageCenter,i.lastPageZoom) } else { i.recenterOrPanToLatLng(i.lastPageCenter) } } else if(i.lastLatLng) { i.recenterOrPanToLatLng(this.map.lastLatLng) } ja(b) } ); E.title=_mLastResult; ea.appendChild(E) } ; var Eh=o+"slidershadow.png"; d.prototype.createZoomSlider=function(ea) { var kb=n.create(Eh,19,215,20,64,0,false); ea.appendChild(kb); var Xa=document.createElement("div"); Xa.style.position="absolute"; Xa.style.left="21px"; Xa.style.top="90px"; Xa.style.width="15px"; Xa.style.height="167px"; var Wd=n.create(zi,15,167,0,0,1,false); Xa.appendChild(Wd); var Mc=-1*Math.floor(3.5)+1; var Oe=n.create(ei,22,14,Mc,this.getRelativeZoomSliderPos(),2,false); Oe.title=_mZoomDrag; Xa.appendChild(Oe); ea.appendChild(Xa); var D=new Z(Mc,1,Mc+22,166); var me=new ab(Oe,Mc,this.getRelativeZoomSliderPos(),D); this.onzoom=function() { me.moveTo(Mc,i.getRelativeZoomSliderPos()) } ; var i=this; me.ondragend=function() { var Yi=me.top+Math.floor(5.5); i.zoomTo(i.getZoomFromRelativeCoord(Yi)) } ; ga(Wd,"pointer"); Wd.title=_mZoomSet; P(Wd,"click",function(b) { var m; if(window.event) { m=window.event.offsetY } else { var Kd=gd(Xa); m=b.pageY-Kd.y-2 } ja(b); i.zoomTo(i.getZoomFromRelativeCoord(m)) } ) } ; d.prototype.getRelativeZoomSliderPos=function() { return 1+this.zoomLevel*11 } ; d.prototype.getZoomFromRelativeCoord=function(m) { var V=Math.floor((m-1)/11); return Math.max(0,Math.min(this.spec.numZoomLevels-1,V)) } ; d.prototype.showCopyright=function() { var Ne=this.createCopyright(_mGoogleCopy); Ne.style.left="3px"; Ne.style.bottom="3px"; this.container.appendChild(Ne); var fe=this.createCopyright(_mDataCopy); fe.style.right="3px"; fe.style.bottom="3px"; this.container.appendChild(fe) } ; d.prototype.createCopyright=function(Y) { var j=document.createElement("div"); j.style.position="absolute"; ga(j,"default"); j.unselectable="on"; j.onselectstart=Be; j.innerHTML=Y; j.style.fontSize="11px"; j.style.fontFamily="Arial, sans serif"; ic(j,"noselect"); return j } ; function dc(r) { this.anchorLevel=null; this.anchor=new q(0,0); this.spec=null; this.span=new aa(U,U); this.points=null; this.map=r; this.map.addStateListener(this); this.map.onresize=this.eventHandler("onMapResize") } var _bPoint=new q(0,0); dc.prototype.onMapStateChanged=function() { if(this.anchorLevel!=this.map.zoomLevel||this.spec!=this.map.spec) { this.reset(); this.addPoint(0,0,true); return } var E=this.map.getCenterLatLng(_bPoint); var vd=Math.round((E.x-this.anchor.x)/this.span.width); var Td=Math.round((E.y-this.anchor.y)/this.span.height); this.addPoint(vd,Td,true) } ; dc.prototype.onMapResize=function() { this.reset(); this.addPoint(0,0,false) } ; dc.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() } ; dc.prototype.addPoint=function(vd,Td,Yh) { var str=vd+","+Td; if(this.points[str])return; this.points[str]=1; if(Yh) { var z=new ua(); z.setAllMapValues(this.map); var Ce=_bPoint; Ce.x=this.anchor.x+vd*this.span.width; Ce.y=this.anchor.y+Td*this.span.height; z.setValue("vp",z.getLatLngArg(Ce)); var fa=z.getURL(); Sd('<a href="'+db(fa)+'">'+Jb(fa)+"</a>",0); if(!this.sender) { this.sender=document.createElement("img"); this.sender.style.position="absolute"; this.sender.style.visibility="hidden"; this.sender.style.top=ha(-10); this.sender.style.left=ha(-10); this.sender.style.width=ha(1); this.sender.style.height=ha(1); document.body.appendChild(this.sender) } this.sender.src=fa } } ; function ab(J,O,top,W) { this.src=J; this.container=W; this.ondragstart=null; this.ondrag=null; this.ondragend=null; this.onmove=null; this.onclick=null; this.disabled=false; this.dragPoint=new q(0,0); this.clickStartPos=new q(0,0); this.src.style.position="absolute"; this.moveTo(O,top); this.mouseDownHandler=this.eventHandler("onMouseDown"); this.mouseMoveHandler=this.eventHandler("onMouseMove"); this.mouseUpHandler=this.eventHandler("onMouseUp"); if(A.type==2) { P(window,"mouseout",this.eventHandler("onWindowMouseOut")) } this.eventSrc=this.src.setCapture?this.src:window; P(this.src,"mousedown",this.mouseDownHandler) } ab.prototype.moveTo=function(O,top) { if(this.left!=O||this.top!=top) { this.left=O; this.top=top; this.src.style.left=this.left+"px"; this.src.style.top=this.top+"px"; if(this.onmove) { this.onmove() } } } ; ab.prototype.onMouseDown=function(b) { if(b.cancelDrag) { return } var Xi=b.button==0||b.button==1; if(this.disabled||!Xi) { ja(b); return false } this.dragPoint.x=b.screenX; this.dragPoint.y=b.screenY; P(this.eventSrc,"mousemove",this.mouseMoveHandler); P(this.eventSrc,"mouseup",this.mouseUpHandler); if(this.src.setCapture) { this.src.setCapture() } this.clickStartTime=(new Date()).getTime(); this.clickStartPos.x=b.screenX; this.clickStartPos.y=b.screenY; if(this.ondragstart) { this.ondragstart(b) } this.originalCursor=this.src.style.cursor; ga(this.src,"move"); ja(b) } ; ab.prototype.onMouseMove=function(b) { if(A.os==1) { if(b==null) { return } if(this.dragDisabled) { this.savedMove=new Object(); this.savedMove.screenX=b.screenX; this.savedMove.screenY=b.screenY; return } this.setTimeout("this.dragDisabled = false; this.onMouseMove(this.savedMove)",30); this.dragDisabled=true; this.savedMove=null } var jf=1; if(A.type==3&&A.version==1) { jf=-1 } var x=this.left+(b.screenX-this.dragPoint.x); var m=this.top+(b.screenY-this.dragPoint.y)*jf; var Fa=0; var Ja=0; if(this.container) { var bd=x; if(x<this.container.minX) { bd=this.container.minX } else { var Gd=this.container.maxX-this.src.offsetWidth; if(x>Gd) { bd=Gd } } Fa=bd-x; x=bd; var rd=m; if(m<this.container.minY) { rd=this.container.minY } else { var id=this.container.maxY-this.src.offsetHeight; if(m>id)rd=id } Ja=rd-m; m=rd } this.moveTo(x,m); this.dragPoint.x=b.screenX+Fa; this.dragPoint.y=b.screenY+Ja; if(this.ondrag) { this.ondrag(b) } } ; ab.prototype.onMouseUp=function(b) { nf(this.eventSrc,"mousemove",this.mouseMoveHandler); nf(this.eventSrc,"mouseup",this.mouseUpHandler); ga(this.src,this.originalCursor); if(document.releaseCapture) { document.releaseCapture() } if(this.ondragend) { this.ondragend(b) } if(this.onclick) { var ii=(new Date()).getTime(); if(ii-this.clickStartTime<=500&&(Math.abs(this.clickStartPos.x-b.screenX)<=2&&Math.abs(this.clickStartPos.y-b.screenY)<=2)) { this.onclick(b) } } } ; ab.prototype.onWindowMouseOut=function(b) { if(!b.relatedTarget) { this.onMouseUp(b) } } ; ab.prototype.disable=function() { this.disabled=true } ; ab.prototype.enable=function() { this.disabled=false } ; var Te="centerlat"; var Ue="centerlng"; function qc(qb,bb,Xc,ud,E,bi,dh,Mi,kh,C,td,B,Fb,M) { this.query=qb; this.title=bb; this.error=Xc; this.spelling=ud; this.center=E; this.viewSpan=bi; this.searchCenter=dh; this.searchSpan=Mi; this.ads=kh; this.area=C; this.overlays=td; this.directions=B; this.debug=Fb; this.xml=M } function vc(Pd,Vh,M) { this.locations=Pd; this.panelStyle=Vh; this.xml=M } function kd(H,k,da,Jh,M) { this.id=H; this.point=k; this.icon=da; this.infoStyle=Jh; this.xml=M } function bf(f,s) { this.image=f; this.iconClass=s } function oc(Pb,pd,M) { this.polyline=Pb; this.segments=pd; this.xml=M } function se(H,ef,ba) { this.id=H; this.description=ef; this.pointIndex=ba } function Q(w,h,l,wh,dj,oh,pi,Ih,ie) { this.name=w; this.width=h; this.height=l; this.pointCoord=wh; this.infoTipCoord=dj; this.shadowTipCoord=oh; this.shadowURL=pi; this.shadowWidth=Ih; this.imageMapArray=ie; if(this.imageMapArray) { this.imageMap=this.imageMapArray.join(",") } else { this.imageMap=null } } Q.prototype.translateImageMapArray=function(x,m) { var fb=""; for(var a=0; a<this.imageMapArray.length; a+=2) { fb+=this.imageMapArray[a]+x+","+(this.imageMapArray[a+1]+m)+(a<this.imageMapArray.length-2?",":"") } return fb } ; Q.classes=new Object(); Q.load=function(s) { Q.classes[s.name]=s } ; Q.get=function(w) { return Q.classes[w] } ; qc.loadFromXML=function(c) { L.start("Page","loadFromXML"); var qb=null; var qg=c.getElementsByTagName("query"); if(qg.length>0) { qb=ia(qg[0]) } var bb=null; var Mf=c.getElementsByTagName("title"); if(Mf.length>0) { bb=ia(Mf[0]) } var Xc=null; var sg=c.getElementsByTagName("error"); if(sg.length>0) { Xc=sg[0] } var ud=null; var hf=c.getElementsByTagName("spelling"); if(hf.length>0) { ud=hf[0] } var E=null; var ue=c.getElementsByTagName("center"); if(ue.length>0) { E=new q(parseFloat(ue[0].getAttribute("lng")),parseFloat(ue[0].getAttribute("lat"))) } var Aa=null; var he=c.getElementsByTagName("span"); if(he.length>0) { Aa=new aa(parseFloat(he[0].getAttribute("lng")),parseFloat(he[0].getAttribute("lat"))) } var Gg=null; var Me=c.getElementsByTagName("searchcenter"); if(Me.length>0) { Gg=new q(parseFloat(Me[0].getAttribute("lng")),parseFloat(Me[0].getAttribute("lat"))) } var ag=null; var ne=c.getElementsByTagName("searchspan"); if(ne.length>0) { ag=new aa(parseFloat(ne[0].getAttribute("lng")),parseFloat(ne[0].getAttribute("lat"))) } var td=new Array(); var Yf=c.getElementsByTagName("overlay"); for(var a=0; a<Yf.length; a++) { td.push(vc.loadFromXML(Yf[a])) } var B=null; var wg=c.getElementsByTagName("directions"); if(wg.length>0) { B=oc.loadFromXML(wg[0]) } var Fb=null; var hg=c.getElementsByTagName("debug"); if(hg.length>0) { Fb=ia(hg[0]) } L.end("Page","loadFromXML"); return new qc(qb,bb,Xc,ud,E,Aa,Gg,ag,null,null,td,B,Fb,c) } ; vc.loadFromXML=function(c) { var Pd=new Array(); var tf=c.getElementsByTagName("location"); for(var a=0; a<tf.length; a++) { Pd.push(kd.loadFromXML(tf[a])) } return new vc(Pd,c.getAttribute("panelStyle"),c) } ; vc.prototype.getLocationById=function(H) { for(var a=0; a<this.locations.length; a++) { if(this.locations[a].id==H)return this.locations[a] } return null } ; kd.loadFromXML=function(c) { var rg=c.getElementsByTagName("point")[0]; var k=new q(parseFloat(rg.getAttribute("lng")),parseFloat(rg.getAttribute("lat"))); var nj=c.getElementsByTagName("icon")[0]; var da=bf.loadFromXML(nj); return new kd(c.getAttribute("id"),k,da,c.getAttribute("infoStyle"),c) } ; bf.loadFromXML=function(c) { var s=Q.get(c.getAttribute("class")); if(s) { return new bf(c.getAttribute("image"),s) } else { return null } } ; oc.loadFromXML=function(c) { var Fd=c.getElementsByTagName("polyline")[0]; var Rh=ia(Fd.getElementsByTagName("points")[0]); var ee=ia(Fd.getElementsByTagName("levels")[0]); var Re=parseInt(Fd.getAttribute("numLevels")); var je=parseInt(Fd.getAttribute("zoomFactor")); var Pb=new gc(Rh,ee,Re,je); var pd=new Array(); var uj=c.getElementsByTagName("segments")[0]; var Jf=uj.getElementsByTagName("segment"); for(var a=0; a<Jf.length; ++a) { pd.push(se.loadFromXML(Jf[a])) } return new oc(Pb,pd,c) } ; oc.prototype.getSegmentById=function(H) { for(var a=0; a<this.segments.length; a++) { if(this.segments[a].id==H)return this.segments[a] } return null } ; se.loadFromXML=function(c) { var H=c.getAttribute("id"); var ba=parseInt(c.getAttribute("pointIndex")); var ef=ia(c); return new se(H,ef,ba) } ; var hh=o+"iws_nw.png"; var mj=o+"iws_n.png"; var Di=o+"iws_ne.png"; var qh=o+"iws_e.png"; var ih=o+"iws_c.png"; var qi=o+"iws_w.png"; var sh=o+"iws_sw.png"; var Xf=o+"iws_s.png"; var mh=o+"iws_se.png"; var gh=o+"iws_tap.png"; var Pi=o+"iw_nw.png"; var si=o+"iw_n.png"; var Ei=o+"iw_ne.png"; var th=o+"iw_e.png"; var yh=o+"iw_c.png"; var xi=o+"iw_w.png"; var Ti=o+"iw_sw.png"; var Uf=o+"iw_s.png"; var Rg=o+"iw_se.png"; var hi=o+"iw_tap.png"; function t(Ji,Si,vg,ah,Tg) { this.oncloseclick=Si; this.createWindow(ah); this.createShadow(Tg); if(A.type!=1) { this.createMask() } else { this.maskPng=null } this.createContentArea(Ji); this.createCloseButton(); vg.appendChild(this.windowDiv); vg.appendChild(this.shadowDiv); this.setSize(208,69); this.hide() } t.prototype.setContentSize=function(h,l) { this.setSize(h-(this.window.w.width-15)*2,l-(this.window.n.height-15)*2) } ; t.prototype.setSize=function(h,l) { if(h<0)h=0; if(l<0)l=0; this.width=h; this.height=l; this.setWindowSize(h,l); this.setShadowSize(h,l); if(this.hasMask())this.setMaskSize(); this.closeButton.style.left=this.getTotalWidth()-this.closeButton.width-10-1+"px"; this.closeButton.style.top="10px" } ; t.prototype.getWindowHeight=function() { return this.window.c.height+2*this.window.n.height } ; t.prototype.getTotalHeight=function() { return this.height+this.window.pointer.height+this.window.n.height } ; t.prototype.getTotalHeightAboveGround=function() { return this.getTotalHeight()+(this.iconClass.pointCoord.y-this.iconClass.infoTipCoord.y) } ; t.prototype.getTotalShadowHeight=function() { return Math.floor(this.height/4)+this.shadow.pointer.height+this.shadow.nw.height } ; t.prototype.getTotalWidth=function() { return this.width+this.window.w.width+this.window.e.width } ; t.prototype.getOffsetLeft=function() { return this.windowDiv.offsetLeft } ; t.prototype.getOffsetTop=function() { return this.windowDiv.offsetTop } ; t.prototype.setWindowSize=function(h,l) { this.window.n.style.width=h+"px"; this.window.e.style.height=l+"px"; this.window.c.style.width=h+"px"; this.window.c.style.height=l+"px"; this.window.w.style.height=l+"px"; var Va=this.calculatePointerOffset(h); this.window.s1.style.width=Va+"px"; this.window.pointer.style.left=Va+this.window.sw.width+"px"; this.window.s2.style.left=Va+this.window.pointer.width+this.window.sw.width+"px"; this.window.s2.style.width=h-Va-this.window.pointer.width+"px"; var Zb=h+this.window.w.width+"px"; this.window.ne.style.left=Zb; this.window.e.style.left=Zb; this.window.se.style.left=Zb; var Da=l+this.window.n.height+"px"; this.window.sw.style.top=Da; this.window.s1.style.top=Da; this.window.pointer.style.top=Da; this.window.s2.style.top=Da; this.window.se.style.top=Da } ; t.prototype.setShadowSize=function(h,l) { h-=15; var Hb=Math.floor(l/4); var Zb=h+this.shadow.nw.width; var Va=this.calculatePointerOffset(h)-41; var Da=Hb+this.shadow.n.height+"px"; var Xd=Hb+this.shadow.nw.height; this.shadow.s1Div.style.width=Math.max(Va,0)+"px"; this.shadow.pointer.style.left=Va+this.shadow.sw.width+"px"; this.shadow.s2Div.style.left=Va+this.shadow.pointer.width+this.shadow.sw.width+"px"; this.shadow.s2Div.style.width=h-Va-this.shadow.pointer.width+"px"; this.shadow.sw.style.top=Da; this.shadow.s1Div.style.top=Da; this.shadow.pointer.style.top=Da; this.shadow.s2Div.style.top=Da; this.shadow.se.style.top=Da; this.shadow.se.style.left=Zb+"px"; var Sf=this.shadow.nw.height; var gg=Math.floor(l/2); this.shadow.wDiv.style.height=Hb+"px"; this.shadow.wDiv.style.left=Sf+"px"; this.shadow.wDiv.style.width=gg+"px"; this.shadow.w.style.left=Hb-this.shadow.w.width+80+"px"; var fg=this.shadow.nw.height+h+70; this.shadow.eDiv.style.height=Hb+"px"; this.shadow.eDiv.style.left=fg+"px"; this.shadow.eDiv.style.width=l+"px"; this.shadow.e.style.left=Hb-this.shadow.w.width+80+"px"; var sf=Sf+gg; this.shadow.cDiv.style.width=fg-sf+"px"; this.shadow.cDiv.style.height=Hb+"px"; this.shadow.cDiv.style.left=sf+"px"; this.shadow.nw.style.left=Xd+"px"; this.shadow.nDiv.style.width=h-30+"px"; this.shadow.nDiv.style.left=Xd+this.shadow.nw.width+"px"; this.shadow.ne.style.left=Zb+Xd-30+"px" } ; t.prototype.setMaskSize=function() { this.maskPng.style.width=this.getTotalWidth()+"px"; this.maskPng.style.height=this.getTotalHeight()+"px"; var tg=this.getTotalWidth(); var jd=this.getWindowHeight(); var Xh=this.getTotalHeight(); var We=this.window.pointer.offsetLeft; var jh=We+this.window.pointer.width; var Pg=We+53; var xh=We+4; var cb=","; var r=this.getMaskMap(); var C=r.firstChild; C.setAttribute("coords","0,0,0,"+jd+cb+Pg+cb+jd+cb+xh+cb+Xh+cb+jh+cb+jd+cb+tg+cb+jd+cb+tg+",0") } ; t.prototype.hide=function() { if(this.windowDiv)this.windowDiv.style.display="none"; this.shadowDiv.style.display="none" } ; t.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" } ; t.prototype.isVisible=function() { return this.windowDiv.style.display!="none" } ; t.prototype.sizeToContent=function(Cd) { var h=Cd?Cd:this.contentArea.offsetWidth; var l=this.contentArea.offsetHeight; this.setContentSize(Math.max(h,183),l) } ; t.prototype.positionAt=function(x,m,s) { var mc=this.calculatePointerOffset(this.width)+this.window.w.width+5; var Fc=this.height+this.window.n.height+this.window.s1.height; this.left=x-mc; this.top=m-Fc; this.left+=s.infoTipCoord.x-s.pointCoord.x; this.top+=s.infoTipCoord.y-s.pointCoord.y; this.windowDiv.style.left=this.left+"px"; this.windowDiv.style.top=this.top+"px"; var jg=0; var pg=this.getTotalHeight()-this.getTotalShadowHeight(); jg+=s.shadowTipCoord.x-s.infoTipCoord.x; pg+=s.shadowTipCoord.y-s.infoTipCoord.y; this.shadowDiv.style.left=this.left+jg+"px"; this.shadowDiv.style.top=this.top+pg+"px" } ; t.prototype.calculatePointerOffset=function(h) { return Math.floor(h/4) } ; t.prototype.createCroppingDiv=function(f) { var j=window.document.createElement("div"); j.style.overflow="hidden"; j.style.position="absolute"; j.style.width=f.width+"px"; j.style.height=f.height+"px"; j.style.left=f.style.left; j.style.top=f.style.top; j.style.zIndex=f.style.zIndex; f.style.left="0px"; f.style.top="0px"; j.appendChild(f); return j } ; t.prototype.createWindow=function(Ua) { this.window=new Object(); this.window.nw=n.create(Pi,25,25,0,0,0,false); this.window.n=n.create(si,640,25,this.window.nw.width,0,0,true); this.window.ne=n.create(Ei,25,25,0,0,0,false); this.window.w=n.create(xi,25,640,0,this.window.nw.height,0,true); this.window.c=n.create(yh,640,640,this.window.w.width,this.window.n.height,0,true); this.window.e=n.create(th,25,640,0,this.window.ne.height,0,true); this.window.sw=n.create(Ti,25,96,0,0,0,false); this.window.s1=n.create(Uf,640,96,this.window.sw.width,0,0,true); this.window.pointer=n.create(hi,98,96,0,0,0,false); this.window.s2=n.create(Uf,640,96,0,0,0,true); this.window.se=n.create(Rg,25,96,0,0,0,false); this.window.nw.onmousedown=this.onMouseDown; this.window.n.onmousedown=this.onMouseDown; this.window.ne.onmousedown=this.onMouseDown; this.window.w.onmousedown=this.onMouseDown; this.window.c.onmousedown=this.onMouseDown; this.window.e.onmousedown=this.onMouseDown; this.window.sw.onmousedown=this.onMouseDown; this.window.s1.onmousedown=this.onMouseDown; this.window.pointer.onmousedown=this.onMouseDown; this.window.s2.onmousedown=this.onMouseDown; this.window.se.onmousedown=this.onMouseDown; this.windowDiv=window.document.createElement("div"); this.windowDiv.style.position="absolute"; this.windowDiv.style.left="0px"; this.windowDiv.style.top="0px"; this.windowDiv.style.zIndex=Ua; ic(this.windowDiv,"infowindow"); 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) } ; t.prototype.createShadow=function(Ua) { this.shadow=new Object(); this.shadow.nw=n.create(hh,70,30,0,0,0,false); this.shadow.n=n.create(mj,640,30,this.shadow.nw.width,0,0,false); this.shadow.ne=n.create(Di,70,30,0,0,0,false); this.shadow.w=n.create(qi,360,280,0,this.shadow.nw.height,0,false); this.shadow.c=n.create(ih,640,640,this.shadow.w.width,this.shadow.n.height,0,false); this.shadow.e=n.create(qh,360,280,0,this.shadow.ne.height,0,false); this.shadow.sw=n.create(sh,70,60,0,0,0,false); this.shadow.s1=n.create(Xf,320,60,this.shadow.sw.width,0,0,false); this.shadow.pointer=n.create(gh,140,60,0,0,0,false); this.shadow.s2=n.create(Xf,320,60,0,0,0,false); this.shadow.se=n.create(mh,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.style.zIndex=0; this.shadowDiv.style.zIndex=Ua; ic(this.shadowDiv,"infowindow"); 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) } ; t.prototype.hasMask=function() { return this.maskPng!=null } ; t.prototype.getMaskMap=function() { return document.getElementById(this.maskMapId) } ; var Ni=o+"transparent.gif"; var Kf=0; t.prototype.createMask=function() { var r=document.createElement("map"); this.maskMapId="iwMap"+Kf; r.setAttribute("id",this.maskMapId); r.setAttribute("name",this.maskMapId); Kf++; this.windowDiv.appendChild(r); var C=document.createElement("area"); C.setAttribute("shape","poly"); C.setAttribute("coords",""); C.setAttribute("href",""); C.onclick=function() { return false } ; C.onmousedown=this.onmousedown; r.appendChild(C); for(var a=0; a<10; a++) { var C=document.createElement("area"); C.setAttribute("shape","poly"); C.setAttribute("coords",""); C.setAttribute("href","javascript:void(0)"); C.onclick=function() { return false } ; r.appendChild(C) } this.maskPng=n.create(Ni,0,0,0,0,0,false); this.windowDiv.appendChild(this.maskPng); this.maskPng.setAttribute("usemap","#"+this.maskMapId); this.nextMaskArea=1 } ; t.prototype.addAreaToMaskMap=function(Ve,ch) { if(this.hasMask()) { var r=this.getMaskMap(); if(this.nextMaskArea<r.childNodes.length) { var C=r.childNodes[this.nextMaskArea]; C.setAttribute("coords",Ve); C.onmousedown=ch; this.nextMaskArea++ } } } ; t.prototype.clearMaskMap=function() { if(this.hasMask()) { var r=this.getMaskMap(); for(var a=1; a<r.childNodes.length; a++) { var C=r.childNodes[a]; C.setAttribute("coords",""); C.onmousedown=null } this.nextMaskArea=1 } } ; t.prototype.getMaskLeft=function() { return this.windowDiv.offsetLeft } ; t.prototype.getMaskTop=function() { return this.windowDiv.offsetTop } ; t.prototype.createContentArea=function(h) { var j=window.document.createElement("div"); j.style.width=h; j.style.position="absolute"; j.style.left="15px"; j.style.top="15px"; j.style.zIndex=3; ga(j,"auto"); j.onmousedown=this.onMouseDown; this.windowDiv.appendChild(j); this.contentArea=j; this.contentArea.onmousedown=this.onMouseDown; j=window.document.createElement("div"); j.style.width=h; j.style.position="absolute"; j.style.left="15px"; j.style.top="15px"; j.style.zIndex=3; ga(j,"auto"); j.style.visibility="hidden"; this.windowDiv.appendChild(j); this.offscreenArea=j; this.offscreenArea.onmousedown=this.onMouseDown } ; t.prototype.prepareOffscreen=function() { 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" } } ; t.prototype.clearOffscreenArea=function() { ci(this.offscreenArea) } ; t.prototype.flipOffscreenArea=function() { var Ge=this.offscreenArea; this.offscreenArea=this.contentArea; this.contentArea=Ge; this.contentArea.style.visibility="visible"; this.offscreenArea.style.visibility="hidden"; this.clearOffscreenArea() } ; t.prototype.onMouseDown=function(b) { if(b) { b.cancelDrag=true } else { ja(b) } } ; var bj=o+"close.gif"; t.prototype.createCloseButton=function() { this.closeButton=Wb.create(bj,14,13,null,null,4,null,null); this.closeButton.style.position="absolute"; ga(this.closeButton,"pointer"); this.closeButton.onmousedown=this.eventHandler("onCloseMouseDown"); this.windowDiv.appendChild(this.closeButton) } ; t.prototype.onCloseMouseDown=function(b) { ja(b); if(this.oncloseclick)this.oncloseclick(b) } ; var md=new q(-98.35,39.5); var Ba=new Array(); var sa; for(sa=0; sa<[131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8].length; sa++) { Ba.push(new q([131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8][sa]*0.77162458338772,[131072,65536,32768,16384,8192,4096,2048,1024,512,256,128,64,32,16,8][sa])) } var Oh=o+"transparent.gif"; var Zh=o+"water.gif"; function Ya(qf) { this.tileSize=128; this.backgroundColor="#f2efe9"; this.emptyTileURL=Oh; this.numZoomLevels=Ba.length; if(qf) { this.baseURL=qf } else { this.baseURL="http://mt.google.com/mt?"; if(window._tv&&window._tv.length>0) { this.baseURL+="v="+encodeURIComponent(window._tv)+"&" } } } var Yc=new Ya(); Ya.prototype.getBitmapCoordinate=function(gb,tb,N,e) { if(!e)e=new q(0,0); var x=tb-md.x; var m=md.y-gb; e.x=Math.floor(x*Ba[N].x); e.y=Math.floor(m*Ba[N].y); return e } ; Ya.prototype.getLatLng=function(x,m,N,e) { if(!e)e=new q(0,0); x/=Ba[N].x; m/=Ba[N].y; e.x=x+md.x; e.y=md.y-m; return e } ; Ya.prototype.getTileCoordinate=function(gb,tb,N,e) { var Oc=this.getBitmapCoordinate(gb,tb,N,e); Oc.x=Math.floor(Oc.x/this.tileSize); Oc.y=Math.floor(Oc.y/this.tileSize); return Oc } ; Ya.prototype.getTileURL=function(x,m,N) { if(x<cc[N].minX||(x>cc[N].maxX||(m<cc[N].minY||m>cc[N].maxY))) { return Zh } return this.baseURL+"x="+x+"&y="+m+"&zoom="+N } ; Ya.prototype.getLowestZoomLevel=function(og,pf,Bf) { pf+=4; Bf+=4; for(var a=0; a<Ba.length; a++) { if(Ba[a].x*og.width<=pf&&Ba[a].y*og.height<=Bf) { return a } } return Ba.length-1 } ; Ya.prototype.getPixelsPerDegree=function(N) { return Ba[N] } ; Ya.prototype.getLinkText=function() { return _mNormalMap } ; Ya.prototype.getURLArg=function() { return null } ; var cc=new Array(); for(sa=0; sa<9; sa++) { cc.push(new Z(-U,-U,U,U)) } for(sa=9; sa<Ba.length; sa++) { var Ga=Yc.getTileCoordinate(85,-179.5,sa); var Ca=Yc.getTileCoordinate(12,-50,sa); cc.push(new Z(Ga.x,Ga.y,Ca.x,Ca.y)) } ; function ni(Jd) { if(window.clipboardData) { Jd.onpaste=jj; Jd.ondrop=Bh } return true } function jj(b) { var Jc=document.selection; if(Jc) { var Yb=Jc.createRange(); if(Yb) { var Lb=window.clipboardData.getData("Text"); if(Lb) { Yb.text=Df(Lb,null); return false } } } return true } var Wc=null; function Bh(b) { if(!b)b=window.event; if(b.dataTransfer) { Wc=Df(b.dataTransfer.getData("Text"),null); setTimeout("_finishDrop()",1) } return true } function _finishDrop() { if(!Wc)return; var Jc=document.selection; if(Jc) { var Yb=Jc.createRange(); if(Yb) { Yb.text=Wc; Yb.select() } } Wc=null } function Df(str,le) { if(!le)le=", "; var fb=str.replace(/^[ \r\n\t\v]+/g,""); fb=fb.replace(/[ \r\n\t\v]+$/g,""); fb=fb.replace(/[ \t\v]*\r?\n[\r\n]*[ \t\v]*/g,le); return fb } function _pastebox(Jd) { ni(Jd) } var nb=new Array(Yc); for(var xd=0; xd<nb.length; xd++) { var Hg=nb[xd].getURLArg(); if(Hg)nb[Hg]=nb[xd] } function T(Cb,we,ce,re,pe,de) { this.map=null; this.mapContainer=Cb; this.panel=we; this.metaPanel=ce; this.permalink=re; this.feedbackLink=pe; this.specToggleArea=de; this.loadIconClasses(); P(window,"resize",this.eventHandler("resizeMapView")); P(window,"beforeprint",this.eventHandler("beforePrint")); P(window,"afterprint",this.eventHandler("afterPrint")); if(A.type==4) { document.body.style.overflow="hidden"; this.panel.style.overflow="auto" } this.resizeMapView() } T.prototype.beforePrint=function() { var Ig=this.mapContainer.offsetWidth/window.screen.logicalXDPI; var te=7; var ng=this.mapContainer.offsetHeight/window.screen.logicalYDPI; var Qc=8; if(this.vpage) { Qc=7; if(this.vpage.directions) { Qc=3.5 } else if(this.vpage.overlays.length>0&&this.vpage.overlays[0].locations.length>1) { Qc=4.5 } } var V=te/Ig; if(ng*V>Qc) { V=Qc/ng } var Wf=Ig*V; if(Wf<te) { var Ui=Math.floor(Wf/te*100); this.mapContainer.style.width=Ui+"%" } else { this.mapContainer.style.width="100%" } this.mapContainer.style.zoom=V; this.panel.style.zoom=0.8; if(document.body.style.overflow=="hidden") { this.panel.style.height="auto" } } ; T.prototype.afterPrint=function() { this.mapContainer.style.zoom=1; this.mapContainer.style.width="auto"; this.panel.style.zoom=1; this.resizeMapView() } ; T.prototype.loadMap=function(ff) { var ta=null; if(ff)ta=nb[ff]; if(!ta)ta=nb[0]; this.map=new d(this.mapContainer,ta,null,null,false,false,nb); this.map.registerKeyHandlers(window.document); this.createMapControl(); this.map.showCopyright(); new dc(this.map); this.map.addStateListener(this); if(nb.length>1) { this.map.createSpecToggleLinks(this.specToggleArea) } } ; T.prototype.createMapControl=function() { var Hc=this.map.createMapControl(); Hc.style.position="absolute"; Hc.style.left="8px"; Hc.style.top="8px"; ic(Hc,"noprint"); this.mapContainer.appendChild(Hc) } ; T.prototype.onMapStateChanged=function() { try { if(this.vpageDoc) { var E=this.map.getCenterLatLng(); this.vpageDoc.getElementById(Te).value=E.y; this.vpageDoc.getElementById(Ue).value=E.x; this.vpageDoc.getElementById("zoom").value=this.map.zoomLevel } var fa=this.getPageURL(); this.permalink.href=fa; this.feedbackLink.href="http://www.google.com/support/maps/bin/request.py?url="+encodeURIComponent(fa)+"&ua="+encodeURIComponent(navigator.userAgent) } catch(b) { } } ; T.prototype.resizeMapView=function() { var Fi=this.getWindowSize(); var dg=gd(this.mapContainer); var mg=Fi.height-dg.y-10; var Hi=gd(this.panel); var ji=mg-(Hi.y-dg.y); this.mapContainer.style.height=ha(mg); if(document.body.style.overflow=="hidden") { this.panel.style.height=ha(ji); this.panel.scrollTop=0 } if(this.map) { this.map.onResize() } } ; T.prototype.getWindowSize=function(e) { if(!e)e=new aa(0,0); if(window.self&&self.innerWidth) { e.width=self.innerWidth; e.height=self.innerHeight; return e } if(document.documentElement&&document.documentElement.clientHeight) { e.width=document.documentElement.clientWidth; e.height=document.documentElement.clientHeight; return e } e.width=document.body.clientWidth; e.height=document.body.clientHeight; return e } ; T.prototype.loadIconClasses=function() { var ie=[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]; Q.load(new Q("local",20,34,new q(9,34),new q(9,2),new q(17,23),o+"shadow50.png",37,ie)); Q.load(new Q("noicon",0,0,new q(0,0),new q(0,0),new q(0,0),null,0,null)) } ; T.prototype.loadXML=function(ye,Gh) { La.invalidateAll(); this.clearSearchState(); try { this.vpageDoc=Gh; var M=uf(ye); this.loadVPage(M) } catch(b) { } } ; T.prototype.loadVPage=function(M) { var G=qc.loadFromXML(M,null,null); this.vpage=G; if(G.title) { window.document.title=_mSiteName+" - "+G.title } else { window.document.title=_mSiteName } if(G.error||G.spelling) { var fa=ua.getXSLTURL("mp"); Od(G,this.metaPanel,fa,null,"metaPanel",G.metaToHTML); this.metaPanel.style.display="" } if(G.overlays&&G.overlays.length>0) { var ra=G.overlays[0]; if(ra.panelStyle&&ra.locations) { this.showOverlayPanel(ra) } } else if(G.directions) { this.showDirectionsPanel(G.directions) } if(G.debug) { var Fb=document.createElement("pre"); Fb.appendChild(document.createTextNode(G.debug)); this.metaPanel.appendChild(Fb); this.metaPanel.style.display="" } var E=null; var V=null; if(this.vpageDoc) { var Zd=this.vpageDoc.getElementById(Te); var ae=this.vpageDoc.getElementById(Ue); if(Zd&&(ae&&(Zd.value.length>0&&ae.value.length>0))) { E=new q(parseFloat(ae.value),parseFloat(Zd.value)) } var ze=this.vpageDoc.getElementById("zoom"); if(ze&&ze.value.length>0) { V=parseInt(ze.value) } } this.map.loadVPage(G,E,V); this.lastSearchSpan=this.map.getSpanLatLng() } ; T.prototype.showOverlayPanel=function(ra) { var i=this; window.showLocationInfo=function(H) { var p=ra.getLocationById(H); if(p) { i.map.clearInfoWindowArgs(p.xml); i.map.showInfoWindow(p) } } ; Od(ra,this.panel,ra.panelStyle,null,"panel",ra.toHTML) } ; T.prototype.showDirectionsPanel=function(B) { this.highlightedTd=null; var i=this; window.showDirectionsSegment=function(H) { var ec=B.getSegmentById(H); var ed=document.getElementById(H); if(ec) { i.map.showDirectionsStep(ec); if(ed) { if(this.highlightedTd)this.highlightedTd.style.backgroundColor="white"; this.highlightedTd=ed; ed.style.backgroundColor="#eeeeee"; i.map.oninfowindowclose=function() { i.highlightedTd=null; ed.style.backgroundColor="white"; i.map.oninfowindowclose=null } } } } ; window.showDirectionsStart=function() { i.map.showDirectionsStart(); if(this.highlightedTd)this.highlightedTd.style.backgroundColor="white"; this.highlightedTd=null } ; window.showDirectionsEnd=function() { i.map.showDirectionsEnd(); if(this.highlightedTd)this.highlightedTd.style.backgroundColor="white"; this.highlightedTd=null } ; var fa=ua.getXSLTURL("dp"); Od(B,this.panel,fa,null,"panel",B.toHTML) } ; T.prototype.search=function(qb,hj,uh) { La.invalidateAll(); this.clearSearchState(); if(!qb||qb.length==0)return; this.panel.innerHTML=_mSearching; var z=new ua(); z.setValue("sll",z.getLatLngArg(this.map.getCenterLatLng())); z.setValue("sspn",z.getSpanArg(this.map.getSpanLatLng())); z.setValue("z",this.map.zoomLevel); z.setValue("t",this.map.spec.getURLArg()); z.setValue("q",qb); z.setValue("f",uh); z.setValue("output","js"); var fa=z.getURL(); Sd('<a href="'+db(fa)+'">'+Jb(fa)+"</a>",0); hj.src=fa } ; T.prototype.clearSearchState=function() { this.map.clearOverlays(); this.metaPanel.innerHTML=""; this.metaPanel.style.display="none"; this.panel.innerHTML=""; this.vpage=null; this.vpageDoc=null } ; T.prototype.getPageURL=function(Le) { var z=new ua(); if(this.vpage&&this.vpageDoc) { z.setValue("q",this.vpage.query); var qj=parseFloat(this.vpageDoc.getElementById(Te).value); var ph=parseFloat(this.vpageDoc.getElementById(Ue).value); var Vf=new q(ph,qj); var lf=this.map.getSpanLatLng(); var lg=this.vpage.center; if(this.vpage.searchCenter) { z.setValue("sll",z.getLatLngArg(this.vpage.searchCenter)); lg=this.vpage.searchCenter } var xa=false; if(!Vf.approxEquals(lg)) { xa=true; z.setValue("ll",z.getLatLngArg(Vf)) } var Se=this.lastSearchSpan; if(this.vpage.searchSpan) { z.setValue("sspn",z.getSpanArg(this.vpage.searchSpan)); Se=this.vpage.searchSpan } if(xa||Se&&!lf.approxEquals(Se)) { z.setValue("spn",z.getSpanArg(lf)) } } else { z.setAllMapValues(this.map) } z.setValue("t",this.map.spec.getURLArg()); return z.getURL(Le) } ; T.prototype.email=function() { var fa="mailto:?subject="+encodeURIComponent(_mEmailSubject)+"&body="+encodeURIComponent(this.getPageURL(true)); window.location.href=fa } ; T.prototype.print=function() { window.print() } ; function _app(Cb,we,ce,re,pe,de) { return new T(Cb,we,ce,re,pe,de) } vc.prototype.toHTML=function(W) { var Y=""; if(this.locations.length>0) { var Y="<table>"; for(var a=0; a<this.locations.length; a++) { var ib=this.locations[a]; var ob=ib.xml.getElementsByTagName("info")[0]; var bb=Wg(ob.getElementsByTagName("title")[0]); var mb=ia(ob.getElementsByTagName("distance")[0]); var Ye=ia(ob.getElementsByTagName("phone")[0]); if(bb) { Y+='<tr><td style="vertical-align: top; padding-right: 4px; "><a href="javascript:showLocationInfo(\''+ib.id+"')\">"+'<img style="width:24px; height:38px" alt="" '+'src="'+o+"icon"+ib.id+'.png"/></a></td>'+'<td style="padding-bottom: 0.5em; padding-top: 1px"><div>'+"<a href=\"javascript:showLocationInfo('"+ib.id+"')\" "+'style="color: #0000cc">'+bb+"</a></div>"+'<div style="font-size: smaller">'+Ma(Ye)+" - "+'<span style="color: #7777cc">'+Ma(mb)+"</span></div>"+"</td></tr>" } } Y+="</table>" } W.innerHTML=Y } ; kd.prototype.toHTML=function(W) { var ob=this.xml.getElementsByTagName("info")[0]; var bb=ia(ob.getElementsByTagName("title")[0]); var mb=ia(ob.getElementsByTagName("distance")[0]); var Ye=ia(ob.getElementsByTagName("phone")[0]); var pb=ob.getElementsByTagName("line"); var ke=""; var Je=""; if(pb.length>0)ke=ia(pb[0]); if(pb.length>1)Je=ia(pb[1]); var vf=Rd(db(ke)+", "+db(Je)); var Y="<div><b>"+Ma(bb)+"</b></div>"+'<div style="font-size: small">'+Ma(Ye)+"</div>"+'<div style="font-size: small"><div>'+Ma(ke)+"</div><div>"+Ma(Je)+"</div></div>"+'<div style="font-size: small; margin-top: 0.4em">Directions:'+" <a href=\"javascript:directionsSearch(null, '"+vf+"', false)\">To here</a> - "+"<a href=\"javascript:directionsSearch('"+vf+"', null, false)\">From here</a></div>"; W.innerHTML=Y } ; qc.prototype.metaToHTML=function(W) { var Y=""; if(this.spelling) { var nh=wd(this.spelling,false); var str=ia(this.spelling); Y+='<div style="color: #cc0000; margin-bottom: 1em">Did you mean: <a href="javascript:search(\''+Rd(str)+"')\">"+nh+"</a></div>" } if(this.error) { var str=wd(this.error,false); Y+="<p>"+str+"</p>" } W.innerHTML=Y } ; oc.prototype.toHTML=function(W) { var Jg=zf(this.xml.getElementsByTagName("source")[0]); var ig=zf(this.xml.getElementsByTagName("destination")[0]); var Ke=this.xml.getElementsByTagName("segments")[0]; var mb=Ke.getAttribute("distance"); var gf=Ke.getAttribute("time"); var Y='<table class="dirsummary"><tr><td class="name" onclick="showDirectionsStart()" style="cursor: pointer"><a href="javascript:void(0)" onclick="javascript:return true">Start from</a>:</td><td class="value" onclick="showDirectionsStart()" style="cursor: pointer">'+Ma(Jg)+"</td></tr>"+'<tr><td class="name" onclick="showDirectionsEnd()" '+'style="cursor: pointer"><a href="javascript:void(0)" '+'onclick="javascript:return true">Arrive at</a>:</td>'+'<td class="value" onclick="showDirectionsEnd()" '+'style="cursor: pointer">'+Ma(ig)+"</td></tr>"+'<tr><td class="name">Distance:</td><td class="value">'+Ma(mb)+" (about "+Ma(gf)+")</td></tr></table>"+'<div class="reverse"><a '+"href=\"javascript:javascript:directionsSearch('"+Rd(db(ig))+"', '"+Rd(db(Jg))+"', true)\">"+'Reverse directions</a></div><table class="directions">'; var Kg=Ke.getElementsByTagName("segment"); for(var a=0; a<Kg.length; a++) { var Id=Kg[a]; var H=Id.getAttribute("id"); var mb=Id.getAttribute("distance"); var gi=parseInt(Id.getAttribute("meters")); var str=wd(Id,false); Y+='<tr id="'+H+'"><td class="num" '+"onclick=\"showDirectionsSegment('"+H+"', this)\">"+'<a href="javascript:void(0)" onclick="return true">'+(a+1)+'.</td><td class="desc" onclick="showDirectionsSegment(\''+H+"', true)\">"+str+" - go <b>"+mb+"</b></td></tr>"; if(gi>16903) { Y+='<tr><td colspan="2" class="gap"><div class="gap">⋯ </div></td></tr>' } } Y+="</table>"; W.innerHTML=Y } ; function zf(g) { var pb=g.getElementsByTagName("line"); var str=""; for(var a=0; a<pb.length; a++) { str+=ia(pb[a]); if(a<pb.length-1) { str+=", " } } return str } function wd(g,rf) { var F=""; if(g.nodeType==3||g.nodeType==4) { return g.nodeValue } if(g.nodeType==1) { if(rf&&g.tagName) { F+="<"+g.tagName+">" } for(var a=0; a<g.childNodes.length; ++a) { F+=wd(g.childNodes[a],true) } if(rf&&g.tagName) { F+="</"+g.tagName+">" } } return F } function od(Cb,h,l) { this.map=null; this.mapContainer=Cb; this.width=h; this.height=l; this.loadIconClasses() } od.prototype.load=function(ye) { this.map=new d(this.mapContainer,Yc,this.width,this.height); new dc(this.map); try { var M=uf(ye); this.loadVPage(M) } catch(b) { } } ; od.prototype.loadVPage=function(M) { var G=qc.loadFromXML(M,null,null); this.map.loadVPage(G,null,null) } ; od.prototype.loadIconClasses=T.prototype.loadIconClasses; function _local(Cb,h,l) { return new od(Cb,h,l) }