function SetBackgroundColor(n,t){n.css("backgroundColor",t)}function displayMap(){var n,t;$(window).unload(function(){GUnload()}),n=$("#map"),n.fadeIn(),_map||(loadMap(n[0]),$(document).click(function(){n.stop(!0,!0)})),t=unescape(getQueryStringItem("Name")),$("#name").html(t),showAddress(unescape(getQueryStringItem("Address")),t)}function getQueryStringItem(n,t){var r="[?&]{1}"+n+"=([^&]*)",u=new RegExp(r),i;return t||(t=document.location.href),i=u.exec(t),i?i[1]:void 0}function loadMap(n){var u,t,r,i;return GBrowserIsCompatible()&&(u={googleBarOptions:{style:"new",adsOptions:{client:"partner-pub-8841763953686185",channel:"2216121518",adsafe:"high",language:"en"}}},_map=new GMap2(n,u),t=_map.getDefaultUI(),t.controls.maptypecontrol=!1,_map.setUI(t),_map.enableGoogleBar(),r="ca-pub-8841763953686185",i={maxAdsOnMap:2,style:"adunit",channel:"6837256063"},adsManager=new GAdsManager(_map,r,i),adsManager.enable()),null}function showAddress(n,t){if(!_map)return;_map.clearOverlays(),_geocoder||(_geocoder=new GClientGeocoder),_geocoder&&_geocoder.getLatLng(n+" nz",function(n){if(n){_map.setCenter(n,13);var i=new GMarker(n);_map.addOverlay(i),t&&(GEvent.addListener(i,"click",function(){i.openInfoWindowHtml(t)}),i.openInfoWindowHtml(t))}})}var _highlightColor="#eaeaea",_blankColor="#ffffff",_map,_geocoder;google.load("jquery","1.7.1"),google.setOnLoadCallback(function(){$(document).ready(function(){$("#lblBusinessType").length>0?($("tr.highlight").hover(function(){var n=$(this);SetBackgroundColor(n,_highlightColor),SetBackgroundColor(n.next(".description"),_highlightColor)},function(){var n=$(this);SetBackgroundColor(n,_blankColor),SetBackgroundColor(n.next(".description"),_blankColor)}),$("tr.description").hover(function(){var n=$(this);SetBackgroundColor(n,_highlightColor),SetBackgroundColor(n.prev(".highlight"),_highlightColor)},function(){var n=$(this);SetBackgroundColor(n,_blankColor),SetBackgroundColor(n.prev(".highlight"),_blankColor)}),$("img.map").click(function(){var n=$(this);window.open("/Map.aspx?Name="+escape(n.parents("tr").find("a").html())+"&Address="+escape(n.attr("alt")),"Map")}),$.getScript("/include/fg.menu.min.js",function(){$("head").append($('<link type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/redmond/jquery-ui.css" media="screen" rel="stylesheet" />')),$("head").append($('<link type="text/css" href="/include/fg.menu.min.css" media="screen" rel="stylesheet" />')),$("#flat").menu({content:$("#flat").next().html(),showSpeed:200})})):$("#map").length>0&&google.load("maps","2",{callback:displayMap})})});
