(function(){new YAHOO.util.YUILoader({require:["json","cookie"],base:"/js/yui/2.7.0/build/",loadOptional:false,allowRollup:true,onSuccess:function(){YAHOO.util.Get.script("/js/googlemapjs.ashx",{onSuccess:function(){YAHOO.util.Get.script("http://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22maps%22%2C%22version%22%3A%222%22%2C%22callback%22%3A%22GSPK.Geocode.LoadGoogleMapsAPI%22%7D%5D%7D&key="+GSPK.GoogleMap.GetKeyForLocation())}})}}).insert()})();if(!window.GSPK){window.GSPK={}}if(!window.GSPK["Geocode"]){window.GSPK["Geocode"]={};GSPK.Geocode.Cache=null;GSPK.Geocode.ClientGeocoder=null;GSPK.Geocode.GeocodeAddress=function(a,d){if(!GSPK.Geocode.Cache){GSPK.Geocode.Cache=YAHOO.util.Cookie.getSubs("geocodeCache")}if((GSPK.Geocode.Cache)&&(GSPK.Geocode.Cache[a])){var c=GSPK.Geocode.Cache[a];if(typeof c=="undefined"){return null}else{if(typeof c=="string"){if(YAHOO.lang.JSON.isValid(c)){return d(YAHOO.lang.JSON.parse(GSPK.Geocode.Cache[a]))}else{return null}}else{if(typeof c=="object"){return d(GSPK.Geocode.Cache[a])}else{return null}}}}else{if(!GSPK.Geocode.ClientGeocoder){try{GSPK.Geocode.ClientGeocoder=new GClientGeocoder();GSPK.Geocode.GoogleGeocodeAddress(a,d)}catch(b){GSPK.Geocode.ClientGeocoder=null}GSPK.Geocode.CallbackArgs={address:a,callback:d};GSPK.Geocode.LoadGoogleMapsAPI()}else{GSPK.Geocode.GoogleGeocodeAddress(a,d)}}};GSPK.Geocode.GoogleGeocodeAddress=function(a,b){GSPK.Geocode.ClientGeocoder.getLatLng(a,function(c){if(!c){b(null)}else{var d={accuracy:5,lat:c.lat(),lng:c.lng(),search:a};if(!GSPK.Geocode.Cache){GSPK.Geocode.Cache={}}GSPK.Geocode.Cache[a]=d;try{var f=YAHOO.lang.JSON.stringify(d)}catch(e){alert(e)}YAHOO.util.Cookie.setSub("geocodeCache",a,f,{expires:new Date("December 31, 2025"),path:"/"});b(d)}})};GSPK.Geocode.GoogleGeocodeAddressMulti=function(a,b){GSPK.Geocode.ClientGeocoder.reset();GSPK.Geocode.ClientGeocoder.getLocations(a,function(c){if(!c){b(null)}else{b(c)}})};GSPK.Geocode.LoadGoogleMapsAPI=function(){GSPK.Geocode.ClientGeocoder=new google.maps.ClientGeocoder();if(GSPK.Geocode.CallbackArgs){GSPK.Geocode.GeocodeAddress(GSPK.Geocode.CallbackArgs.address,GSPK.Geocode.CallbackArgs.callback)}}};