"use strict";if(typeof window.PB==="undefined"||!PB){window.PB={};}PB.Geocode=function(c,a,b){this.lat=$(c);this.lng=$(a);this.btn=$(b);this.onChange=new YAHOO.util.CustomEvent("change");
if(this.btn){Event.addListener(this.btn,"click",this.open,this,true);}};PB.Geocode.prototype={setValue:function(b,a){if(isNaN(b)||isNaN(a)||b===null||a===null){this.lat.value="";
this.lng.value="";}else{this.lat.value=b.toString();this.lng.value=a.toString();}},destroy:function(){if(this.btn){Event.removeListener(this.btn,"click",this.open);
}this.onChange.unsubscribeAll();delete this.onChange;delete this.btn;delete this.lng;delete this.lat;},open:function(){var e,b={},d=parseFloat(this.lat.value),a=parseFloat(this.lng.value);
function f(){e.close();}function c(h,g){this.setValue(h,g);this.onChange.fire(h,g);window.setTimeout(f,10);}if(!(isNaN(d)||isNaN(a))){b.lat=d;b.lng=a;b.marker=true;
}e=["menubar=no","location=no","resizable=yes","scrollbars=no","status=no","width=650","height=550"].join(",");e=window.open("/Window-Geocode.asp","geocode",e);e.CONFIG=Lang.merge(b,{scope:this,onMarker:this.setValue,onClear:this.setValue,onAccept:c});
return e;},search:function(b){var c=["menubar=no","location=no","resizable=yes","scrollbars=no","status=no","width=650","height=550"].join(",");function d(){c.close();
}function a(f,e){this.setValue(f,e);this.onChange.fire(f,e);window.setTimeout(d,10);}c=window.open("/Window-Geocode.asp","geocode",c);c.CONFIG={scope:this,marker:false,search:b,onMarker:this.setValue,onClear:this.setValue,onAccept:a};
return c;},staticURL:function(a,i,h,c){var b,k,j,d,f=parseFloat(this.lat.value),g=parseFloat(this.lng.value),e={zoom:12,marker:"blue"};if(c){e=Lang.merge(e,c);}if(isNaN(f)||isNaN(g)||!h||h.length===0){return null;
}if(a>640){a=640;}if(i>640){i=640;}b=encodeURIComponent(f)+","+encodeURIComponent(g);k=encodeURIComponent(a)+"x"+encodeURIComponent(i);j=encodeURIComponent(e.zoom);
d=b+","+encodeURIComponent(e.marker);if(e.letter){d+=encodeURIComponent(e.letter);}return"http://maps.google.com/staticmap?center="+b+"&sensor=false&zoom="+j+"&size="+k+"&markers="+d+"&key="+encodeURIComponent(h);
}};YAHOO.register("Geocode",PB.Geocode,{version:"0.4",build:"10"});if(window.log){window.log("Loaded geocoding utility");}