LMI.NewLoc=(function(){var F=YAHOO.util,E=F.Dom,D=F.Event,C=23,A=26;function B(J,K,H,G){B.superclass.constructor.call(this,J,"default",H);this.map=K;if(!G){G=LMI.Urls.getImg("node-add_places.png")}var I=LMI.Element.create("img",document.body,{src:G,style:"visibility: hidden; position: absolute; top: 0;z-index: 1000;"});this.setDragElId(E.generateId(I))}YAHOO.lang.extend(B,F.DDProxy,{endDrag:function(L){var K,M,I=L||window.event,H=I.srcElement?I.srcElement:I.target,J=E.getXY(this.map.container),G=D.getPageX(L)-J[0]+(C-this.deltaX),N=D.getPageY(L)-J[1]+(A-this.deltaY);if(G>0&&G<=this.map.width&&N>0&&N<=this.map.height){K=this.map.getPointByXY(G,N);M=new LMI.Mapping.NewLocPoi(K);this.map.addObject(M);M.showFlyout();LMI.Reporting.trackEvent("customloc")}}});return B})();LMI.SearchForm.CountrySelector=(function(){var B=YAHOO.util,F=B.Dom,E=B.Event,K=LMI.Element,D=K.getOne,I=K.getAll,H=LMI.Strings.getString,G=LMI.Lang.forEach,A,C={alignContextCorner:"bl",alignPanelCorner:"tl"};function J(L,M){this.init(L,M)}J.getPopupPanel=function(){if(!A){A=new YAHOO.widget.Panel(K.create("div",document.body,{id:"countrySelectPanel"}),{constraintoviewport:true,monitorresize:false,zIndex:1000,draggable:false,visible:false,underlay:"none",close:false});A.setHeader(K.create("div",null,{children:[{tag:"h3",text:H("js.country.select")},{tag:"a",href:"#",className:"closer",events:{click:J.closePopupPanel},text:H("js.searchform.popup.close")}]}));A.setFooter(K.create("div"))}return A};J.closePopupPanel=function(L){if(A){A.hide()}E.preventDefault(L)};J.prototype={COLUMNS:3,init:function(M,N){var L=C;if(N){L=YAHOO.lang.merge(C,N)}this.container=M;this.countrySelect=D("div.countryInput > select",M);this.countryDisplays=I(".countrySelector .value",M);this.countryGroup=D("div.countryFields",M);this.normalGroup=D("div.normalFields",M);this.config=L;G(I("a[rel=changeCountry]",M),function(O){E.on(O,"click",function(Q,P){P.openPopup(this);E.preventDefault(Q)},this)},this);this.changeEvent=new B.CustomEvent("change");this.openEvent=new B.CustomEvent("open");this.syncToSelectValue()},openPopup:function(L){var M=J.getPopupPanel();M.setBody(this.getPopupContent());M.cfg.setProperty("context",[L,this.config.alignPanelCorner,this.config.alignContextCorner]);M.render();M.show();this.openEvent.fire()},getPopupContent:function(){var S=K.create("ul",null,{className:"linkList"}),L=this.countrySelect.options,U=this.COLUMNS,V=Math.ceil(L.length/U),O=Math.floor(L.length/U),P=L.length%U,R=this,M,T,N;function Q(W){return function(X){R.setValue(W.value,W.text);J.closePopupPanel(X)}}for(M=0;M<V;M++){for(T=0;T<U;T++){N=L[M+(T*O)+(T>=P?P:0)];if(N&&!(M>O-1&&T>=P)){K.create("li",S,{className:"col"+(T+1),children:[{tag:"a",href:"#",events:{click:Q(N)},text:N.text}]})}}}return S},syncToSelectValue:function(){var M=this.countrySelect,L;if(M&&M.selectedIndex){L=M.options[M.selectedIndex];this.setValue(L.value,L.text)}},setValue:function(M,L){D("option[value="+M+"]",this.countrySelect).selected=true;G(this.countryDisplays,function(N){N.innerHTML=L});this.setCountryFieldsVisibility(M!==LMI.Data.defaultCountry);this.updateFormAction(M!==LMI.Data.defaultCountry);this.changeEvent.fire(M)},setCountryFieldsVisibility:function(P){var O=this.countryGroup,M=this.normalGroup,L=(P?O:M),N=(P?M:O);F.removeClass(L,"hidden");F.addClass(N,"hidden");G(I("input",L),function(R){var S=R.id,Q;if(S&&(Q=LMI.DropDown.getById(S))){Q.positionArrow()}});F[P?"addClass":"removeClass"](this.container,"nonDefaultCountry")},updateFormAction:function(L){var M=L?"/mapalocationandtransform.ds":"/mapalocationwhereonly.ds";if(this.container&&this.container.action){this.container.action=LMI.Urls.get(M)}}};return J})();LMI.Mapping.RouteHilite=(function(){var F=LMI.Element,E=YAHOO.util;function A(J,I,G,H){this.top=J;this.left=I;this.bottom=G;this.right=H}A.prototype.intersection=function(L,I){var H=Math.max(this.left,L.left),K=Math.max(this.top,L.top),G=Math.min(this.right,L.right),J=Math.min(this.bottom,L.bottom);if(!I){I=new A()}I.top=K;I.left=H;I.bottom=J;I.right=G;return I};A.prototype.equals=function(G){return this.left===G.left&&this.top===G.top&&this.right===G.right&&this.bottom===G.bottom};function C(){this.style.display="block";this.style.height="auto";this.style.width="auto"}function D(G){return function(H){if(H.routeUrl){G.setLineUrl(H.routeUrl);G.setVisibleArea(H.visibleRouteArea);G.map.positionObject(G)}}}function B(J,H,G,I){this.init(J,H,G,I)}YAHOO.lang.extend(B,LMI.Mapping.MapObject,{init:function(K,H,G,J){this.shapePoints=K;this.routeArea=G;this.routeRect=null;this.setVisibleArea(J);this.boundingBox={upper:new LMI.Mapping.Point(G[3],G[2]),lower:new LMI.Mapping.Point(G[1],G[0])};this.timeout=null;var I;if(H){I=F.create("img",null,{events:{load:C}});B.superclass.init.call(this,this.point,I);this.setZOffset(-1);this.setLineUrl(H);this.url=H}else{I=F.create("div",null);B.superclass.init.call(this,this.point,I,0,0,-1)}},setVisibleArea:function(G){this.visibleArea=G;this.setPoint(new LMI.Mapping.Point(G[3],G[0]));this.visibleRect=null},setLineUrl:function(H){var I,G,J=YAHOO.env.ua.ie;this.url=H;if(J&&J<7){I=this.element;G=H.split("?",2);F.setAlphaImageLoader(I,G[0]+"?"+G[1].replace(/%/g,"%25"))}else{this.element.src=H}},updateHandler:function(M,L){var Q,N,P,I,G,K,J,H,O;if(M.eventType==="zoom"&&M.previousZoomLevel!==L.zoomLevel){this.routeRect=null;this.doUpdateLine(L)}else{if(M.eventType==="recenter"){G=L.tileManager.getGrid();Q=G.toXY(L.getULPoint());P=G.toXY(L.getLRPoint());K=new A(Q.y,Q.x,P.y,P.x);if(!this.routeRect){N=G.toXY(this.boundingBox.upper);I=G.toXY(this.boundingBox.lower);this.routeRect=new A(N.y,I.x,I.y,N.x)}if(!this.visibleRect){this.visibleRect=this.calculateRect(this.visibleArea)}J=K.intersection(this.routeRect);H=K.intersection(this.visibleRect);O=J.intersection(H);if(!J.equals(O)){this.doUpdateLine(L)}}}},doUpdateLine:function(G){if(this.timeout){window.clearTimeout(this.timeout)}var H=this;this.timeout=window.setTimeout(function(){H.timeout=null;H.element.style.display="none";var L=G.getURPoint(),J=G.getLLPoint(),I=D(H),M={success:function(O){var N=YAHOO.lang.JSON.parse(O.responseText);I(N)},scope:this},K="boundingArea="+encodeURIComponent(J.lng)+"&boundingArea="+encodeURIComponent(J.lat)+"&boundingArea="+encodeURIComponent(L.lng)+"&boundingArea="+encodeURIComponent(L.lat)+"&routeArea="+encodeURIComponent(H.routeArea[0])+"&routeArea="+encodeURIComponent(H.routeArea[1])+"&routeArea="+encodeURIComponent(H.routeArea[2])+"&routeArea="+encodeURIComponent(H.routeArea[3])+"&shapeData="+encodeURIComponent(H.shapePoints)+"&zoomLevel="+encodeURIComponent(G.tileManager.getScaledZoomLevel(G.zoomLevel))+"&outputType=png";E.Connect.asyncRequest("POST",LMI.Urls.get("/routeimageurl.ds"),M,K)},250)},calculateRect:function(J){var I=this.map.tileManager.getGrid(),G=I.toXY(new LMI.Mapping.Point(J[0],J[3])),H=I.toXY(new LMI.Mapping.Point(J[2],J[1]));return new A(G.y,G.x,H.y,H.x)},update:function(){B.superclass.add.apply(this,arguments);this.visibleRect=null;this.routeRect=null},add:function(){B.superclass.add.apply(this,arguments);var G=this;this.updateFunc=function(I,H){G.updateHandler(I,H)};this.map.addEventListener("zoom",this.updateFunc);this.map.addEventListener("recenter",this.updateFunc)},remove:function(){this.map.removeEventListener("zoom",this.updateFunc);this.map.removeEventListener("recenter",this.updateFunc);B.superclass.remove.apply(this,arguments)}});return B})();LMI.DirectionResults=(function(){var C=YAHOO.util,K=C.Dom,J=C.Event,N=LMI.Element,I=N.getOne,L=N.getAll,B,F,G,M,H=[],E=LMI.Strings.getString("js.find.on.route.search.default"),A={setHintText:function(P){var O=I("#routeSearch"),D=O.value;if(D===E||D.length===0){switch(P.type){case"submit":case"focus":O.value="";K.removeClass(O,"hint");break;default:K.addClass(O,"hint");O.value=E}}},clearSearch:function(){var D,P,O=document.getElementById("routeSearch");K.addClass(O,"hint");O.value=E;P=B.objects.getIdsByProperty("markerType","routeSearchMarker");for(D=0;D<P.length;++D){B.removeObject(P[D])}},addRouteToMap:function(){var P,O,S,T,D,R=LMI.Data.routeData,Q=R.segments;if(!F){O=Q[Q.length-1].toLocation;S=new A.RouteStopPoi(O,Q.length);H.push(S);B.addObject(S)}for(P=Q.length-1;P>=0;--P){O=Q[P].fromLocation;S=new A.RouteStopPoi(O,P);H.push(S);B.addObject(S)}H=H.reverse();S=new LMI.Mapping.RouteHilite(G,R.routeUrl,R.routeArea,R.visibleRouteArea);B.addObject(S);if(B.zoomLevel!==R.zoomLevel){S.doUpdateLine(B)}if("maneuvers" in LMI.Data){for(P=0;P<LMI.Data.maneuvers.length;P++){T=LMI.Data.maneuvers[P];D=new A.ManeuverPointMarker(T,(P+1));B.addObject(D)}}B.bestFit()},addSearchResultsToMap:function(){if("routeSearchResults" in LMI.Data){LMI.Lang.forEach(LMI.Data.routeSearchResults,function(D){B.addObject(new A.RouteSearchMarker(D))})}},getMap:function(){return B},getPois:function(){return H},isRoundTrip:function(){return F},getShapePoints:function(){return G},getNumberOfStops:function(){return M},initNewStop:function(){var O,D;if(LMI.Data.routeFormData.location.length<12){O=N.create("div",null,{id:"newStopCont",children:[{tag:"img",src:A.getAddStopImg(),alt:LMI.Strings.getString("js.directions.add.stop.alt"),id:"newStop"},{tag:"span",text:LMI.Strings.getString("js.directions.add.stop")}]});B.addDecorator(new DSMapDecorator(B,O,{},"newStop","button"));D=new A.NewStop(I("#newStop"),B)}else{O=N.create("div",null,{id:"newStopCont",className:"disabled",children:[{tag:"img",src:A.getDisabledAddStopImg(),alt:LMI.Strings.getString("js.directions.add.stop.alt"),id:"newStop"},{tag:"span",text:LMI.Strings.getString("js.directions.max.stops")}]});B.addDecorator(new DSMapDecorator(B,O,{},"newStop","button"))}},getAddStopImg:function(){return LMI.Urls.getImg("add-stop-node.gif")},getDisabledAddStopImg:function(){return LMI.Urls.getImg("labels/icon_add_place_dis.gif")},reorderStop:function(O,T){var Q=new LMI.Form(),P=LMI.Data.routeFormData.location,S=LMI.Data.routeFormData.locationType,R=P[T],D=S[T];P.splice(T,1);S.splice(T,1);P.splice(O,0,R);S.splice(O,0,D);LMI.Lang.forEach(P,function(U){Q.setVar("location",U,1)});LMI.Lang.forEach(S,function(U){Q.setVar("locationType",U,1)});Q.setVar("routeStyle",LMI.Data.routeFormData.routeStyle);Q.setVar("roundTrip",LMI.Data.routeFormData.roundTrip);if(LMI.Data.routeFormData.what){Q.setVar("what",LMI.Data.routeFormData.what)}Q.go(LMI.Urls.get("finddirections.ds")+"?tab=directions")},deleteStop:function(D){var P=new LMI.Form(),O=LMI.Data.routeFormData.location,Q=LMI.Data.routeFormData.locationType;O.splice(D,1);Q.splice(D,1);LMI.Lang.forEach(O,function(R){P.setVar("location",R,1)});LMI.Lang.forEach(Q,function(R){P.setVar("locationType",R,1)});P.setVar("routeStyle",LMI.Data.routeFormData.routeStyle);P.setVar("roundTrip",LMI.Data.routeFormData.roundTrip);if(LMI.Data.routeFormData.what){P.setVar("what",LMI.Data.routeFormData.what)}P.setVar("tab","directions");P.go(LMI.Urls.get("finddirections.ds")+"?tab=directions")},handleRemoveStop:function(O){var D=this.id.replace("stop_","");A.deleteStop(D)},resubmitSearch:function(D){A.encodeManualAddresses();I("#dirsForm").submit()},getRows:function(){return L("#listingInfoRows div.listingInfoRow")},encodeManualAddresses:function(){LMI.Lang.forEach(A.getRows(),function(P){var D=I("input[name=locationType]",P),O;if(D&&D.value.toLowerCase()==="manual"){O=new LMI.AddressEncoder();O.address=I("input[name=street]",P).value;O.city=I("input[name=city]",P).value;if(O.city||O.address){O.country=I("input[name=country]",P).value}I("input[name=location]",P).value=O.toString()}})},findHiliteTarget:function(O){var D=J.getTarget(O);if(!K.hasClass(D,"maneuver")){D=K.getAncestorByClassName(D,"maneuver")}return D},hiliteHandler:function(Q){var O=Q.type,P=A.findHiliteTarget(Q),D,R;R=P&&P.id.slice(P.id.lastIndexOf("_")+1);if(R){D=B.objects.getByProperty("maneuverNum",Number(R))}switch(O){case"mouseover":LMI.HighlightListing.highlightListing(P);if(D){D.showHilite()}break;case"mouseout":LMI.HighlightListing.dehighlightListing(P);if(D){D.hideHilite()}break}}};LMI.Init.addFunction(function(){var P=I("#routeSearch"),O=I("#mapImage"),D;LMI.LinkBehavior.add("clearSearch",A.clearSearch);LMI.LinkBehavior.add("removeStop",A.handleRemoveStop);if(P){J.on(P,"focus",A.setHintText);J.on(P,"blur",A.setHintText);J.on(P.form,"submit",A.setHintText)}LMI.StretchyPages.init([I("#mapCont"),I("#routeResults")]);B=new LMI.Mapping.DSMap(O,LMI.Data.mapOptions);B.addControls();if("TileSwitcher" in LMI.Mapping){LMI.Mapping.TileSwitcher.init(B)}if("TrafficControl" in LMI.Mapping){LMI.Mapping.TrafficControl.init(B,true)}if("routeData" in LMI.Data){F=LMI.Data.routeData.roundTrip;G=LMI.Data.routeData.shapePointData;M=LMI.Data.routeData.segments.length;if(!F){M++}A.addRouteToMap();A.addSearchResultsToMap();A.initNewStop()}else{B.bestFit()}LMI.MapOptions.init(B);LMI.PanelExpander.init("panelToggle","routeResults","mapCont",B,true);J.on(I("#routeStyle"),"change",A.resubmitSearch);D=I("#routeResultsManeuvers .directionResults");if(D){J.on(D,"mouseover",A.hiliteHandler);J.on(D,"mouseout",A.hiliteHandler)}});return A})();LMI.DirectionResults.RouteStopPoi=(function(){var G=LMI.Element,F=YAHOO.util,D=F.Dom,B=F.Event,A,C={constraintoviewport:true,zIndex:"1150",draggable:false,close:false};LMI.Init.addFunction(function(){A=new YAHOO.widget.Panel("mapFlyout",C);A.element.style.position="absolute"});function E(I,H){this.init(I,H)}YAHOO.lang.extend(E,LMI.Mapping.DSPoi,{OFFSET_X:19,OFFSET_Y:24,init:function(O,N){var I="ABCDEFGHIJKL",M=this,K,J,R,P,L,H,Q;E.superclass.init.apply(this,[O,I.charAt(N)]);this.setProperty("markerType","routeStop");this.setProperty("stopIndex",N);this.setProperty("name",LMI.Strings.getString("js.directions.stop")+" "+I.charAt(N));this.setProperty("displayValue",LMI.Data.routeData.itineraryPlaces[N].displayValue);this.setXOffset(this.OFFSET_X);this.setYOffset(this.OFFSET_Y);K=LMI.Element.create("img",document.body,{src:this.getRecommendedIconSrc(),style:"visibility: hidden; position: absolute; top: 0; z-index: 1000;"});document.body.appendChild(this.element);document.body.appendChild(this.labelElement);J=D.generateId(this.element);R=D.generateId(this.labelElement);M=this;P=new F.DDProxy(J);L=new F.DDProxy(R);H=D.generateId(K);P.setDragElId(H);L.setDragElId(H);P.startDrag=function(T){var S=this.getDragEl();D.setStyle(M.labelElement,"visibility","hidden");D.setStyle(M.element,"visibility","hidden");D.setStyle(S,"visibility","visible");Q=true};P.endDrag=function(j){D.setStyle(this.getDragEl(),"visibility","hidden");var X=LMI.Element.getOffsets(document.getElementById("mapImage")),S={left:X.x,right:(X.x+X.w),top:X.y,bottom:(X.y+X.h)},U="ABCDEFGHIJKL",Y=U.indexOf(M.option),h,W,Z,b,a,g,T,k,f,d,V,l,i,c;if(j.clientX>=S.left&&j.clientX<=S.right&&j.clientY>=S.top&&j.clientY<=S.bottom){i=[];c=[];W=D.getXY(M.map.container);Z=LMI.DirectionResults.getPois();b=B.getPageX(j)-W[0]+(M.getXOffset()-this.deltaX);a=B.getPageY(j)-W[1]+(M.getYOffset()-this.deltaY);g=LMI.Data.routeFormData.location;T=LMI.Data.routeFormData.locationType;k=document.getElementById("mapImage");G.create("div",k,{className:"lightbox"});G.create("div",k,{className:"lightboxLabel",children:[{tag:"img",src:LMI.Urls.getImg("wait-sm.gif")},{tag:"span",text:LMI.Strings.getString("js.loading.new.route")}]});f=M.map.getPointByXY(b,a);d={latitude:f.lat,longitude:f.lng};LMI.DirectionResults.getMap().addObject(new LMI.Mapping.DSPoi(d));g.splice(Y,1,f.lat+","+f.lng);T.splice(Y,1,"latlng");M.map.removeObject(M);LMI.Lang.forEach(Z,function(e){if(e.option!==M.option){i.push(e.point.lat);c.push(e.point.lng)}});V={success:function(n){var m,e=YAHOO.lang.JSON.parse(n.responseText);if(e.success){m=new LMI.Form();m.setVar("routeStyle",LMI.Data.routeFormData.routeStyle);m.setVar("roundTrip",LMI.Data.routeFormData.roundTrip);g=LMI.Data.routeFormData.location;T=LMI.Data.routeFormData.locationType;LMI.Lang.forEach(g,function(p){m.setVar("location",p,1)});LMI.Lang.forEach(T,function(p){m.setVar("locationType",p,1)});if(LMI.Data.routeFormData.what){m.setVar("what",LMI.Data.routeFormData.what)}m.setVar("place","test");m.setVar("tab","directions");m.go(LMI.Urls.get("finddirections.ds"))}}};l={lat:f.lat,lng:f.lng,lats:i,lngs:c};F.Connect.asyncRequest("GET",LMI.Urls.toQuery(l,LMI.Urls.get("/closestpoint.ds")),V)}else{D.setStyle(M.labelElement,"visibility","visible");D.setStyle(M.element,"visibility","visible");Q=false}};L.startDrag=P.startDrag;L.onDrag=P.onDrag;L.endDrag=P.endDrag;document.body.removeChild(this.element);document.body.removeChild(this.labelElement)},getFlyoutFactory:function(){return E.flyoutFactory},getRecommendedIconSrc:function(){return LMI.Urls.getImg("green-node-blank.gif")},showToolTip:function(){var H=D.getXY(this.element);H[0]+=21;H[1]+=21;A.cfg.setProperty("x",H[0]);A.cfg.setProperty("y",H[1]);if(A.cfg.getProperty("y")<H[1]){A.element.style.top=H[1]+"px"}A.setBody(this.getProperty("displayValue")+"<br/><br/>"+LMI.Strings.getString("js.directions.drag.to.change.modify"));A.render();A.show()},hideToolTip:function(){A.hide()},showHilite:function(H){if(!this.hiliteShown){this.hiliteShown=true;this.element.parentNode.appendChild(this.hiliteElement);this.hiliteElement.style.left=parseInt(this.element.style.left,10)-12+"px";this.hiliteElement.style.top=parseInt(this.element.style.top,10)-12+"px";this.hiliteElement.style.zIndex=this.z;this.setZIndex(this.z+1);if(H){this.showToolTip()}}},hideHilite:function(H){if(this.hiliteShown){this.hiliteShown=false;this.hiliteElement.parentNode.removeChild(this.hiliteElement);this.setZIndex(this.z);if(H){this.hideToolTip()}}},toggleHilite:function(H){if(H.type==="mouseover"){this.showHilite(true)}else{this.hideHilite(true)}},getFlyoutClass:function(){return"directions_poi route_stop_poi"}});E.createRouteStopFlyout=function(N){var L=LMI.DirectionResults.getNumberOfStops(),H=N.getProperty("stopIndex"),K=G.create("div",null,{className:"routeStop",children:[{tag:"p",className:"flyoutName",text:LMI.Strings.getString("js.directions.move.stop")}]}),I=G.create("div",K,{className:"stopOptions"}),M=G.create("div",I,{className:"moveOne"}),J=G.create("div",I,{className:"reorder"});if(H===0){G.create("p",M,{className:"disabled",text:LMI.Strings.getString("js.directions.move.up")})}else{G.create("a",M,{href:"#",text:LMI.Strings.getString("js.directions.move.up"),events:{click:function(O){LMI.DirectionResults.reorderStop(H-1,H)}}})}if(H===(L-1)){G.create("p",M,{className:"disabled",text:LMI.Strings.getString("js.directions.move.down")})}else{G.create("a",M,{href:"#",text:LMI.Strings.getString("js.directions.move.down"),events:{click:function(){LMI.DirectionResults.reorderStop(H+1,H)}}})}if(H===0){G.create("p",J,{className:"disabled",text:LMI.Strings.getString("js.directions.move.beginning")})}else{G.create("a",J,{href:"#",text:LMI.Strings.getString("js.directions.move.beginning"),events:{click:function(){LMI.DirectionResults.reorderStop(0,H)}}})}if(H===(L-1)){G.create("p",J,{className:"disabled",text:LMI.Strings.getString("js.directions.move.end")})}else{G.create("a",J,{href:"#",text:LMI.Strings.getString("js.directions.move.end"),events:{click:function(){LMI.DirectionResults.reorderStop(L-1,H)}}})}if(L>=3){G.create("div",I,{className:"delete",children:[{tag:"a",href:"#",text:LMI.Strings.getString("js.directions.delete"),events:{click:function(){LMI.DirectionResults.deleteStop(H)}}}]})}return K};E.flyoutFactory=LMI.Mapping.DSPoi.flyoutFactory.clone();E.flyoutFactory.addContentCreator("default",E.createRouteStopFlyout);return E})();LMI.DirectionResults.ManeuverPointMarker=(function(){var B=LMI.Element;function A(D,C){this.init(D,C)}YAHOO.lang.extend(A,LMI.Mapping.DSPoi,{init:function(E,D){A.superclass.init.apply(this,arguments);var F="<div class='stopNumberLabel'>"+D+"</div><div class='stopNumberInfo'>"+E.info+"</div>",C;C=B.create("div");C.innerHTML=E.info;C=C.textContent||C.innerText||D;this.setProperty("markerType","maneuverPointMarker");this.setProperty("maneuverNum",D);this.setProperty("name",C);this.setProperty("displayValue",F);this.setXOffset(10);this.setYOffset(4);this.hiliteElement=B.create("img",null,{src:LMI.Urls.getImg("blue-dot-shadow.png"),style:"position: absolute",className:"bds"})},flyoutClickHandler:function(C){this.findCollisions();if(this.collisions.length){this.showFlyout("multiStops");YAHOO.util.Event.stopEvent(C)}return false},getRecommendedIconSrc:function(){return LMI.Urls.getImg("bluedot.gif")},createLabelElement:function(){var C=LMI.DirectionResults.getMap().objects.getIdsByProperty("markerType","maneuverPointMarker").length+1;this.option=C;A.superclass.createLabelElement.call(this);this.labelElement.title=C;this.labelElement.className+=" bluedot"},showHilite:function(){if(!this.hiliteShown){this.hiliteShown=true;this.element.parentNode.appendChild(this.hiliteElement);this.hiliteElement.style.left=parseInt(this.element.style.left,10)+"px";this.hiliteElement.style.top=parseInt(this.element.style.top,10)+"px";this.hiliteElement.style.zIndex=this.z;this.setZIndex(this.z+1);LMI.HighlightListing.highlightListing(document.getElementById("maneuver_"+this.getProperty("maneuverNum")));this.findCollisions();if(this.collisions.length>0){this.labelElement.title=LMI.Strings.getString("js.multiple.stops")}}},hideHilite:function(){if(this.hiliteShown){this.hiliteShown=false;this.hiliteElement.parentNode.removeChild(this.hiliteElement);this.setZIndex(this.z);LMI.HighlightListing.dehighlightListing(document.getElementById("maneuver_"+this.getProperty("maneuverNum")))}},getFlyoutClass:function(){return"directions_poi maneuver_poi"}});A.showMultiStops=function(G){var F=B.create("div"),E,D,C;B.create("div",F,{textValue:LMI.Strings.getString("js.multiple.stops")+":",className:"flyoutName"});E=B.create("ul",F,{className:"stopList"});LMI.Lang.forEach([G].concat(G.collisions),function(J,I){var H=J.getProperty("displayValue");if(H.length>0){C=B.create("li",E,{className:I===0?"first":""});C.innerHTML=H}});B.create("div",F,{className:"clearer"});return F};LMI.Mapping.DSPoi.flyoutFactory.addContentCreator("multiStops",A.showMultiStops);return A})();LMI.DirectionResults.RouteSearchMarker=(function(){function A(B){this.init(B)}YAHOO.lang.extend(A,LMI.Mapping.DSPoi,{init:function(){A.superclass.init.apply(this,arguments);this.setProperty("markerType","routeSearchMarker");this.setXOffset(19);this.setYOffset(24)},getRecommendedIconSrc:function(){return LMI.Urls.getImg("map_nodes/special/route_search.png")}});A.prototype.doAdd=function(G){var C,F,H,E=0,J=G.routeSegment,I=document.getElementById("findOnRoute"),B=LMI.DirectionResults.getMap(),K=B.objects.getIdsByProperty("markerType","routeStop"),D=J>=K.length;K=I.getElementsByTagName("input");C=LMI.Element.create("input",null,{type:"hidden",name:"location",value:this.getProperty("id")});F=LMI.Element.create("input",null,{type:"hidden",name:"locationType",value:"listing"});if(D){I.appendChild(C);I.appendChild(F)}else{for(H=0;H<K.length&&E<=J;++H){if(K[H].type==="hidden"&&K[H].name==="location"){++E}}J=K[H];I.insertBefore(C,J);I.insertBefore(F,J)}I.submit()};A.prototype.addToRoute=function(C){YAHOO.util.Event.stopEvent(C);var B=this,D="latitude="+encodeURIComponent(this.point.lat)+"&longitude="+encodeURIComponent(this.point.lng)+"&routeData="+encodeURIComponent(LMI.DirectionResults.getShapePoints()),E={success:function(G){var F=YAHOO.lang.JSON.parse(G.responseText);B.doAdd(F)},scope:this};YAHOO.util.Connect.asyncRequest("POST",LMI.Urls.get("/nearestroutesegment.ds"),E,D)};return A})();LMI.DirectionResults.NewStop=(function(){var E=YAHOO.util,C=E.Dom,B=E.Event,D=false;function A(H,I,G){A.superclass.constructor.call(this,H,LMI.DirectionResults.getMap(),G);C.setStyle(this.getDragEl(),"z-index",1000)}function F(I,H,G){this.init(I,H,G)}YAHOO.lang.extend(F,LMI.Mapping.DSPoi,{});A.DropSpotPoi=F;YAHOO.lang.extend(A,LMI.NewLoc,{OFFSET_X:23,OFFSET_Y:26,endDrag:function(K){var N,O=[],H=LMI.DirectionResults.getPois(),R=C.getXY(this.map.container),M=B.getPageX(K)-R[0]+(this.OFFSET_X-this.deltaX),L=B.getPageY(K)-R[1]+(this.OFFSET_Y-this.deltaY),Q,G,I,J=[],P=[];if(M>0&&M<=this.map.width&&L>0&&L<=this.map.height){N=this.map.getPointByXY(M,L);LMI.DirectionResults.getMap().addObject(new F({latitude:N.lat,longitude:N.lng}));Q={success:function(S){I=YAHOO.lang.JSON.parse(S.responseText);A.addStop(I,N)}};LMI.Lang.forEach(H,function(S){J.push(S.point.lat);P.push(S.point.lng)});G={lat:N.lat,lng:N.lng,lats:J,lngs:P};E.Connect.asyncRequest("GET",LMI.Urls.toQuery(G,LMI.Urls.get("/closestpoint.ds")),Q)}else{C.setStyle(this.getEl(),"visibility","visible");D=false}},onDrag:function(G){if(!D){C.setStyle(this.getEl(),"visibility","hidden");D=true}}});A.addStop=function(I,J){var H=new LMI.Form(),G=LMI.Data.routeFormData.location,L=LMI.Data.routeFormData.locationType,K=I.object+1;if(I.success){G.splice(K,0,J.lat+","+J.lng);L.splice(K,0,"latlng");LMI.Lang.forEach(G,function(M){H.setVar("location",M,1)});LMI.Lang.forEach(L,function(M){H.setVar("locationType",M,1)});H.setVar("routeStyle",LMI.Data.routeFormData.routeStyle);H.setVar("roundTrip",LMI.Data.routeFormData.roundTrip);H.go(LMI.Urls.get("finddirections.ds")+"?tab=directions")}};return A})();(function(){var H=LMI.DirectionResults,E=H.initNewStop,F=H.RouteStopPoi,G=H.ManeuverPointMarker,I=H.NewStop,D=I.DropSpotPoi,B,A=LMI.Urls.getImg,C=YAHOO.util.Dom;LMI.Data.stretchyPagesOptions={bottomMargin:10};H.getAddStopImg=function(){return A("node-add_places.png")};B=F.prototype;B.OFFSET_X=22;B.OFFSET_Y=29;B.getRecommendedIconSrc=function(){return A("mapping/nodes/blue.png")};B=G.prototype;B.getRecommendedIconSrc=function(){return A("bluedot.png")};B=I.prototype;B.OFFSET_X=22;B.OFFSET_Y=29;B=D.prototype;B.init=function(L,K,J){J=A("mapping/nodes/blue.png");D.superclass.init.call(this,L,K,J);this.setXOffset(22);this.setYOffset(29)}})();(function(){var E=YAHOO.util,B=E.Dom,A=E.Event,C=LMI.Element.getOne;function D(J){var H,I,G,F;A.stopEvent(J);H=B.getAncestorByClassName(this,"maneuver");if(H){I=C(".manmap",H);if(I){if(B.hasClass(I,"hidden")){G=C(".turnMap",I);F=G.src.split("#");if(F.length>1){G.src=F[1]}B.removeClass(I,"hidden")}else{B.addClass(I,"hidden")}}}if(this.className.indexOf("reptrack_single")<0){this.className+=" reptrack_single";LMI.Reporting.trackEvent("linkroute",null)}}LMI.LinkBehavior.add("toggleMap",D)})();YAHOO.lang.JSON=(function(){var l=YAHOO.lang,_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_INVALID=/^[\],:{}\s]*$/,_SPECIAL_CHARS=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_CHARS={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function _revive(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(l.hasOwnProperty(value,k)){v=walk(value,k);if(v===undefined){delete value[k]}else{value[k]=v}}}}return reviver.call(o,key,value)};return typeof reviver==="function"?walk({"":data},""):data}function _char(c){if(!_CHARS[c]){_CHARS[c]="\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4)}return _CHARS[c]}function _prepare(s){return s.replace(_UNICODE_EXCEPTIONS,_char)}function _isValid(str){return l.isString(str)&&_INVALID.test(str.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""))}function _string(s){return'"'+s.replace(_SPECIAL_CHARS,_char)+'"'}function _stringify(h,key,d,w,pstack){var o=typeof w==="function"?w.call(h,key,h[key]):h[key],i,len,j,k,v,isArray,a;if(o instanceof Date){o=l.JSON.dateToString(o)}else{if(o instanceof String||o instanceof Boolean||o instanceof Number){o=o.valueOf()}}switch(typeof o){case"string":return _string(o);case"number":return isFinite(o)?String(o):"null";case"boolean":return String(o);case"object":if(o===null){return"null"}for(i=pstack.length-1;i>=0;--i){if(pstack[i]===o){return"null"}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null"}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i<len;++i){k=w[i];v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v}}}else{for(k in o){if(typeof k==="string"&&l.hasOwnProperty(o,k)){v=_stringify(o,k,d-1,w,pstack);if(v){a[j++]=_string(k)+":"+v}}}}a.sort()}}pstack.pop();return isArray?"["+a.join(",")+"]":"{"+a.join(",")+"}"}return undefined}return{isValid:function(s){return _isValid(_prepare(s))},parse:function(s,reviver){s=_prepare(s);if(_isValid(s)){return _revive(eval("("+s+")"),reviver)}throw new SyntaxError("parseJSON")},stringify:function(o,w,d){if(o!==undefined){if(l.isArray(w)){w=(function(a){var uniq=[],map={},v,i,j,len;for(i=0,j=0,len=a.length;i<len;++i){v=a[i];if(typeof v==="string"&&map[v]===undefined){uniq[(map[v]=j++)]=v}}return uniq})(w)}d=d>=0?d:1/0;return _stringify({"":o},"",d,w,[])}return undefined},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z"},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d}return str}}})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.6.0",build:"1321"});function DSRange(A,B){this.low=A;this.high=B}DSRange.prototype.contains=function(A){return A>=this.low&&A<=this.high};DSRange.prototype.limitNumber=function(A){A=Math.max(parseFloat(A),this.low);return Math.min(A,this.high)};function DSCircle(A,B){this.low=A;this.high=B}DSCircle.prototype.limitNumber=function(A){A=parseFloat(A);while(A>this.high){A-=this.high-this.low}while(A<this.low){A+=this.high-this.low}return A};function DSCircleSegment(C,A,B){this.circle=C;this.low=A;this.high=B}DSCircleSegment.prototype.contains=function(A){var B=this.circle.limitNumber(A);if(this.low>this.high){return(B>=this.low&&B<=this.circle.high)||(B>=this.circle.low&&B<=this.high)}else{return B>=this.low&&B<=this.high}};var DSLatitude=new DSRange(-90,90);var DSLongitude=new DSCircle(-180,180);function DSBoundingBox(A,B){this.lower=A;this.upper=B;this.width=new DSCircleSegment(DSLongitude,A.lng,B.lng);this.height=new DSRange(A.lat,B.lat)}DSBoundingBox.prototype.contains=function(A){return this.width.contains(A.lng)&&this.height.contains(A.lat)};function DSCopyright(E,C,A,B,D){this.text=E;this.boxes=(typeof C.length==="undefined"?[C]:C);this.minzoom=A;this.maxzoom=B;this.tileset=D}DSCopyright.prototype.contains=function(A,D,F){var C,B=(!F||!this.tileset||(F===this.tileset)),G=(!this.minzoom||D>=this.minzoom)&&(!this.maxzoom||D<=this.maxzoom),E=false;for(C=0;C<this.boxes.length;++C){if(this.boxes[C].contains(A)){E=true;break}}return E&&G&&B};function DSCopyrightSet(){this.copyrights=[]}DSCopyrightSet.prototype.getCopyright=function(A,D,E){var C,B=[];if(A&&D){for(C=0;C<this.copyrights.length;++C){if(this.copyrights[C].contains(A,D,E)){B.push(this.copyrights[C].text)}}}return B.join(" - ")};DSCopyrightSet.prototype.addCopyright=function(A){this.copyrights.push(A)};function DSMapDecoratorCollection(){this.init()}YAHOO.lang.extend(DSMapDecoratorCollection,DSCollection);DSMapDecoratorCollection.prototype.getByType=function(C){var B=new DSIterator(this),A=[],D;while((D=B.next())){if(D.type===C){A.push(D)}}return A};DSMapDecoratorCollection.prototype.getByName=function(A){var B=new DSIterator(this),C;while((C=B.next())){if(C.name===A){return C}}return null};function DSMapDecorator(D,C,E,B,A){this.init(D,C,E,B,A)}DSMapDecorator.prototype.init=function(D,C,E,B,A){this.map=D;this.element=C;this.position=E;this.type=B;this.name=A;this.updatePosition()};DSMapDecorator.prototype.getElement=function(){return this.element};DSMapDecorator.prototype.getFirstElement=function(){var B,A,C;for(B=0,A=this.element.childNodes.length;B<A;++B){C=this.element.childNodes[B];if(!YAHOO.util.Dom.hasClass(C,"skip")){return C}}};DSMapDecorator.prototype.updatePosition=function(){this.element.style.position="absolute";if(typeof this.position.left!=="undefined"){this.element.style.left=parseInt(this.position.left,10)+"px"}if(typeof this.position.right!=="undefined"){this.element.style.right=parseInt(this.position.right,10)+"px"}if(typeof this.position.top!=="undefined"){this.element.style.top=parseInt(this.position.top,10)+"px"}if(typeof this.position.bottom!=="undefined"){this.element.style.bottom=parseInt(this.position.bottom,10)+"px"}for(var A in {width:"",height:""}){if(typeof this.position[A]!=="undefined"){this.element.style[A]=parseInt(this.position[A],10)+"px"}}if(typeof this.position.zIndex!=="undefined"){this.element.style.zIndex=parseInt(this.position.zIndex,10)}};DSMapDecorator.prototype.setPosition=function(B){for(var A in B){if(B.hasOwnProperty(A)){this.position[A]=B[A]}}this.updatePosition()};DSMapDecorator.prototype.getPosition=function(){return this.position};(function(){var C=YAHOO.util,H=C.Event,J=C.Dom,P=LMI.Element,F=P.getOne,N=P.getAll,K,B,M,Q,A={},G,E,L;LMI.MapOptions={};K=LMI.MapOptions;K.isGroupShown=function(O){return G[O]!==false};K.getMyWWWGroupIndex=function(){return 0};K.categoryNames={myplaces:LMI.Strings.getString("js.map.my.places")};K.init=function(O,S){var R=LMI.Data.poiCategories;B=O;S=S||{};if(LMI.Data.sessionPreferences&&LMI.Data.sessionPreferences.poiGroupShown){G=LMI.Data.sessionPreferences.poiGroupShown}else{G={}}if(R){if(!("dontWatchMap" in S)||!S.dontWatchMap){K.watchMap()}LMI.PoiSearchCheckboxes.addSet(K.createOptionBox())}};K.createOptionBox=function(S){var T,R,U,O;T=P.create("div",null,{id:"mapOptions"});R=P.create("div",T,{id:"mapOptionsWrap"});P.create("div",T,{className:"shadow"});U=K.createOptionsHeader();if(U){R.appendChild(U)}O=K.createOptionsContent();if(O){R.appendChild(O)}K.optionBox=new DSMapDecorator(B,T,{},"options","box");if(S){S.appendChild(K.optionBox.getElement())}else{B.addDecorator(K.optionBox)}return T};K.createOptionsHeader=function(){return null};K.createOptionsContent=function(){var U=document.createDocumentFragment(),R,T,S,O;LMI.Lang.forEach(LMI.Data.poiCategories,function(W,V){R=[];U.appendChild(K.createGroupHeader(W.groupName,V===0));LMI.Lang.forEach(W.categories,function(X){S=X.imageSrc;O=X.value;R.push([X.key,O,S,X.selected]);K.categoryNames[X.key]=O});T=K.createOptionsTable(K.createOptionItems(R,(V===K.getMyWWWGroupIndex()&&LMI.Data.mywwwEnabled)),W.groupName);if(V===0){J.addClass(T,"first")}if(!K.isGroupShown(W.groupName)){J.addClass(T,"hidden")}U.appendChild(T)});return U};K.createGroupHeader=function(R,S){var T=LMI.Strings.getString("js.poi.group.name."+R),U;function O(V){K.togglePoiGroup(this,R);H.preventDefault(V)}U=P.create("div",null,{className:"poiGroupHeader "+R+"GroupHeader",children:[{tag:"a",href:"#",text:T,className:"toggle "+(G[R]===false?" closed":""),events:{click:O}}]});if(S){P.create("img",U,{src:LMI.Urls.getImg("icons/close.gif"),alt:"",className:"close",events:{click:K.closeOptionBox}})}return U};K.createOptionsTable=function(X,S){var R=P.create("div",null,{className:"poiGroup",id:S+"_pois"}),V=P.create("table",R),W=P.create("tbody",V),a=3,d=Math.ceil(X.length/3),O,Z,Y,U,T,b;for(O=0;O<d;O++){Z=P.create("tr",W);for(Y=0;Y<a;Y++){U=P.create("td",Z);b=X[(Y*d)+O];if(b){U.appendChild(b);T=F("input[type=checkbox]",U);if(T&&T.checked){T.disabled=true;K.addToMapHandler(true,T.name,T.value)}}}}return R};K.createOptionItems=function(T,O){var S=[],U=document.createDocumentFragment(),R;if(O&&LMI.Data.mywwwEnabled&&F("body").id!=="mywww"){K.createOptionItem(U,"myplacesBox","myplaces","myplaces",LMI.Urls.getImg("labels/special/map_icon_my_places.gif"),"placesIcon",LMI.Strings.getString("js.map.my.places"),false);S.push(U)}R=T.slice(0).sort(function(W,V){return(W[1]<V[1]?-1:(W[1]===V[1]?0:1))});LMI.Lang.forEach(R,function(V,W){U=document.createDocumentFragment();K.createOptionItem(U,"poi"+W,"poi",V[0],V[2],"",V[1],V[3]);S.push(U)});return S};L=0;K.createOptionItem=function(Y,R,O,W,T,U,V,X){R=R+"_"+L++;var S=P.create("input",Y,{type:"checkbox",id:R,className:W,name:O,value:W});if(X){S.checked=true}P.create("img",Y,{src:T,className:U,alt:V});P.create("label",Y,{text:V,"for":R})};K.showOptionBox=function(){var O=K.optionBox.element;J.setStyle(O,"visibility","visible");K.updateMapOptionsButton(true);K.showOptionBoxOmniture()};K.showOptionBoxOmniture=function(){LMI.Reporting.trackEvent("mapoptionsmenu")};K.togglePoiGroup=function(O,R){var S=F("#"+R+"_pois");if(J.hasClass(S,"hidden")){J.removeClass(S,"hidden");J.removeClass(O,"closed");K.updatePoiGroupVisibility(R,true)}else{J.addClass(S,"hidden");J.addClass(O,"closed");K.updatePoiGroupVisibility(R,false)}};K.updatePoiGroupVisibility=function(O,S){var R={preferenceCodeKey:O,preferenceValue:S};C.Connect.asyncRequest("GET",LMI.Urls.toQuery(R,LMI.Urls.get("/setpreference.ds")))};K.closeOptionBox=function(R){var O;if(K.optionBox){O=K.optionBox.element;J.setStyle(O,"visibility","hidden");K.updateMapOptionsButton(false)}if(R){H.preventDefault(R)}};K.clickHandler=function(S){var R=S.checked,O=S.name;if(R){S.disabled=true}K.addToMapHandler(R,O,S.value);if(R){if(O==="myplaces"){LMI.Data.form.setVar(S.name,true,false)}else{LMI.Data.form.setVar(S.name,S.value,true)}}else{LMI.Data.form.setVar(S.name,S.value,0,1)}K.clickHandlerOmniture(S)};K.clickHandlerOmniture=function(T){var O=J.getAncestorByTagName(T,"table"),S=N("input[type=checkbox]",O),R=[];LMI.Lang.forEach(S,function(U){if(U.checked){R.push(U.value)}});R=R.join(",");LMI.Reporting.data={options:R,optionsId:T.value};LMI.Reporting.trackEvent("mapoptions")};K.addSelectedIcons=function(S){var R,O;if(S){O=S.getElementsByTagName("input");for(R=0;R<O.length;++R){if(O[R].checked){O[R].disabled=true;K.addToMapHandler(false,O[R].name,O[R].className);K.addToMapHandler(true,O[R].name,O[R].className,R+1)}}}};K.addToMapHandler=function(S,Y,a){var X,Z,T,V=Y+"_"+a,U,W,O,R,b={success:function(c){K.addPoisToMap(Y,a,YAHOO.lang.JSON.parse(c.responseText))}};if(S){Z=B.getLLPoint();T=B.getURPoint();X=[Z.lat,Z.lng,T.lat,T.lng];U={category:a,"boundingBox.bottomLeftLatitude":Z.lat,"boundingBox.bottomLeftLongitude":Z.lng,"boundingBox.topRightLatitude":T.lat,"boundingBox.topRightLongitude":T.lng};if(Y==="myplaces"){R="/nearbysavedlocations.ds"}else{R="/poisearch.ds"}C.Connect.asyncRequest("GET",LMI.Urls.toQuery(U,LMI.Urls.get(R)),b)}else{O=B.objects.getIdsByProperty("type",V);for(W=0;W<O.length;++W){B.removeObject(O[W])}}};K.locationAdded=function(R,S){var O;S.hideFlyout();if(R.success){if(LMI.Data.mywwwEnabled){O=document.getElementById("myplacesBox");O.checked=true;LMI.Data.form.setVar(O.name,O.value);K.addSelectedIcons(document.getElementById("myplacesCbs"))}}};K.addPoisToMap=function(S,O,U){var T=F("#mapOptions input."+O),R=F("#topCategories input."+O);try{if(T){T.disabled=false}if(R){R.disabled=false}}catch(V){}if(U){K.addToMap(S,O,U.mapLocationVOs)}};K.addToMap=function(W,O,V){var U,S,X=[],R=W+"_"+O,T;if(V.length){X=V}else{if(V&&V.name){X.push(V)}else{return }}T=B.objects.getIdsByProperty("type",R);for(S=0;S<T.length;++S){B.removeObject(T[S])}U=W==="poi"?O:"myplaces";for(S=0;S<X.length;++S){B.addObject(K.createMarker(X[S],U));if(X[S].listing){LMI.Listings.addListing(X[S])}}};K.mapRecenter=function(O,R){if(Q){window.clearTimeout(Q);Q=null}if(!M){M=O.previousCenter}if(M){Q=window.setTimeout(function(){K.redoSearches(O,R)},2000)}};K.redoSearches=function(S,O){var R=O.getCenterPoint(),U=O.tileManager.getPosition(M),T=O.tileManager.getPosition(R);if(S.previousZoomLevel!==S.zoomLevel||Math.abs(U.x-T.x)>(B.width/3)||Math.abs(U.y-T.y)>(B.height/3)){M=null;K.addSelectedIcons(document.getElementById("mapOptions"))}};K.watchMap=function(){if(!E){E=true;B.addEventListener("recenter",K.mapRecenter);B.addEventListener("zoom",K.mapRecenter)}};K.stopWatchingMap=function(){if(E){E=false;B.removeEventListener("recenter",K.mapRecenter);B.removeEventListener("zoom",K.mapRecenter)}};function D(R){var O;H.stopEvent(R);this.blur();if(K.optionBox){O=K.optionBox.element;if(O.style.visibility==="visible"){K.closeOptionBox()}else{K.showOptionBox()}}}K.updateMapOptionsButton=function(O){var R=document.getElementById("mapOptionsButton");if(R){if(O){P.setImageSrc(R,LMI.Urls.getImg("/mapping/map_button_options_act.png"))}else{P.setImageSrc(R,LMI.Urls.getImg("/mapping/map_button_options.png"))}}};K.registerPoiClass=function(R,O){A[R]=O};K.createMarker=function(S,O){var R=A[O];if(!R){R=(S.listing?LMI.Mapping.PoiSearchMarker.ListingPoi:LMI.Mapping.PoiSearchMarker.LocationPoi)}return new R(S,O)};K.getMap=function(){return B};function I(O){var R=F("img",O);if(R){P.setImageSrc(R,P.getImageSrc(R))}}LMI.Init.addFunction(function(){LMI.Lang.forEach(LMI.PoiSearchCategories.getEnabledCategoryNames(),function(O){var R=F("."+O);if(R){K.addToMapHandler(true,R.name,O)}})},999);LMI.LinkBehavior.add("mapOptions",D,I)})();LMI.Mapping.PoiSearchMarker=(function(){var E=LMI.Element,D=LMI.MapOptions;function B(G,F){this.init(G,F)}YAHOO.lang.extend(B,LMI.Mapping.DSPoi,{init:function(){B.superclass.init.apply(this,arguments);this.setXOffset(21);this.setYOffset(26);if(this.option==="myplaces"){this.setProperty("type","myplaces_myplaces")}else{this.setProperty("type","poi_"+this.option)}},setListing:function(F){B.superclass.setListing.call(this,F);this.setProperties("phoneNumber",F.phoneNumber);if(this.option==="myplaces"){this.setProperties("id",F.uid,"listing",F.listing,"inList",true)}else{if(!F.listing){this.setProperty("id",this.getEncodedLocation())}}},getRecommendedIconSrc:function(){var F,G;if(this.option==="myplaces"){G="my_places";F="special"}else{G=this.option;F="POI"}return LMI.Urls.getImg("map_nodes/"+F+"/map_icon_"+G+".png")},createLabelElement:function(){},getFlyoutFactory:function(){return B.flyoutFactory},getFlyoutClass:function(){return"map_options_poi poi_"+this.option},showFlyout:function(G,F){B.superclass.showFlyout.call(this,G,F);var H=this.map,I;if(H.slideObject){D.stopWatchingMap();I=function(){D.watchMap();H.removeEventListener("recenter",I)};H.addEventListener("recenter",I)}}});B.getLocInfoContent=function(I){var J,F,G,H=E.create("div");H.appendChild(LMI.Mapping.DSPoi.getLocInfoElement(I));if(I.getProperty("id")&&I.getProperty("geocodePrecision")){J=B.getLinksElement(I);H.appendChild(J);if(I.isFindNearbyEnabled()){I.findNearby=true;J=LMI.Mapping.DSPoi.getFindNearbyForm(I);H.appendChild(J)}}if("showAdditionalInfo" in LMI.Data){if(LMI.Data.showAdditionalInfo===true&&"additionalProperties" in I.listing){F=E.create("div",null,{className:"additionalProps"});E.create("b",E.create("div",F,null),{text:"Additional Info:"});for(G in I.listing.additionalProperties){if(true){E.create("div",F,{text:G+": "+I.listing.additionalProperties[G]})}}H.appendChild(F)}}return H};function A(H){var G=new LMI.AddressEncoder(),F="";if(H.address){G.address=H.address;F=H.address}if(H.postalCode){G.postalCode=H.postalCode;F+=(F.length>0?" ":"")+H.postalCode}if(H.city){G.city=H.city;F+=(F.length>0?" ":"")+H.city}if(H.country){G.country=H.country;F+=(F.length>0?" ":"")+H.country}if(F){G.name=F}if(H.latitude){G.latitude=H.latitude}if(H.longitude){G.longitude=H.longitude}G.precision="ADDRESS";return G.toString()}B.getLinksElement=function(G){var F,H=E.create("ul",null,{className:"linkList listingLinks"});if(G.getProperty("listing")){F=LMI.Urls.get("displaydirections.ds")+"?dirsListingId="+G.getProperty("id")}else{if(G.option==="myplaces"){F=LMI.Urls.get("displaydirections.ds")+"?location="+encodeURIComponent(G.getProperty("name"))+"&locationType=SAVED"}else{F=LMI.Urls.get("displaydirections.ds")+"?locationType=MANUAL&location="+(encodeURIComponent(A(G.listing))||G.getProperty("id"))}}E.create("li",H,{className:"getDirs",children:[{tag:"a",text:LMI.Strings.getString("js.getdirs"),href:F}]});return H};function C(F){return F.createFlyoutContent()}B.flyoutFactory=LMI.Mapping.IconWithFlyout.flyoutFactory.clone();B.flyoutFactory.addContentCreator("default",C);return B})();LMI.Mapping.PoiSearchMarker.FlyoutContentCreator=(function(){var A=LMI.Mapping,B=A.PoiSearchMarker,D=A.DSPoi;function C(E){this.init(E)}C.prototype={init:function(E){this.poi=E},create:function(){var E=document.createDocumentFragment();this.addPoiType(E);return E},addPoiType:function(E){LMI.Element.create("div",E,{className:"poiCategory",children:[{tag:"img",src:this.poi.getRecommendedIconSrc(),alt:""},{text:LMI.MapOptions.categoryNames[this.poi.option]}]})},addContactInfo:function(E){E.appendChild(D.getLocInfoElement(this.poi))},addDirectionsLink:function(E){E.appendChild(B.getLinksElement(this.poi))},addFindNearby:function(E){E.appendChild(D.getFindNearbyForm(this.poi))}};return C})();(function(){var B=LMI.Mapping,C=B.PoiSearchMarker,E=B.DSPoi;function D(F){this.init(F)}YAHOO.lang.extend(D,C.FlyoutContentCreator,{create:function(){var F=D.superclass.create.call(this);F.appendChild(E.getLocInfoContent(this.poi));return F}});function A(G,F){this.init(G,F)}YAHOO.lang.extend(A,C,{createFlyoutContent:function(){return new D(this).create()}});C.ListingPoi=A})();(function(){var A=LMI.Mapping,D=A.PoiSearchMarker;function C(E){this.init(E)}YAHOO.lang.extend(C,D.FlyoutContentCreator,{create:function(){var E=C.superclass.create.call(this);E.appendChild(D.getLocInfoContent(this.poi));return E}});function B(F,E){this.init(F,E)}YAHOO.lang.extend(B,D,{createFlyoutContent:function(){return new C(this).create()}});D.LocationPoi=B})();(function(){var B=LMI.Mapping,C=B.PoiSearchMarker,F=B.DSPoi,E=LMI.Element;function D(G){this.init(G)}YAHOO.lang.extend(D,C.FlyoutContentCreator,{create:function(){var H,G,I=E.create("div",null,{});E.create("img",E.create("a",I,{href:"http://www.webcams.travel",target:"_blank"}),{src:LMI.Urls.get("/img/wclogo.gif"),alt:"Webcams Worldwide"});H=E.create("div",I,{className:"imgWrap"});E.create("img",E.create("a",H,{href:this.poi.listing.linkUrl,target:"_blank"}),{src:this.poi.listing.thumbnailUrl,border:"0"});E.create("a",E.create("div",I,{}),{href:this.poi.listing.linkUrl,target:"_blank",text:this.poi.listing.name});G=E.create("div",I,{className:"ownerWrap"});E.create("span",G,{text:"Owner:"});if(this.poi.listing.userId){E.create("a",G,{href:"http://de.webcams.travel/user/"+this.poi.listing.userId,text:this.poi.listing.user,target:"_blank"})}else{E.create("span",G,{text:this.poi.listing.user})}return I}});function A(H,G){this.init(H,G)}YAHOO.lang.extend(A,C,{createFlyoutContent:function(){return new D(this).create()}});LMI.Mapping.PoiSearchMarker.WebcamPoi=A;LMI.MapOptions.registerPoiClass("webcam",A)})();(function(){var A=LMI.Mapping,D=A.PoiSearchMarker,E=LMI.Element;function C(F){this.init(F)}YAHOO.lang.extend(C,D.FlyoutContentCreator,{create:function(){var F=E.create("div",null,{});E.create("a",F,{text:this.poi.listing.name,target:"_blank",className:"wikiName",href:this.poi.listing.linkUrl});if(this.poi.listing.thumbnailUrl.length>0){E.create("img",E.create("a",F,{href:this.poi.listing.linkUrl,target:"_blank"}),{src:this.poi.listing.thumbnailUrl,align:"left",className:"wikiImg",border:"0"})}E.create("p",F,{text:this.poi.listing.summary,className:"wikiDesc"});E.create("a",E.create("p",F,{className:"wikiLink"}),{href:this.poi.listing.linkUrl,text:LMI.Strings.getString("js.poi.wikipedia.more"),target:"_blank"});E.create("p",F,{className:"srcAttrib",text:LMI.Strings.getString("js.poi.wikipedia.source")});return F}});function B(G,F){this.init(G,F)}YAHOO.lang.extend(B,D,{createFlyoutContent:function(){return new C(this).create()}});LMI.MapOptions.registerPoiClass("wikipedia",B)})();(function(){var C=YAHOO.util.Dom,F=LMI.MapOptions,B=LMI.Mapping.PoiSearchMarker,D=B.prototype,E,A;F.getMyWWWGroupIndex=function(){return 3};E=F.createOptionItems;F.createOptionItems=function(I,G){var H=E.call(this,I,G);if(G){H.push(H.shift())}return H};F.createOptionsContent=function(){var I=document.createDocumentFragment(),G,H;LMI.Lang.forEach(LMI.Data.poiCategories,function(K,J){G=[];I.appendChild(F.createGroupHeader(K.groupName,J===0));LMI.Lang.forEach(K.categories,function(L){var N=L.imageSrc,M=L.value,O;if(L.key.match(/^dtgAdvertiser/)){O=LMI.Data.poiAdvertiserData[L.key];N=O.map_icon;M=O.name;if(!M.match(/\S/)){return }}G.push([L.key,M,N,L.selected]);F.categoryNames[L.key]=M});H=F.createOptionsTable(F.createOptionItems(G,(J===F.getMyWWWGroupIndex()&&LMI.Data.mywwwEnabled)),K.groupName);if(J===0){C.addClass(H,"first")}if(!F.isGroupShown(K.groupName)){C.addClass(H,"hidden")}I.appendChild(H)});return I};A=D.getRecommendedIconSrc;D.getRecommendedIconSrc=function(){if(this.option.match(/^dtgAdvertiser/)){return LMI.Data.poiAdvertiserData[this.option].map_icon}else{return A.call(this)}}})();(function(){var A=LMI.Mapping,F=LMI.MapOptions,B=A.PoiSearchMarker,E=LMI.Element;function C(H,G){this.init(H,G)}YAHOO.lang.extend(C,B,{createFlyoutContent:function(){return new D(this).create()},setListing:function(G){C.superclass.setListing.call(this,G);this.setProperty("category",null)}});function D(G){this.init(G)}YAHOO.lang.extend(D,B.FlyoutContentCreator,{init:function(G){D.superclass.init.call(this,G);this.advertiserData=LMI.Data.poiAdvertiserData[G.option]},create:function(){var G=D.superclass.create.call(this);this.addAdvertiserLogo(G);this.addContactInfo(G);this.addAdvertiserDetail(G);this.addDirectionsLink(G);this.addFindNearby(G);return G},addAdvertiserLogo:function(G){E.create("img",G,{className:"advertiserLogo",src:this.advertiserData.logo})},addAdvertiserDetail:function(J){var H=E.create("div",J,{className:"desc"}),G=E.create("p",H),I=this.advertiserData;G.innerHTML=I.description;E.create("p",H,{className:"detailsLink",children:[{tag:"a",href:I.url,text:I.url.replace(/^http(s)?:\/\//,""),target:"_blank"}]})}});F.registerPoiClass("dtgAdvertiser1",C);F.registerPoiClass("dtgAdvertiser2",C);F.registerPoiClass("dtgAdvertiser3",C)})();LMI.PoiSearch=function(){var D=YAHOO.util,F=new D.CustomEvent("searchStart"),E=new D.CustomEvent("searchDone");function A(K,J,I){var H=LMI.Urls.get("/poisearch.ds")+"?category="+encodeURIComponent(J)+"&boundingBox.bottomLeftLatitude="+encodeURIComponent(I[0])+"&boundingBox.bottomLeftLongitude="+encodeURIComponent(I[1])+"&boundingBox.topRightLatitude="+encodeURIComponent(I[2])+"&boundingBox.topRightLongitude="+encodeURIComponent(I[3]),G={success:function(M){var L=YAHOO.lang.JSON.parse(M.responseText);K(L)}};D.Connect.asyncRequest("GET",H,G)}function C(H,G){if(!YAHOO.lang.isArray(G)){G=[G]}LMI.Lang.forEach(G,function(J){var I,K,L=function(M){return function(N){if(!N||!N.success){}E.fire(M,N)}}(J);F.fire(J);if(J==="myplaces"){K=LMI.Urls.get("/nearbysavedlocations.ds")+"?&boundingBox.bottomLeftLatitude="+encodeURIComponent(H[0])+"&boundingBox.bottomLeftLongitude="+encodeURIComponent(H[1])+"&boundingBox.topRightLatitude="+encodeURIComponent(H[2])+"&boundingBox.topRightLongitude="+encodeURIComponent(H[3]);I={success:function(N){var M=YAHOO.lang.JSON.parse(N.responseText);L(M)}};D.Connect.asyncRequest("GET",K,I)}else{LMI.PoiSearch.getPois(L,J,H)}})}function B(L,K,J,H){var I=LMI.Urls.get("/poisearch.ds")+"?&category="+encodeURIComponent(K)+"&routePath="+encodeURIComponent(J)+"&radius="+encodeURIComponent(H),G={success:function(N){var M=YAHOO.lang.JSON.parse(N.responseText);L(M)}};D.Connect.asyncRequest("GET",I,G)}return{doSearch:C,getPois:A,getRoutePois:B,searchStart:F,searchDone:E}}();LMI.PoiSearchCategories=function(){var H=YAHOO.util,G=LMI.Lang.indexOf,C=[],F=new H.CustomEvent("categoryEnabled"),E=new H.CustomEvent("categoryDisabled");function B(I){if(G(C,I)<0){C.push(I);F.fire(I)}}function D(I){var J=G(C,I);if(J>=0){C.splice(J,1);E.fire(I)}}function A(){return C}return{getEnabledCategoryNames:A,enableCategory:B,disableCategory:D,categoryEnabled:F,categoryDisabled:E}}();LMI.PoiSearchController=function(){var F=LMI.Lang,P=F.forEach,G=LMI.PoiSearchCategories,T=LMI.PoiSearch,Q,E,I,U,B,J;function S(L){P(Q.objects.getIdsByProperty("type",L),function(V){Q.removeObject(V)})}function D(L,V){P(V,function(W){var X=new LMI.Mapping.PoiSearchMarker(W,L);Q.addObject(X)})}function A(W,V){var L=V[0],X=V[1];if(X&&X.success){S(L);D(L,X.mapLocationVOs)}}function H(L){var V=Q.getLLPoint(),X=Q.getURPoint(),W=[V.lat,V.lng,X.lat,X.lng];L=L||G.getEnabledCategoryNames();T.doSearch(W,L)}function K(W,V){if(!B){B=Q.getCenterPoint();U=Q.zoomLevel}var L=V[0];LMI.PoiSearchController.performSearch(L)}function R(W,V){var L=V[0];S(L)}function M(V){if(!B){B=Q.getCenterPoint();U=Q.zoomLevel;return }var L=Q.getCenterPoint(),X=Q.tileManager.getPosition(B),W=Q.tileManager.getPosition(L);if(U!==V.zoomLevel||Math.abs(X.x-W.x)>(Q.width/3)||Math.abs(X.y-W.y)>(Q.height/3)){U=V.zoomLevel;B=L;LMI.PoiSearchController.performSearch()}}function C(){if(!J){J=LMI.Lang.debounce(LMI.PoiSearchController.mapRecenterHandler,2000)}if(!B){B=Q.getCenterPoint();U=Q.zoomLevel}if(!E&&!I){E=true;Q.addEventListener("recenter",J);Q.addEventListener("zoom",J)}}function N(){if(E){E=false;Q.removeEventListener("recenter",J);Q.removeEventListener("zoom",J)}}function O(V,L){Q=V;I=L;C();G.categoryEnabled.subscribe(K);G.categoryDisabled.subscribe(R);T.searchDone.subscribe(A)}return{init:O,watchMap:C,stopWatchingMap:N,performSearch:H,mapRecenterHandler:M}}();LMI.PoiSearchCheckboxes=function(){var F=LMI.Lang.forEach,C=LMI.PoiSearchCategories,H=LMI.PoiSearch,D={};function E(L,K){var J=K[0],M=L==="categoryEnabled";if(J&&(J in D)){F(D[J],function(N){if(N.checked!==M){N.checked=M}})}}C.categoryEnabled.subscribe(E);C.categoryDisabled.subscribe(E);function G(){var J=this.value,K=this.checked;if(J&&(J in D)){LMI.MapOptions.clickHandler(this);C[K?"enableCategory":"disableCategory"](J)}}function I(J){var K=LMI.Element.getAll("input[type=checkbox]",J);F(K,function(M){var L=M.value;if(!(L in D)){D[L]=[]}YAHOO.util.Event.on(M,"click",G);D[L].push(M)})}function A(L,K){var J=K[0];if(D[J]){F(D[J],function(M){M.disabled=true})}}function B(L,K){var J=K[0];if(D[J]){F(D[J],function(M){M.disabled=false})}}LMI.Init.addFunction(function(){H.searchStart.subscribe(A);H.searchDone.subscribe(B)});return{addSet:I}}();LMI.PanelExpander=(function(){var B=YAHOO.util,H=B.Dom,G=B.Event,D,M,F,J,E,Q,L,A,I,C;function K(){var R,S;if(L){R=parseInt(H.getStyle(L,"width"),10);S=F-R;H.setStyle(Q,E,(J-S)+"px")}if(A){A.resizeLayers()}}function P(S){var T,R;T=L?{width:{to:S?F:0}}:{marginLeft:{to:S?J:0}};R=new B.Anim(L?L:Q,T,0.5);R.onTween.subscribe(K);if(S){H.setStyle(D,"display","block");H.removeClass(M,"expanded")}H.addClass(D,"animating");R.onComplete.subscribe(function(){H.removeClass(D,"animating");if(!S){H.setStyle(D,"display","none");H.setStyle(Q,E,"0");H.addClass(M,"expanded")}else{H.setStyle(Q,E,J+"px");if(L){H.setStyle(L,"width",F+"px")}}LMI.StretchyPages.resize();K()});R.animate()}function N(){var R=LMI.Element.getOne("img",this);if(H.hasClass(this,"expand")){P(true);H.removeClass(this,"expand");R.src=I}else{P(false);H.addClass(this,"expand");R.src=C}this.blur()}function O(S,V,T,R,U){D=V;M=T;if(R){A=R}if(U){I=LMI.Urls.getImg("spacer.gif");C=LMI.Urls.getImg("spacer.gif");E="margin-left";Q=M}else{I=LMI.Urls.getImg("spacer.gif");C=LMI.Urls.getImg("spacer.gif");E="margin-right";Q=M;L=D}if(L){F=parseInt(H.getStyle(L,"width"),10)}J=parseInt(H.getStyle(Q,E),10);if(S){G.on(S,"click",N);if(U){H.addClass(S,"left")}}}return{init:O}})();LMI.HighlightListing=(function(){var A=YAHOO.util,F=A.Dom,E=A.Event,B;function D(N){var M=E.getTarget(N);if(M.nodeName!=="TBODY"){M=F.getAncestorByTagName(M,"tbody")}if(F.hasClass(M,"nohighlight")){return null}return M}function K(O){var M=F.getNextSibling(O),N=F.getPreviousSibling(O);F.addClass(O,"highlight");if(M){F.addClass(M,"belowHighlight")}if(N){F.addClass(N,"aboveHighlight")}}function J(O){var M=F.getNextSibling(O),N=F.getPreviousSibling(O);F.removeClass(O,"highlight");if(M){F.removeClass(M,"belowHighlight")}if(N){F.removeClass(N,"aboveHighlight")}}function H(N){var M=D(N);if(M){if(N.type==="mouseover"){K(M)}else{J(M)}}}function I(){E.on(B,"mouseover",H);E.on(B,"mouseout",H)}function G(){E.removeListener(B,"mouseover",H);E.removeListener(B,"mouseout",H)}function C(M,O){var N;LMI.Lang.forEach(LMI.Element.getAll("#"+B+" tbody"),function(P){N=F.getRegion(P);if(N.contains(new A.Region(O,M,O,M))){K(P)}else{J(P)}})}function L(M){B=M;I()}return{init:L,enableHighlight:I,disableHighlight:G,resetHighlight:C,highlightListing:K,dehighlightListing:J}})();LMI.AddressEncoder=(function(){var A="_-_";function B(){}B.prototype={toString:function(){var D,C="";for(D in this){if(typeof this[D]!=="function"&&this[D]){if(C){C+=A}C+=D+"="+this[D]}}return C}};B.decode=function(C){var G=C.split(A),D=G.length,F={},E;while(D--){E=G[D].split("=");if(E.length===2){F[E[0]]=E[1]}}return F};B.isEncoded=function(C){return(C.match(/\w+=\w+(-_-\w+=\w+)*/)!==null)};return B})();(function(){var A=YAHOO.util,D=A.Event,E=A.Dom,I=LMI.Lang.forEach,C=LMI.Element.getOne,H,F;function B(K){var O=C("#toLocation"),J=C("#fromLocation"),N=O.value,M=J.value;function L(P,Q){if(P.type==="select"){C("option[value="+Q+"]").selected=true}else{P.value=Q}}I(["Location","StreetWithCountry","CityWithCountry","CountryWithCountry"],function(Q){var P=C("#to"+Q),S=C("#from"+Q),R;if(P&&S){R=P.value;L(P,S.value);L(S,R)}});if(document.body.id.indexOf("publicTransport")<0){H.syncToSelectValue();F.syncToSelectValue()}YAHOO.util.Event.stopEvent(K)}function G(J){I(["from","to"],function(L){var K=C("#"+L+"Fields"),M;if(E.hasClass(K,"nonDefaultCountry")){M=new LMI.AddressEncoder();M.address=C("#"+L+"StreetWithCountry").value;M.city=C("#"+L+"CityWithCountry").value;M.country=C("#"+L+"CountryWithCountry").value;C("#"+L+"Location").value=M.toString()}});D.preventDefault(J);C("#dirSearchForm").submit()}LMI.LinkBehavior.add("fieldSwitcher",B);LMI.Init.addFunction(function(){if(LMI.Data.activeMapTab==="directions"||LMI.Data.activeMapTab==="directionsForm"){LMI.SearchForm.createWhereDropDown("toLocation",{tip:true});LMI.SearchForm.createWhereDropDown("fromLocation",{tip:true});D.on(C("#dirSearchForm"),"submit",G);D.on(C("#dirFormSubmit"),"click",G);H=new LMI.SearchForm.CountrySelector(C("#fromFields"));F=new LMI.SearchForm.CountrySelector(C("#toFields"))}})})();(function(){var A=document.getElementById("fromLocation"),D=null,C=document.getElementById("toLocation"),B=null;function E(){D=inputLabelText(A,"js.from.label");B=inputLabelText(C,"js.to.label");var F=LMI.SearchForm.searchFormSubmitHandler;LMI.SearchForm.searchFormSubmitHandler=function(G){inputLabelTextSubmit(A,"js.from.label",D);inputLabelTextSubmit(C,"js.to.label",B);F(G)}}DomReady.ready(E)})();
