var YUI;YUI.add("lw-base64",function(b){var a={keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var c="",d=0,m,k,h,l,j,g,f;e=a.utf8_encode(e);while(d<e.length){m=e.charCodeAt(d);d=d+1;k=e.charCodeAt(d);d=d+1;h=e.charCodeAt(d);d=d+1;l=m>>2;j=((m&3)<<4)|(k>>4);g=((k&15)<<2)|(h>>6);f=h&63;if(isNaN(k)){g=64;f=64}else{if(isNaN(h)){f=64}}c=c+this.keyStr.charAt(l)+this.keyStr.charAt(j)+this.keyStr.charAt(g)+this.keyStr.charAt(f)}return c},decode:function(e){var c="",m,k,h,l,j,g,f,d=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(d<e.length){l=this.keyStr.indexOf(e.charAt(d));d=d+1;j=this.keyStr.indexOf(e.charAt(d));d=d+1;g=this.keyStr.indexOf(e.charAt(d));d=d+1;f=this.keyStr.indexOf(e.charAt(d));d=d+1;m=(l<<2)|(j>>4);k=((j&15)<<4)|(g>>2);h=((g&3)<<6)|f;c=c+String.fromCharCode(m);if(g!==64){c=c+String.fromCharCode(k)}if(f!==64){c=c+String.fromCharCode(h)}}c=a.utf8_decode(c);return c},utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var d="",g=0,f;for(g;g<e.length;g=g+1){f=e.charCodeAt(g);if(f<128){d+=String.fromCharCode(f)}else{if((f>127)&&(f<2048)){d+=String.fromCharCode((f>>6)|192);d+=String.fromCharCode((f&63)|128)}else{d+=String.fromCharCode((f>>12)|224);d+=String.fromCharCode(((f>>6)&63)|128);d+=String.fromCharCode((f&63)|128)}}}return d},utf8_decode:function(d){var f="",h=0,k=0,j=0,g=0,e=0;while(h<d.length){k=d.charCodeAt(h);if(k<128){f+=String.fromCharCode(k);h=h+1}else{if((k>191)&&(k<224)){g=d.charCodeAt(h+1);f+=String.fromCharCode(((k&31)<<6)|(g&63));h=h+2}else{g=d.charCodeAt(h+1);e=d.charCodeAt(h+2);f+=String.fromCharCode(((k&15)<<12)|((g&63)<<6)|(e&63));h=h+3}}}return f}};b.namespace("LW");b.LW.Base64=a},"@VERSION@",{});var YUI;YUI.add("lw-placefinder-YQL",function(b){var a={proto:null,host:"locdrop.query.yahoo.com",table:"locdrop.placefinder",urlPath:"/v1/public/yql?",gflags:"f",locale:"en-US",timeout:5000,geocodeAddress:function(c,j,f,g,i){if(c===null){return}if(!this.proto){this.proto=i.instance.proto;this.locale=i.instance.locale}var e,d="",h=c+d;h=h.replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0");e="select * from "+this.table+' where text="'+encodeURIComponent(h)+'" and locale="'+this.locale+'" and gflags="'+this.gflags+'"';this.geocode(e,j,f,g,i)},geocode:function(f,j,g,h,i){var d,c,e;e=this.proto+this.host+this.urlPath+"q="+f+"&format=json&callback={callback}";d={instance:this,tcb:h,fcb:g,scb:j,cb:i,requestURL:e};c=new b.JSONPRequest(e,{on:{success:this.geocodeDone,timeout:this.geocodeTimedout,failure:this.geocodeFailure},timeout:this.timeout,args:[d]});c.send()},geocodeDone:function(c,d){if(typeof(c)==="undefined"||typeof(c.error)!=="undefined"||typeof(c.query.results)==="undefined"){d.instance.geocodeFailure(c,d)}else{d.scb(c,d.cb)}},geocodeTimedout:function(c,d){var e={errCode:"LW_GEOCODER_TIMEOUT",requestURL:d.requestURL,yqlResponse:c};d.tcb(e,d.cb)},geocodeFailure:function(c,d){var e={errCode:"LW_GEOCODER_FAILURE",requestURL:d.requestURL,yqlResponse:c};d.fcb(e,d.cb)},geocodeMakeLocArray:function(k,o,c){var f,e=0,g=[],m,h=[],l,n,d;if(k===1){g.push(o.query.results.Result)}else{g=o.query.results.Result}m=g.length;for(f=0;f<m;f=f+1){l="";if(g[f].line1!==null){l=g[f].line1}if(g[f].line2!==null){if(l.length>0){l+=", "}l+=g[f].line2}if(g[f].line3!==null){if(l.length>0){l+=", "}l+=g[f].line3}if(g[f].line4!==null){if(l.length>0){l+=", "}l+=g[f].line4}g[f].id="new-fl-"+b.LW.Base64.encode(l);g[f].addr=l;g[f].city=g[f].city||null;if(g[f].uzip!==null&&g[f].uzip!==""&&g[f].uzip!=="0"){g[f].zip=g[f].uzip}if(g[f].statecode!==null){g[f].sc=g[f].statecode}if(g[f].countrycode!==null){g[f].cc=g[f].countrycode}if(g[f].country!==null){g[f].ctry=g[f].country}if(g[f].latitude!==null){g[f].lat=g[f].latitude}if(g[f].longitude!==null){g[f].lon=g[f].longitude}if(g[f].woeid!==null){g[f].woe=g[f].woeid}n=true;if(c){d=c(g[f]);if(d.hidden){n=false}if(d.disabled){g[f].disabled=true}}if(n){h[e]=g[f];e=e+1}}return h}};b.namespace("LW");b.LW.PlaceFinder=a},"@VERSION@",{requires:["jsonp","jsonp-url","lw-base64"]});var YUI;YUI.add("lw-autosuggest",function(b){var a={proto:null,host:null,urlPath:null,locale:"en-US",timeout:5000,pending:false,suggestLocation:function(h,k,d,l,f,e,m){if(h===null){return}if(this.pending){return}if(!this.proto){this.proto=m.instance.proto;this.locale=m.instance.locale;if(this.proto==="https://"){this.host="search.yahoo.com";this.urlPath="/sugg/gossip/gossip-gl-location?output=sd1&p2=t,pt"}else{this.host="sugg.us.search.yahoo.net";this.urlPath="/gossip-gl-location?output=sd1&p2=t,pt"}}this.pending=true;var n,i,g="",j=h+g,c=this.proto+this.host+this.urlPath;j=j.replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0");if(k!==null&&d!==null){c+="&p1="+d+","+k}c+="&command="+j+"&lc="+this.locale+"&callback={callback}";n={instance:this,tcb:e,fcb:f,scb:l,cb:m,requestURL:c,inputVal:h};i=new b.JSONPRequest(c,{on:{success:this.suggestDone,timeout:this.suggestTimedout,failure:this.suggestFailure},timeout:this.timeout,args:[n]});i.send()},suggestDone:function(c,d){if(typeof(c)==="undefined"||typeof(c.r)==="undefined"){d.instance.suggestFailure(c,d)}else{d.instance.pending=false;d.scb(c,d.inputVal,d.cb)}},suggestTimedout:function(c,d){d.instance.pending=false;var e={errCode:"LW_AUTOSUGGEST_TIMEOUT",requestURL:d.requestURL,yqlResponse:c};d.tcb(e,d.cb)},suggestFailure:function(c,d){d.instance.pending=false;var e={errCode:"LW_AUTOSUGGEST_FAILURE",requestURL:d.requestURL,yqlResponse:c};d.fcb(e,d.cb)},suggestMakeLocArray:function(q,u){var t=0,r=0,o=0,g,v,f=(q)?q.length:0,c=[],p=this.locale.toLowerCase(),d,h,m="",w,s="",n="",l=u.toUpperCase(),e;for(t;t<f;t=t+1){e=false;w=[];m="";if(q[t].d!==null){g=q[t].d;if(g.indexOf(":")!==-1){g=g.split(":")[1]}if(g.indexOf("&")!==-1){v=g.split("&");o=0;d=v.length;for(o;o<d;o=o+1){if(v[o].indexOf("woeid")===0){q[t].woe=v[o].split("=")[1]}else{if(v[o].indexOf("lat")===0){q[t].lat=v[o].split("=")[1]}else{if(v[o].indexOf("lon")===0){q[t].lon=v[o].split("=")[1]}else{if(v[o].indexOf("sc")===0){q[t].sc=v[o].split("=")[1]}else{if(v[o].indexOf("s")===0){q[t].state=v[o].split("=")[1]}else{if(v[o].indexOf("c")===0){q[t].ctry=v[o].split("=")[1]}else{if(v[o].indexOf("iso")===0){q[t].cc=v[o].split("=")[1]}else{if(v[o].indexOf("pn")===0){q[t].pn_city=v[o].split("=")[1]}}}}}}}}}}}s=q[t].k;n=q[t].pn_city;if(s&&(s.toUpperCase()).indexOf(l)===0){e=true}else{if(n&&(n.toUpperCase()).indexOf(l)===0){e=true;s=n}}if(e){q[t].city=s;if(p.indexOf("hk")!==-1||p.indexOf("tw")!==-1){if(typeof(q[t].ctry)!=="undefined"&&q[t].ctry){w.push(q[t].ctry)}if(typeof(q[t].state)!=="undefined"&&q[t].state&&s!==q[t].state){w.push(q[t].state)}w.push(s)}else{w.push(s);if(p.indexOf("it")!==-1||p.indexOf("au")!==-1||p.indexOf("br")!==-1||p.indexOf("mx")!==-1||p.indexOf("ca")!==-1||p.indexOf("us")!==-1){if(typeof(q[t].sc)!=="undefined"&&q[t].sc){w.push(q[t].sc)}else{if(typeof(q[t].state)!=="undefined"&&q[t].state&&s!==q[t].state){w.push(q[t].state)}}}else{if(typeof(q[t].state)!=="undefined"&&q[t].state&&s!==q[t].state){w.push(q[t].state)}else{if(typeof(q[t].sc)!=="undefined"&&q[t].sc){w.push(q[t].sc)}}}if(p.indexOf("us")!==-1&&typeof(q[t].cc)!=="undefined"&&q[t].cc){w.push(q[t].cc)}else{if(typeof(q[t].ctry)!=="undefined"&&q[t].ctry){w.push(q[t].ctry)}}}m=w.join(", ");q[t].addr=m;q[t].id="new-gsp-"+b.LW.Base64.encode(m);if(m){c[r]={};c[r].id=q[t].id;c[r].woe=q[t].woe;c[r].addr=q[t].addr;if(typeof(q[t].lat)!=="undefined"&&q[t].lat){c[r].lat=q[t].lat}if(typeof(q[t].lon)!=="undefined"&&q[t].lon){c[r].lon=q[t].lon}if(typeof(q[t].city)!=="undefined"&&q[t].city){c[r].city=q[t].city}if(typeof(q[t].state)!=="undefined"&&q[t].state){c[r].state=q[t].state}if(typeof(q[t].sc)!=="undefined"&&q[t].sc){c[r].sc=q[t].sc}if(typeof(q[t].ctry)!=="undefined"&&q[t].ctry){c[r].ctry=q[t].ctry}if(typeof(q[t].cc)!=="undefined"&&q[t].cc){c[r].cc=q[t].cc}r=r+1}}}return c}};b.namespace("LW");b.LW.PlaceSuggest=a},"@VERSION@",{requires:["jsonp","jsonp-url","lw-base64"]});var YUI;YUI.add("lw-geo",function(b){var a={running:false,timeout:15000,geoDetectSupport:function(){if(!navigator.geolocation){return false}return true},getCurrentLocation:function(d,c,e){if(!this.running){e=e||this.timeout;navigator.geolocation.getCurrentPosition(d,c,{timeout:e});this.running=true}else{c(null)}}};b.namespace("LW");b.LW.GeoLocation=a},"@VERSION@",{});var YUI;YUI.add("lw-overlay",function(b){var a=function(c){this.parentNode=c.parentNode;this.bodyContent=c.bodyContent;this.headContent=c.headerContent||null;this.footerContent=c.footerContent||null;this.width=c.width||null;this.zIndex=c.zIndex||null;this.xy=c.xy||null;this.cssStyle=c.cssStyle||null;this.cssClass=c.cssClass||null;this.prefix=c.prefix||"append";this.render=(c.render===false)?false:true;this.visible=(c.visible===false)?false:true;this.mainNode=null;this.renderMarkup()};b.mix(a.prototype,{set:function(c,d){this[c]=d;switch(c){case"headerContent":this.setHeader(d);break;case"bodyContent":this.setBody(d);break;case"footerContent":this.setFooter(d);break;case"xy":this.setXY(d);break;case"zIndex":this.setZindex(d);break}},get:function(c){var d=null;switch(c){case"contentBox":d=this.mainNode;break}return d},show:function(){this.mainNode.removeClass("lw-overlay-hidden")},hide:function(){this.mainNode.addClass("lw-overlay-hidden")},setBody:function(c){this.mainNode.one(".lw-widget-bd").set("innerHTML",c)},setHeader:function(d){var c=this.mainNode;if(d){if(c.one(".lw-widget-hd")){c.one(".lw-widget-hd").set("innerHTML",d)}else{d='<div class="lw-widget-hd">'+d+"</div>";c.insert(d,0)}}else{if(c.one(".lw-widget-hd")){c.one(".lw-widget-hd").remove()}}},setFooter:function(d){var c=this.mainNode;if(d){if(c.one(".lw-widget-ft")){c.one(".lw-widget-ft").set("innerHTML",d)}else{d='<div class="lw-widget-ft">'+d+"</div>";c.one(".lw-widget-bd").insert(d,"after")}}else{if(c.one(".lw-widget-ft")){c.one(".lw-widget-ft").remove()}}},setXY:function(d){var c=this.mainNode;c.setStyle("left",d[0]+"px");c.setStyle("top",d[1]+"px")},setZindex:function(d){var c=this.mainNode;c.setStyle("zIndex",d)},renderMarkup:function(){var l,c,h,m,f,k,e,n,g,d,j;if(!this.mainNode){e='<div class="lw-widget lw-overlay">'+((b.UA.ie&&b.UA.ie<=7)?'<div class="lw-arrowimg">&nbsp;</div>':"")+'<div class="lw-overlay-content"><div class="lw-widget-bd"></div></div></div>';this.mainNode=c=b.Node.create(e);if(this.prefix==="prepend"){this.parentNode.prepend(c)}else{this.parentNode.append(c)}}else{c=this.mainNode}h=this.headContent||"";if(h){if(c.one(".lw-widget-hd")){c.one(".lw-widget-hd").set("innerHTML",h)}else{h='<div class="lw-widget-hd">'+h+"</div>";c.one(".lw-widget-bd").insert(h,"before")}}else{if(c.one(".lw-widget-hd")){c.one(".lw-widget-hd").remove()}}c.one(".lw-widget-bd").set("innerHTML",this.bodyContent);f=this.footerContent||"";if(f){if(c.one(".lw-widget-ft")){c.one(".lw-widget-ft").set("innerHTML",f)}else{f='<div class="lw-widget-ft">'+f+"</div>";c.one(".lw-widget-bd").insert(f,"after")}}else{if(c.one(".lw-widget-ft")){c.one(".lw-widget-ft").remove()}}if(false===this.visible){c.addClass("lw-overlay-hidden")}if(this.width){c.setStyle("width",this.width+"px")}if(this.xy){c.setStyle("left",this.xy[0]+"px");c.setStyle("top",this.xy[1]+"px")}if(this.zIndex){c.setStyle("zIndex",this.zIndex)}if(this.cssClass){g=0;j=this.cssClass.length;if(b.UA.ie&&b.UA.ie<=7){for(g;g<=j;g=g+1){if(this.cssClass[g].indexOf("NorthWest")!==-1){d=0.04*(this.width);break}else{if(this.cssClass[g].indexOf("NorthEast")!==-1){d=0.855*(this.width);break}else{if(this.cssClass[g].indexOf("NorthFarEast")!==-1){d=(this.width-27);break}else{if(this.cssClass[g].indexOf("NorthFarWest")!==-1){d=1;break}else{c.addClass(this.cssClass[g])}}}}}if(!d){d=((this.width)/2)-13}b.one(".lw-arrowimg").setStyle("marginLeft",d+"px");b.one(".lw-arrowimg").setStyle("zIndex",this.zIndex+1)}else{for(g;g<=j;g=g+1){c.addClass(this.cssClass[g])}}}if(this.cssStyle){for(n in this.cssStyle){if(this.cssStyle.hasOwnProperty(n)){c.setStyle(n,this.cssStyle[n])}}}}});b.namespace("LW");b.LW.Overlay=a},"@VERSION@",{requires:["node","event"]});var YUI;YUI.add("lw-yql",function(b){var a={crumb:null,app:"yahoo.locdrop.lw.desktop",locale:"en-US",version:"v4",proto:"http://",yqlHost:"us-locdrop.query.yahoo.com",yqlTable:"user.location.public",urlPath:"/v1/public/yql?",yqlTimeout:5000,pendingCallback:false,initConfig:function(c){if(c.crumb){this.crumb=c.crumb}if(c.locale){this.locale=c.locale}if(c.app){this.app=c.app}if(c.version){this.version=c.version}if(c.yqlHost){this.yqlHost=c.yqlHost}if(window.location.protocol==="https:"||c.forceSSL){this.proto="https://"}},getHostUrl:function(){return this.proto+this.yqlHost+this.urlPath},makeRequest:function(h,g,f){if(this.pendingCallback){return false}this.pendingCallback=true;var c,d,e=this.getHostUrl()+"q="+h+"&format=json&callback={callback}";d={callbackStr:g,env:f,instance:this,requestURL:e};c=new b.JSONPRequest(e,{on:{success:this.requestDone,timeout:this.requestTimeout,failure:this.requestFailure},timeout:this.yqlTimeout,args:[d]});c.send();return true},getCurrentLocation:function(i,d,f){var h,j,k,g,c,e;k=this.crumb;j=this.locale;g=this.version;c=this.app;e={success:i,error:d,timeout:f};h="SELECT * FROM "+this.yqlTable+' WHERE crumb="'+k+'" AND version="'+g+'" AND locale="'+j+'" AND app="'+c+'"';return this.makeRequest(encodeURIComponent(h),"getCurrentLocationCallback",e)},getAllLocations:function(j,d,f,g){var i,k,l,h,c,e;l=this.crumb;k=this.locale;h=this.version;c=this.app;e={success:j,error:d,timeout:f,callback:g};i="SELECT * FROM "+this.yqlTable+' WHERE crumb="'+l+'" AND version="'+h+'" AND locale="'+k+'" AND app="'+c+'"';return this.makeRequest(encodeURIComponent(i),"getAllLocationsCallback",e)},getCurrentLocationCallback:function(c,e){var f="current",d=[];if(typeof(c.query.results.locdrop[f]!=="undefined")&&c.query.results.locdrop[f]){d=(c.query.results.locdrop[f].length)?c.query.results.locdrop[f]:[c.query.results.locdrop[f]]}if(e.env.success){e.env.success(d)}},getAllLocationsCallback:function(c,e){var f="favorite",d=[];if(typeof(c.query.results.locdrop[f]!=="undefined")&&c.query.results.locdrop[f]){d=(c.query.results.locdrop[f].length)?c.query.results.locdrop[f]:[c.query.results.locdrop[f]]}if(e.env.success){e.env.success(d,e.env.callback)}},deleteLocation:function(k,j,d,e,f){var h,i={id:k,success:j,error:d,timeout:e,callback:f},c,l,g;l=this.crumb;g=this.version;c=this.app;h="DELETE FROM "+this.yqlTable+' WHERE id="'+k+'" AND app="'+c+'" AND crumb="'+l+'" AND version="'+g+'"';return this.makeRequest(encodeURIComponent(h),"deleteLocationCallback",i)},deleteLocationCallback:function(c,d){if(d.env.success){d.env.success(c,d.env.callback)}},setLocation:function(g,o,e,h,i){var l,q=[],j,m=[],f,d,k,p,n,c={success:o,error:e,timeout:h,callback:i};p=this.crumb;d=this.app;k=this.version;n=this.locale;if(p){q.push("crumb");m.push('"'+p+'"')}if(d){q.push("app");m.push('"'+d+'"')}if(k){q.push("version");m.push('"'+k+'"')}if(n){q.push("locale");m.push('"'+n+'"')}if(g.type){q.push("type");m.push('"'+g.type+'"')}if(g.lat){q.push("lat");m.push('"'+g.lat+'"')}if(g.lon){q.push("lon");m.push('"'+g.lon+'"')}if(g.radius){q.push("radius");m.push('"'+g.radius+'"')}if(g.woe){q.push("woe");m.push('"'+g.woe+'"')}if(g.addrstring){q.push("addrstring");m.push('"'+g.addrstring+'"')}if(g.ip){q.push("ip");m.push('"'+g.ip+'"')}if(g.wifi_id){q.push("wifi_id");m.push('"'+g.wifi_id+'"')}if(g.wifi_ssid){q.push("wifi_ssid");m.push('"'+g.wifi_ssid+'"')}if(g.cell_id){q.push("cell_id");m.push('"'+g.cell_id+'"')}j=q.join(", ");f=m.join(", ");l="INSERT INTO "+this.yqlTable+"("+j+") VALUES ("+f+")";return this.makeRequest(encodeURIComponent(l),"setLocationCallback",c)},setLocationCallback:function(c,d){if(d.env.success){d.env.success(c,d.env.callback)}},queryTypeErroCode:function(d){var e,c="LYD_GET_API_ERR";e=new RegExp(d,"i");if(e.test("select")||e.test("update")){c="LYD_SET_API_ERR"}else{if(e.test("delete")){c="LYD_CLEAR_API_ERR"}}return c},responseErrorCheck:function(c,e){var d={errCode:0,requestURL:e||"",yqlResponse:c||""};if((typeof(c)==="undefined"||typeof(c.error)!=="undefined")||(typeof(c.query)==="undefined"||typeof(c.query.results)==="undefined"||c.query.results===null)||(typeof(c.query.results.Error)!=="undefined")||(typeof(c.query.results.result)!=="undefined")){d.errCode=this.queryTypeErroCode(e);return d}if(typeof(c.query.results.locdrop)!=="undefined"&&typeof(c.query.results.locdrop.status)!=="undefined"&&c.query.results.locdrop.status.code==="ERROR"){switch(c.query.results.locdrop.actionTaken){case"get":d.errCode="LYD_GET_API_ERR";break;case"set":d.errCode="LYD_SET_API_ERR";break;case"clear":d.errCode="LYD_CLEAR_API_ERR";break;default:return}return d}return d},requestDone:function(d,c){c.instance.pendingCallback=false;var e=c.instance.responseErrorCheck(d,c.requestURL);if(e.errCode){c.env.error(e,c.env.callback);return}c.instance[c.callbackStr](d,c)},requestTimeout:function(d,c){c.instance.pendingCallback=false;var e={errCode:"LYD_SAVED_LOC_FETCH_TIMEOUT",requestURL:c.requestURL,yqlResponse:d};if(c.env.timeout){c.env.timeout(e,c.env.callback)}},requestFailure:function(d,c){c.instance.pendingCallback=false;var e=c.instance.responseErrorCheck(d);if(c.env.error){c.env.error(e,c.env.callback)}}};b.namespace("LW");b.LW.YQL=a},"@VERSION@",{requires:["jsonp","jsonp-url"]});var YUI;YUI.add("lw-core",function(b){function a(h){var c=b.LW.Core,g=this,f={status:"OK"},d={status:"ERROR"},e={status:"TIMEOUT"};this.filterCallback=h.filterCallback;this.geoTimeout=15000;this.app=h.app||"yahoo.locdrop.lmp.desktop";this.holderSetTimeout=null;this.autoCompleteCount=2;this.addrStr=h.pageLoadLoc||null;this.lat=h.lat||null;this.lon=h.lon||null;this.gossipResults=[];this.cacheFavLoc=[];this.favSuggLoc=[];this.flLoc=[];this.detectCtx=null;this.yqladdFavLocCB=null;this.holderSetTimeout=null;this.locale=h.locale||"en-US";this.init=function(){b.LW.YQL.initConfig(h)};this.getFavoriteCache=function(){return g.cacheFavLoc};this.invalidateCache=function(){g.cacheFavLoc=[]};this.selectedLoc=function(n){var m,j=0,l=n,k=[];if(n.indexOf("new-gsp")!==-1){k=this.favSuggLoc;m="gossip"}else{if(n.indexOf("new-fl")!==-1){k=this.flLoc;m="findlocation"}else{k=this.cacheFavLoc;m="locdrop"}}for(j;j<k.length;j=j+1){if(k[j].id===n){k[j].origin=m;return k[j]}}return null};this.detect=function(i){this.detectCtx=i;if(b.LW.GeoLocation.geoDetectSupport()){if(b.LW.GeoLocation.running){return}b.LW.GeoLocation.getCurrentLocation(g.detectLocationInsert,g.detectFailed,g.geoTimeout);this.holderSetTimeout=setTimeout(b.bind(function(j){this.detectTimeout()},this),this.geoTimeout)}else{d.code="LW_DETECT_BROWSER_SUPPORT";return i.callback.call(i.instance,{},d)}};this.detectLocationInsert=function(j){b.LW.GeoLocation.running=false;var i=b.LW.Core,k={};k.lat=j.coords.latitude;k.lon=j.coords.longitude;k.radius=j.coords.accuracy;k.type="current";b.LW.YQL.setLocation(k,g.yqldetectSuccess,g.detectFailed,g.detectTimeout)};this.yqldetectSuccess=function(){g.invalidateCache();b.LW.YQL.getCurrentLocation(g.detectSuccess,g.detectFailed,g.detectTimeout)};this.detectSuccess=function(i){if(g.holderSetTimeout){clearTimeout(g.holderSetTimeout)}if(i.length){i[0]["orgin"]="locdrop"}return g.detectCtx.callback.call(g.detectCtx.instance,i,f)};this.detectFailed=function(i){if(g.holderSetTimeout){clearTimeout(g.holderSetTimeout)}b.LW.GeoLocation.running=false;d.code="LW_DETECT_FAILURE";return g.detectCtx.callback.call(g.detectCtx.instance,i,d)};this.detectTimeout=function(i){if(g.holderSetTimeout){clearTimeout(g.holderSetTimeout)}b.LW.GeoLocation.running=false;e.code="LW_DETECT_TIMEOUT";return g.detectCtx.callback.call(g.detectCtx.instance,i,e)};this.suggest=function(k,j){var m,l,i;if(typeof(k)!=="undefined"&&k.length>=this.autoCompleteCount){if(typeof(g.gossipResults[k])!=="undefined"){l=g.gossipResults[k];m=g.savedLocationList(k);if(m.length!==0){i=g.mergeLocations(m,l)}else{i=l}g.favSuggLoc=i;return j.callback.call(j.instance,i,f)}b.LW.PlaceSuggest.suggestLocation(k,g.lat,g.lon,this.suggestSuccess,this.suggestFailure,this.suggestTimeout,j)}};this.savedLocationList=function(m){var r,l=0,k=0,q,n,p,o=[];if(typeof(g.cacheFavLoc)!=="undefined"&&g.cacheFavLoc.length){q=g.cacheFavLoc;n=(q)?q.length:0;for(l;l<n;l=l+1){p=q[l];if(m.length===0){o[k]=p;k=k+1}else{r=g.getAddressStr(p)||"";if((r&&r.toUpperCase().indexOf(m.toUpperCase())===0)){p.addr=r;o[k]=p;k=k+1}}}return o}return[]};this.getAddressStr=function(o){var p=null,s=this.locale.toLowerCase(),m=[],r,l,i,j,n,q,k;r=o.addrstring||null;l=(o.town)?o.town.name:null;i=(o.state)?o.state.name:null;q=(o.state)?o.state.code:null;n=(o.country)?o.country.name:null;k=(o.country)?o.country.code:null;j=(o.zip)?o.zip.name:null;if(l!==null){p=l;if(s.indexOf("hk")!==-1||s.indexOf("tw")!==-1){if(typeof(n)!=="undefined"&&n){m.push(n)}if(typeof(i)!=="undefined"&&i&&p!==i){m.push(i)}m.push(p)}else{m.push(p);if(s.indexOf("it")!==-1||s.indexOf("au")!==-1||s.indexOf("br")!==-1||s.indexOf("mx")!==-1||s.indexOf("ca")!==-1||s.indexOf("us")!==-1){if(typeof(q)!=="undefined"&&q){m.push(q)}else{if(typeof(i)!=="undefined"&&i&&p!==i){m.push(i)}}}else{if(typeof(i)!=="undefined"&&i&&p!==i){m.push(i)}else{if(typeof(q)!=="undefined"&&q){m.push(q)}}}if(s.indexOf("us")!==-1&&typeof(k)!=="undefined"&&k){m.push(k)}else{if(typeof(n)!=="undefined"&&n){m.push(n)}}}p=m.join(", ");return p}return null};this.suggestSuccess=function(i,l,k){var o,m,j,n=b.LW.PlaceSuggest.suggestMakeLocArray(i.r,l);g.gossipResults[l]=n;m=g.gossipResults[l];o=g.savedLocationList(l);if(o.length!==0){j=g.mergeLocations(o,m)}else{j=m}g.favSuggLoc=j;return k.callback.call(k.instance,j,f)};this.mergeLocations=function(l,u){var q=[],m=[],t=false,p=0,o=0,n=0,s=(l)?l.length:0,r=(u)?u.length:0;q=l;for(o;o<r;o=o+1){for(p;p<s;p=p+1){if(u[o].woe!==l[p].town.woe){t=true}}if(t){m[n]=u[o];n=n+1;t=false}p=0}return(q.concat(m))};this.suggestFailure=function(j,i){d.code="LW_AUTOSUGGEST_FAILURE";if(j){return i.callback.call(i.instance,j,d)}};this.suggestTimeout=function(j,i){e.code="LW_AUTOSUGGEST_TIMEOUT";return i.callback.call(i.instance,j,e)};this.geocode=function(j,i){if(j.length>0){g.flLoc=[];b.LW.PlaceFinder.geocodeAddress(j,this.geocoderSuccess,this.geocoderFailure,this.geocoderTimeout,i)}else{this.suggest(j)}};this.geocoderSuccess=function(l,o){var k=[],n=0,m=0,p,r,q=b.LW.PlaceFinder.geocodeMakeLocArray(l.query.count,l);p=q.length;for(n;n<p;n=n+1){r=q[n];if(r.city&&r.city!==null){k[m]=r;m=m+1}}g.flLoc=k;return o.callback.call(o.instance,k,f)};this.geocoderFailure=function(j,i){d.code="LW_GEOCODER_FAILURE";return i.callback.call(i.instance,j,d)};this.geocoderTimeout=function(j,i){e.code="LW_GEOCODER_TIMEOUT";return i.callback.call(i.instance,j,e)};this.addFavorite=function(j,i){b.LW.YQL.setLocation(j,g.addFavoriteSuccess,g.addFavoriteFailure,g.addFavoriteTimeout,i)};this.addFavoriteSuccess=function(i,j){return j.callback.call(j.instance,i,f,j)};this.addFavoriteFailure=function(j,i){d.code="LW_SET_ERROR";return i.callback.call(i.instance,j,d,i)};this.addFavoriteTimeout=function(j,i){e.code="LW_SET_ERROR";return i.callback.call(i.instance,j,e,i)};this.getAllFavorite=function(i){if(typeof(g.cacheFavLoc)!=="undefined"&&g.cacheFavLoc.length){return i.callback.call(i.instance,g.cacheFavLoc,f,i)}b.LW.YQL.getAllLocations(g.getFavoriteSuccess,g.getFavoriteFailure,g.getFavoriteTimeout,i)};this.getFavoriteSuccess=function(p,n){var k=[],o,q,m=0,l=0;o=(p)?p.length:0;for(m;m<o;m=m+1){q=p[m];q.addr=g.getAddressStr(q);if(q.addr!==null){k[l]=q;l=l+1}}g.invalidateCache();g.cacheFavLoc=k;return n.callback.call(n.instance,k,f,n)};this.getFavoriteFailure=function(j,i){d.code="LW_GET_ERROR";return i.callback.call(i.instance,j,d,i)};this.getFavoriteTimeout=function(j,i){e.code="LW_GET_TIMEOUT";return i.callback.call(i.instance,j,e,i)};this.removeLocation=function(j,i){b.LW.YQL.deleteLocation(j,this.removeSuccess,this.removeFailure,this.removeTimeout,i)};this.updateFavCache=function(l){var k=0,j=g.cacheFavLoc.length;for(k;k<j;k=k+1){if(g.cacheFavLoc[k]&&g.cacheFavLoc[k].id===l){g.cacheFavLoc.splice(k,1)}}};this.removeSuccess=function(j,i){g.updateFavCache(i.locId);return i.callback.call(i.instance,j,f,i)};this.removeFailure=function(j,i){d.code="LW_REMOVE_ERROR";return i.callback.call(i.instance,j,d,i)};this.removeTimeout=function(j,i){e.code="LW_REMOVE_ERROR";return i.callback.call(i.instance,j,e,i)}}b.namespace("LW");b.LW.Core=a},"@VERSION@",{requires:["node","event","lw-geo","lw-autosuggest","lw-placefinder-YQL","lw-yql"]});var YUI;YUI.add("lw-view",function(c){function b(){this.yrbContainer=null;this.pendingYrbCall=false;this.locale="en-US";this.setLocale=function(d){this.locale=d};this.yrbReqSuccessFailure=function(d,e){return};this.setYrbContainer=function(d,e){this.yrbContainer=d;e.msgContainer=this.yrbContainer;return};this.initYrb=function(h,g,i){if(this.yrbContainer){h.msgContainer=this.yrbContainer;return}this.yrbConfig={proto:h.proto,host:g||((h.proto==="https://")?"s.yimg.com":"l.yimg.com"),path:i||"/rl/ulw/yrb/4.0.0/",base:"ulwv2yrb"};var f=this.yrbConfig.proto+this.yrbConfig.host+this.yrbConfig.path+this.yrbConfig.base+"_"+h.locale+".js?callback={callback}",e={instance:this,context:h,locale:h.locale,defaultLocale:h.defaultLocale,msgContainer:h.msgContainer},d=new c.JSONPRequest(f,{on:{success:this.yrbReqSuccessFailure,failure:this.yrbReqSuccessFailure},args:[e]});d.send()};return this}function a(s){if(typeof(a.yala)==="undefined"){a.yala=new b()}if(typeof(this.core)==="undefined"){this.core=new c.LW.Core(s)}this.guid=YUI.guid("lw");this.id=this.guid+"_widget";this.minWidth=s.minWidth||250;this.defaultLocale="en-US";this.locale=s.locale||this.defaultLocale;this.node=s.parentNode;this.searchStartLen=2;this.state=null;this.positionXY=s.positionXY||null;this.zIndex=parseInt(s.zIndex,10)||1000;this.cssStyle=s.cssStyle||null;this.cssClass=s.cssClass||["lw-Arrow","lw-North","lw-NorthFarEast"];this.findLocation=s.findLocation||false;this.appID=s.app||null;this.callback=s.callback||null;this.errorCallback=s.errorCallback||null;this.lat=s.lat||null;this.lon=s.lon||null;this.rapid=null;this.isRapid=s.isRapid;this.isGlobalRapid=s.isGlobalRapid||false;this.globalRapidIns=s.globalRapidIns||null;this.rapidConf=s.rapidConf||null;this.rapidAddConf=s.rapidAddConf||null;this.rapidRemoveConf=s.rapidRemoveConf||null;this.proto=(window.location.protocol==="https:"||s.forceSSL)?"https://":"http://";this.viewOverlay=null;this.overlayContentBox=null;this.manageLocUrl="https://settings.yahoo.com/locations?lang={locale}";var r="open",i="error",f="closed",d="cleared",q="suggested",p="saved",k="queried",o="sqloc",j="detect",m="select",h="deleteloc",l="pin",e="point",u="place",t="new-",n="OK",g="ERROR";this.msgContainer={LW_AUTOSUGGEST_TIMEOUT:"Attempt to retrieve suggestions is taking too long",LW_AUTOSUGGEST_FAILURE:"Attempt to fetch suggestions is taking too long",LW_GEOCODER_FAILURE:"Unable to retrieve a match",LW_GEOCODER_TIMEOUT:"Attempt to retrieve a match is taking too long",LW_DETECT_BROWSER_SUPPORT:"Your browser does not support location detection",LW_DETECT_FAILURE:"Unable to detect your accurate location",LW_DETECT_TIMEOUT:"Attempt to detect your accurate location is taking too long",LW_SET_ERROR:"Unable to add favorite location",LW_REMOVE_ERROR:"Unable to remove favorite location",LW_GET_ERROR:"Unable to retrieve your past locations",LW_GET_TIMEOUT:"Attempt to fetch your past locations is taking too long",LW_OS_LOCATION_DETECT:"Detect my location",LW_OS_DISMISS_TXT:"Dismiss",LW_GHOST_CITY:"Enter City",LW_GHOST_CITY_ZIP:"Enter City or Zipcode",LW_TRIGGER_ICON_TOOLTIP:"Change location",LW_DETECT_LOC_TOOLTIP:"Detect your location",LW_ADD_FAV_TOOLTIP:"Add this location",LW_REMOVE_FAV_TOOLTIP:"Remove this location",LW_OS_MANAGE_LOCATIONS:"Manage Locations",LW_PRIVACY_POLICY:"Privacy Policy",LW_OS_MANAGE_LOCATIONS_URL:"http://location.yahoo.com/locationmgt/?locale=en-US",LW_CURRENT_LOCATION_HELP_URL:"http://help.yahoo.com/l/us/yahoo/location/",LW_PRIVACY_POLICY_URL:"http://info.yahoo.com/privacy/us/yahoo/location"};this.init=function(){if(this.appID&&this.appID!=="universal_location_widget__v3"){this.core.init(s);if(this.defaultLocale!==this.locale){a.yala.initYrb(this,s.yrbHost,s.yrbPath)}}else{return}};this.inputGhosting=function(){var v=c.one("#"+this.inputId),w=v.get("value"),x=c.one("#placeholder-"+this.inputId);x.setStyle("width",v.getComputedStyle("width"));x.setStyle("height",v.getComputedStyle("height"));if(w===""){x.show()}c.on(["focus","blur","keyup"],function(y){if(y.currentTarget.get("value")!==""&&x.getStyle("display")!=="none"){x.hide()}else{if(y.currentTarget.get("value")===""&&x.getStyle("display")==="none"){x.show()}}},v)};this.setPositionXY=function(v){this.positionXY=v};this.setZindex=function(v){this.zIndex=parseInt(v,10);if(this.viewOverlay!==null){this.viewOverlay.set("zIndex",this.zIndex)}};this.makeElementId=function(v){return this.id+"_"+v};this.show=function(){if(this.viewOverlay!==null){this.viewOverlay.show()}};this.hide=function(v){c.fire("lw-close",{target:v,widgetObj:this})};this.close=function(){if(this.viewOverlay!==null){this.viewOverlay.hide()}};this.hideError=function(v){if(c.one("#"+this.err_container_id)){c.one("#"+this.err_container_id).remove(true);this.err_container_id=null;this.err_close_id=null;this.err_msg_id=null}v.halt();return};this.showError=function(v){if(this.err_container_id&&c.one("#"+this.err_container_id)){c.one("#"+this.err_container_id).remove(true)}var w=this.buildErrorFrag(v);if(w){this.viewOverlay.get("contentBox").one(".lw-widget-bd").prepend(w);c.on("click",c.bind(this.hideError,this),"#"+this.err_close_id)}};this.initFocusManager=function(){this.overlayContentBox.plug(c.Plugin.NodeFocusManager,{descendants:"a",keys:{next:"down:40",previous:"down:38"},focusClass:{className:"lw-line-item-focus",fn:function(v){return v}},circular:false})};this.dispatchCallback=function(y){var A=null,x=y.target,v=x.getAttribute("data-lid"),w=x.getAttribute("class"),z=x.getAttribute("data-action");if(z){switch(z){case l:if(w&&(w.indexOf("lw-add-icon")!==-1||w.indexOf("lw-add-anchor")!==-1)){this.pin(v,x)}break;case m:this.select(v,x);break;case j:this.detect(v,x);break;case h:this.deleteloc(v,x);break;default:y.halt();return}if(c.UA.ie&&c.UA.ie===6){y.halt()}}};this.handleInputSubmit=function(w){var v=this.getInputValue(),x;if(this.findLocation){x={callback:this.suggestCallback,instance:this};this.core.geocode(v,x)}w.halt();return};this.handleInputEvents=function(x){var v=x.target,w=YUI().Lang.trim(v.get("value")),y;if(40===x.keyCode&&!c.UA.touchEnabled){this.overlayContentBox.focusManager.refresh();this.overlayContentBox.focusManager.set("activeDescendant",0);this.overlayContentBox.focusManager.focus();x.halt();return}if(13===x.keyCode||16===x.keyCode||17===x.keyCode||18===x.keyCode||37===x.keyCode||38===x.keyCode||39===x.keyCode||33===x.keyCode||34===x.keyCode){return}if(w&&w.length>=this.searchStartLen){y={callback:this.suggestCallback,instance:this};this.core.suggest(w,y)}else{if(w===""){this.core.invalidateCache();this.viewOverlay.set("bodyContent","");y={target:null,callback:this.getAllFavoriteCallback,instance:this};this.core.getAllFavorite(y)}}return};this.deleteloc=function(x,v){var w={locId:x,target:v,callback:this.deletelocCallback,instance:this};this.core.removeLocation(x,w)};this.select=function(x,v){var w=this.core.selectedLoc(x);if(w&&this.callback){this.callback(w);this.hide(v)}};this.pin=function(z,v){var y=this.core.selectedLoc(z),x,w;if(y){x={type:"favorite"};if(y.woe){x.woe=y.woe}if(y.addr){x.addrstring=y.addr}w={target:v,callback:this.pinCallback,instance:this};this.core.addFavorite(x,w)}};this.detect=function(x,v){var w={target:v,callback:this.detectCallback,instance:this};this.core.detect(w)};this.detectCallback=function(w,v){if(v.status===n){this.callback(w[0]);this.hide(c.one("#"+this.detectGeoId));this.state=d}else{this.showError(v.code);if(this.errorCallback){this.errorCallback(w)}}};this.suggestCallback=function(w,v){if(v.status===n){var y="",x="",z="";x=this.buildLocationBody(w);this.lwBodyId=this.makeElementId("lwBody");z=c.substitute(this.LW_LOCS_CONTAINER_TEMPLATE,{lwBodyId:this.lwBodyId,topLocs:y+x});this.viewOverlay.set("bodyContent",z);this.state=q}else{if(this.errorCallback){this.errorCallback(w)}}};this.deletelocCallback=function(w,v,B){if(v.status===n){var A=B.target,z,x=A.getAttribute("class"),y;if(x){if(x.indexOf("lw-remove-icon")!==-1){z=A.get("parentNode").get("parentNode")}else{if(x.indexOf("lw-remove-anchor")!==-1){z=A.get("parentNode")}}if(A.getAttribute("data-ltype")===p){z.transition({duration:3,easing:"ease-out",height:{value:0,duration:1,easing:"ease-in"}},function(){var C;this.remove(true);if(c.UA.ie&&c.UA.ie===6){C=c.one(".lw-ie-scroll-start");if(C&&C.all("li").size()<=3){C.removeClass("lw-ie-scroll-start");C.removeClass("sq-locations-container");c.later(10,this,function(){C.addClass("sq-locations-container")})}}})}else{if(x.indexOf("lw-remove-icon")!==-1){A.setContent("&#xe061;");y=A.get("parentNode").siblings("a").getAttribute("data-lid");A.setAttribute("data-lid",y);A.setAttribute("data-action",l);A.removeClass("lw-remove-icon");A.addClass("lw-add-icon");A.get("parentNode").setAttribute("data-lid",y);A.get("parentNode").setAttribute("data-action",l);A.get("parentNode").setAttribute("title",this.msgContainer.LW_ADD_FAV_TOOLTIP);A.get("parentNode").removeClass("lw-remove-anchor");A.get("parentNode").addClass("lw-add-anchor");A.get("parentNode").siblings("a").removeClass("lw-loc-saved");A.get("parentNode").siblings("a").addClass("lw-loc-queried")}else{if(x.indexOf("lw-remove-anchor")!==-1){A.one("i").removeClass("lw-remove-icon");A.one("i").addClass("lw-add-icon");A.one("i").setContent("&#xe061;");y=A.get("parentNode").one("a").getAttribute("data-lid");A.one("i").setAttribute("data-lid",y);A.one("i").setAttribute("data-action",l);A.removeClass("lw-remove-anchor");A.addClass("lw-add-anchor");A.setAttribute("data-lid",y);A.setAttribute("data-action",l);A.setAttribute("title",this.msgContainer.LW_ADD_FAV_TOOLTIP);A.get("parentNode").one("a").removeClass("lw-loc-saved");A.get("parentNode").one("a").addClass("lw-loc-queried")}}}}this.state=d}else{this.showError(v.code);if(this.errorCallback){this.errorCallback(w)}}};this.pinCallback=function(w,v,A){if(v.status===n){var z=A.target,x=z.getAttribute("class"),y=w.query.results.locdrop.Result;if(x){if(x.indexOf("lw-add-icon")!==-1){z.setContent("&#xe023;");z.setAttribute("data-lid",y);z.setAttribute("data-action",h);z.removeClass("lw-add-icon");z.addClass("lw-remove-icon");z.get("parentNode").setAttribute("data-lid",y);z.get("parentNode").setAttribute("data-action",h);z.get("parentNode").setAttribute("title",this.msgContainer.LW_REMOVE_FAV_TOOLTIP);z.get("parentNode").removeClass("lw-add-anchor");z.get("parentNode").addClass("lw-remove-anchor");z.get("parentNode").siblings("a").removeClass("lw-loc-queried");z.get("parentNode").siblings("a").addClass("lw-loc-saved")}else{if(x.indexOf("lw-add-anchor")!==-1){z.one("i").removeClass("lw-add-icon");z.one("i").addClass("lw-remove-icon");z.one("i").setContent("&#xe023;");z.one("i").setAttribute("data-lid",y);z.one("i").setAttribute("data-action",h);z.removeClass("lw-add-anchor");z.addClass("lw-remove-anchor");z.setAttribute("data-lid",y);z.setAttribute("data-action",h);z.setAttribute("title",this.msgContainer.LW_REMOVE_FAV_TOOLTIP);z.get("parentNode").one("a").removeClass("lw-loc-queried");z.get("parentNode").one("a").addClass("lw-loc-saved")}}}this.state=d}else{this.showError(v.code);if(this.errorCallback){this.errorCallback(w)}}};this.getAllFavoriteCallback=function(w,v){if(v.status===n){var y="",x="",z="";x=this.buildLocationBody(w);this.lwBodyId=this.makeElementId("lwBody");z=c.substitute(this.LW_LOCS_CONTAINER_TEMPLATE,{lwBodyId:this.lwBodyId,topLocs:y+x});this.viewOverlay.set("bodyContent",z);this.state=r}else{this.showError(v.code);if(this.errorCallback){this.errorCallback(w)}this.state=i}};this.getInputValue=function(){if(this.inputId){var w=c.one("#"+this.inputId),v=w.get("value");return YUI().Lang.trim(v)}return""};this.geocode=function(){var w,v=this.getInputValue();this.controller.geocode({inputString:v,target:w})};this.handleDocumentKeyup=function(v){if(27===v.keyCode){this.hide(v.target);v.halt();return}};this.open=function(z){var B,x,C,y,D="",w,A,v;if(this.defaultLocale!==this.locale&&!this.yrbContainer){x=this.locale.split("-").join("_");if(window["ulwv2yrb_"+x]){a.yala.setYrbContainer(window["ulwv2yrb_"+x],this)}}if(!this.viewOverlay){this.inputId=this.makeElementId("input");C="#"+this.inputId;this.lwHeaderId=this.makeElementId("lwHeader");this.lwInputFormId=this.makeElementId("lwInputForm");y=this.populateDetectBlock();y+=c.substitute(this.LW_OPEN_STATE_HEAD_TEMPLATE,{lwHeaderId:this.lwHeaderId,inputId:this.inputId,lwInputForm:this.lwInputFormId,ghostTxt:this.msgContainer.LW_GHOST_CITY_ZIP});A=c.substitute(this.manageLocUrl,{locale:this.locale});w=c.substitute(this.LW_MANAGE_LOC_TEMPLATE,{lwFooterId:this.lwFooterId,manageLocUrl:A,manageLocTxt:this.msgContainer.LW_OS_MANAGE_LOCATIONS});this.viewOverlay=new c.LW.Overlay({parentNode:this.node,headerContent:y,bodyContent:D,footerContent:w,width:this.minWidth,zIndex:this.zIndex,cssClass:this.cssClass,cssStyle:this.cssStyle,xy:(this.positionXY)?[this.positionXY[0],this.positionXY[1]]:null,render:true,visible:true});this.overlayContentBox=this.viewOverlay.get("contentBox").one(".lw-widget-bd");if(c.UA.touchEnabled){c.Event.defineOutside("touchstart");this.viewOverlay.get("contentBox").on("touchstartoutside",function(E){this.hide(E.target)},this);this.overlayContentBox.delegate("tap",this.dispatchCallback,"li a",this)}else{this.viewOverlay.get("contentBox").on("clickoutside",function(E){this.hide(E.target)},this);this.overlayContentBox.delegate("click",this.dispatchCallback,"li a",this);this.initFocusManager()}c.all(".lw-location-detect").on("click",this.dispatchCallback,this);c.on("keyup",c.bind(this.handleInputEvents,this),C);c.one("#"+this.lwInputFormId).on("submit",this.handleInputSubmit,this);B={target:null,callback:this.getAllFavoriteCallback,instance:this};this.core.getAllFavorite(B);if(this.isRapid&&this.rapidConf!==null){this.rapid=new YAHOO.i13n.Rapid(this.rapidConf);this.rapid.init()}if(c.UA.ie&&c.UA.ie<=10){this.inputGhosting()}this.state=r}else{if(this.state&&(this.state===q)){this.show();if(c.UA.ie&&c.UA.ie<10){v=c.one("#"+this.inputId).get("value");c.one("#"+this.inputId).focus();c.one("#"+this.inputId).set("value",v)}}else{this.core.invalidateCache();this.viewOverlay.set("bodyContent","");B={target:null,callback:this.getAllFavoriteCallback,instance:this};this.core.getAllFavorite(B);this.show();this.state=r;c.one("#"+this.inputId).set("value","")}}c.one("#"+this.inputId).focus()};this.buildErrorFrag=function(v){var w;this.err_container_id=this.guid+"_err_container";this.err_close_id=this.guid+"_err_close";this.err_msg_id=this.guid+"_err_msg";w={lType:i,errContId:this.err_container_id,errCloseId:this.err_close_id,errMsgId:this.err_msg_id,errMsg:this.msgContainer[v],dismissTxt:this.msgContainer.LW_OS_DISMISS_TXT};return c.substitute(this.LW_LOC_ERR_TEMPLATE,w)};this.buildLocationFrag=function(E,C){var z=C.addr||"",I=C.addrstring||C.addr||"",y=C.id,x=h,F="",G="",D=p,w="loc-fav",A=(c.UA.touchEnabled)?"lw-line-item-touch":"lw-line-item",B="lw-loc-saved",v,H;if(y.indexOf(t)===-1){v={locId:y,lType:D,dAction:x,rmLocTooltip:this.msgContainer.LW_REMOVE_FAV_TOOLTIP,deleteTxt:this.msgContainer.LW_OS_DELETE_TXT};G=c.substitute(this.LW_SAVED_LOC_DEL_TEMPLATE,v);w="loc-fav"}else{w="loc-srch";x=l;B="lw-loc-queried";D=k;v={locId:y,lType:D,dAction:x,addLocTooltip:this.msgContainer.LW_ADD_FAV_TOOLTIP};G=c.substitute(this.LW_QUERIED_LOC_ADD_TEMPLATE,v)}H={sqSlk:w,sqLocCls:B,locItemCls:A,locId:y,displayTtl:z,lType:o,dAction:m,displayStr:z,delLoc:G};return c.substitute(this.LW_SQ_LOC_TEMPLATE,H)};this.populateDetectBlock=function(){this.detectGeoId=this.guid+"_detect_geo";var v={displayStr:this.msgContainer.LW_OS_LOCATION_DETECT,dtctTooltip:this.msgContainer.LW_DETECT_LOC_TOOLTIP,detectId:this.detectGeoId,lType:j,dAction:j};return c.substitute(this.LW_DETECT_LOC_TEMPLATE,v)};this.buildLocationBody=function(y){var z="",v,w=0,x="";v=y.length||0;for(w;w<v;w=w+1){z+=this.buildLocationFrag(o,y[w])}if(c.UA.ie&&c.UA.ie===6&&v>3){x=" lw-ie-scroll-start"}this.lwSQLocBlockId=this.makeElementId("SQLocBlockId");return c.substitute(this.LW_SQLOCS_CON_TEMPLATE,{sqLocs:z,lwSQLocBlockId:this.lwSQLocBlockId,customClass:x})};this.destroy=function(){this.close()};this.LW_OPEN_STATE_HEAD_TEMPLATE='<div class="lw-input-blk"><form class="lw-input-frm" id="{lwInputForm}"><b class="lw-input-icn">&#xe01b;</b><div class="lw-input-wrap" id="{lwHeaderId}">';if(c.UA.ie&&c.UA.ie<=10){this.LW_OPEN_STATE_HEAD_TEMPLATE+='<input type="text" autocomplete="off" placeholder="" value="" class="lw-input-box" tabindex="0" id="{inputId}"/><label for="{inputId}" id="placeholder-{inputId}" class="lw-input-placeholder" style="display:none;" unselectable="on" onselectstart="return false;" onmousedown="return false;">{ghostTxt}</label>'}else{this.LW_OPEN_STATE_HEAD_TEMPLATE+='<input type="text" autocomplete="off" placeholder="{ghostTxt}" value="" class="lw-input-box" tabindex="0" id="{inputId}"/>'}this.LW_OPEN_STATE_HEAD_TEMPLATE+="</div></form></div>";if(c.UA.ie&&c.UA.ie===6){this.LW_LOCS_CONTAINER_TEMPLATE='<div id="{lwBodyId}" class="locations-container" style="height:1%">{topLocs}</div>'}else{this.LW_LOCS_CONTAINER_TEMPLATE='<div id="{lwBodyId}" class="locations-container">{topLocs}</div>'}this.LW_SQLOCS_CON_TEMPLATE='<ul id="{lwSQLocBlockId}" class="sq-locations-container{customClass}">{sqLocs}</ul>';this.LW_DETECT_LOC_TEMPLATE='<div class="lw-detect-blk"><a class="lw-location-detect lw-detect-lnk rapid-nonanchor-lt rapidnofollow" id="{detectId}" data-lid="{detectId}" data-ltype="{lType}" data-action="{dAction}" data-action-outcome="dtctloc" data-ylk="elm:itm;slk:dtct;itc:1;" href="javascript:;" title="{dtctTooltip}">{displayStr}</a><button class="lw-location-detect lw-detect-btn rapidnofollow" data-action="{dAction}" data-lid="{detectId}" title="{dtctTooltip}"><i class="lw-location-detect lw-detect-icn lw-Icon" data-action="{dAction}" data-lid="{detectId}">&#xe06f;</i></button></div>';this.LW_SQ_LOC_TEMPLATE='<li class="{locItemCls}" data-lid="{locId}" data-ltype="{lType}" data-action="{dAction}"><a data-lid="{locId}" data-ltype="{lType}" title="{displayTtl}" data-action="{dAction}" href="javascript:;" data-action-outcome="slctloc" data-ylk="elm:itm;slk:{sqSlk};itc:1;" class="rapid-nonanchor-lt rapidnofollow {sqLocCls}">{displayStr}</a>{delLoc}</li>';this.LW_SAVED_LOC_DEL_TEMPLATE='<a data-lid="{locId}" data-ltype="{lType}" data-action="{dAction}" href="javascript:;" title="{rmLocTooltip}" data-action-outcome="rmloc" data-ylk="elm:btn;slk:rm;itc:1;" class="rapid-nonanchor-lt rapidnofollow lw-remove-anchor"><i data-ltype="{lType}" data-lid="{locId}" data-action="{dAction}" class="lw-remove-icon">&#xe023;</i></a>';this.LW_QUERIED_LOC_ADD_TEMPLATE='<a data-lid="{locId}" data-ltype="{lType}" data-action="{dAction}" href="javascript:;" title="{addLocTooltip}" data-action-outcome="slctloc" data-ylk="elm:btn;slk:loc-sug;itc:1;" class="rapid-nonanchor-lt rapidnofollow lw-add-anchor"><i data-ltype="{lType}" data-action="{dAction}" data-lid="{locId}" class="lw-add-icon">&#xe061;</i></a>';this.LW_LOC_ERR_TEMPLATE='<div id="{errContId}" class="lw-err-blk" data-lid="" data-ltype="{lType}" title="{errMsg}"><span class="rapid-nonanchor-lt rapidnofollow lw-err-msg">{errMsg}</span><a href="javascript:;" id="{errCloseId}" data-action-outcome="rmerr" data-ylk="elm:btn;slk:rm-err;itc:1;" title="{dismissTxt}" class="rapid-nonanchor-lt rapidnofollow lw-err-close-blk"><i class="lw-err-close-icn">&#xe009;</i></a></div>';this.LW_MANAGE_LOC_TEMPLATE='<div style="*height:1%" class="lw-manageloc-blk"><a id="{id}" target="_blank" data-action-outcome="nav" data-action="click" data-ylk="elm:itm;slk:mng;itc:0;" href="{manageLocUrl}" class="lw-manageloc-lnk">{manageLocTxt}</a></div>';return this}c.namespace("LW");c.LW.View=a},"@VERSION@",{requires:["node","event","event-tap","substitute","node-focusmanager","transition","lw-overlay","lw-core"]});