var g_currId=1,g_currentTop10DisplayedDivId,g_allEventPushpinDetail,g_currentSelectedMovie,g_currentSelectedMovieTab=1,g_ajaxLoadComplete=false,g_mapLoadComplete=false,g_currentPushPinDisplayed,g_homepage_venueCount,g_homepage_top10_eventvenue,g_homepage_top10_events;function changeUIDisplayList(a,b){$(a).style.display="block";$(b).style.display="none"}function ajaxComplete_showMapControl(){g_ajaxLoadComplete=true;showMapControl()}function mapControlLoadComplete_showMapControl(){g_mapLoadComplete=true;showMapControl()}function showMapControl(){if(g_ajaxLoadComplete&&g_mapLoadComplete&&!nocookiescenario){$("loadingTrafficLink").style.display="none";$("trafficLink").style.display="block";$("homepage_map_container").style.height="327px";$("map_wrapper").style.visibility="visible"}}function changeMovieUIDisplayList(a,b){changeUIDisplayList(a,b);if("homepage_top10_movie1"==a)g_currentSelectedMovieTab="1";else g_currentSelectedMovieTab="2";SelectMovieTab()}function SelectMovieTab(){if("1"==g_currentSelectedMovieTab)$("currmovie1").onclick();else $("currmovie6").onclick()}function changeSortOrder(j,k,l,m,f,i,h,g){var b="none",c=$(j),d=$(k),e=$(l),a=$(m);if(c)c.style.display="block";if(d)d.style.display=b;if(e)e.style.display=b;if(a)a.style.display=b;a=$(h);if(a)a.style.fontWeight="bold";a=$(g);if(a)a.style.fontWeight="";ShowTop10UIPushpins(f,i)}function ShowTop10UI(b){HideTop10UI();var a=$(b);if(a)a.style.display="block";g_currentTop10DisplayedDivId=b}function HideTop10UI(){var b="none",a=$("EventsTop10");if(a)a.style.display=b;a=$("MoviesTop10");if(a)a.style.display=b;a=$("RestaurantsTop10");if(a)a.style.display=b;a=$("BarsGrillsPubsTop10");if(a)a.style.display=b;a=$("OutdoorsTop10");if(a)a.style.display=b}function ShowDefaultPushpin(a){ShowTop10UI(a);switch(a){case "EventsTop10":ShowAllEventPushPin();break;case "MoviesTop10":changeMovieUIDisplayList("homepage_top10_movie1","homepage_top10_movie2");break;default:return false}}function ShowMoviePushPinOnMap(c,g,f){CityGuidesMap.ClearAllPins();if(CityGuidesMap.GetMapObject()&&c!=undefined&&c!=null){var d=[];try{d=c.split("###");for(var e=0;e<d.length-1;e++){var a=[];a=d[e].split("^^");var b=a[7];if(b==undefined||b==null)b="";CityGuidesMap.AddPushpin(new CGHomePageTop10MoviePushpin(a[2],a[3],a[0],a[4],a[5],CGUtilityGetIcon(""),g,b,f,a[1],"","","",""))}CityGuidesMap.Load();CityGuidesMap.SetMapView()}catch(h){}}}function ShowMoviePushPinOnMapOnClick(f,h,g,a){var e="currmovie",b=null;if(a!=undefined&&a!=b&&a!=""&&a!=g_currentSelectedMovie){ShowMoviePushPinOnMap(f,h,g);if(g_currentSelectedMovie!=undefined&&g_currentSelectedMovie!=b&&g_currentSelectedMovie!=""){var d=document.getElementById(e+g_currentSelectedMovie);if(d!=undefined&&d!=b)d.className="text_list2 img"}var c=document.getElementById(e+a);if(c!=undefined&&c!=b){c.className="top10movieselect";g_currentSelectedMovie=a}}}function ShowAllEventPushPin(){CityGuidesMap.ClearAllPins();if(g_homepage_top10_eventvenue!=null&&g_homepage_venueCount!=null&&g_homepage_venueCount>4)try{for(var a=0;a<g_homepage_venueCount;a++){var b="eventvenue_"+g_homepage_top10_eventvenue[a][10]+g_homepage_top10_eventvenue[a][9];CityGuidesMap.AddPushpin(new CGHomePageTop10EventPushpin(g_homepage_top10_eventvenue[a][6],g_homepage_top10_eventvenue[a][7],g_homepage_top10_eventvenue[a][0],g_homepage_top10_eventvenue[a][14],g_homepage_top10_eventvenue[a][15],g_homepage_top10_eventvenue[a][2],g_homepage_top10_eventvenue[a][8],CGUtilityGetIcon(""),g_homepage_top10_eventvenue[a][11],g_homepage_top10_eventvenue[a][13],g_homepage_top10_eventvenue[a][12],g_homepage_top10_eventvenue[a][1],b,"","",""))}CityGuidesMap.Load();CityGuidesMap.SetMapView()}catch(c){}}function ShowEventPushPin(b){if(CityGuidesMap.GetMapObject()&&b!=null)try{var a=g_homepage_top10_eventvenue[b-1];CityGuidesMap.ClearAllPins();if(a!=null){var c="eventvenue_"+a[10]+a[9];CityGuidesMap.AddPushpin(new CGHomePageTop10EventPushpin(a[6],a[7],a[0],a[14],a[15],a[2],a[8],CGUtilityGetIcon(""),a[11],a[13],a[12],a[1],c,"","",""))}CityGuidesMap.Load();CityGuidesMap.SetMapView()}catch(d){}}function CreateArray(b,d){var c=new Array(b);for(var a=0;a<b;a++)c[a]=new Array(d);return c}function ShowAllRestaurantsPushpins(){ShowTop10UI("RestaurantsTop10");changeSortOrder("Restaurants_cumulative1","Restaurants_cumulative2","Restaurants_popular1","Restaurants_popular2","Restaurants","cumulative","RestaurantsTop10cumulative","RestaurantsTop10popular")}function ShowAllPushpins(b,a){ShowTop10UI(b);changeSortOrder(a+"_cumulative1",a+"_cumulative2",a+"_popular1",a+"_popular2",a,"cumulative",a+"Top10cumulative",a+"Top10popular")}function ShowTop10UIPushpins(c,f){var u="text_list2",t="PhoneNumber",s="UserRatingUrl",r="MsnCgWriteReviewPage",q="MsnCgPhotoUploadPage",p="MsnCgImagePath",z="MsnCgBdp",e=null,y="ListItem",x="arrayIndex",d="Top10";if(g_mapLoadComplete)try{CityGuidesMap.ClearAllPins();var w=d+f+c+"ListItem1",A=$(w);if(A){g_currentPushPinDisplayed=w;A.setAttribute(x,0)}for(var a=1;a<=10;a++){var E=d+f+c+y,B=$(E+a.toString());if(B)B.setAttribute(x,a)}var m,o,h,i,k,l,G,H,j,g,v,n=e,b=d+c+"ListInfo";if($(b+z))v=$(b+z).innerText;if($(b+p))n=$(b+p).innerText;if($(b+q))l=$(b+q).innerText;if($(b+r))k=$(b+r).innerText;var C=d+f+c+y;for(a=1;a<=10;a++){restaurantDivId=C+a;var D=$(restaurantDivId);if(D){i=e;j=e;h=e;if($(restaurantDivId+s))i='<img src="'+n+'clear.gif" class="'+$(restaurantDivId+s).innerText+'"/>';if($(restaurantDivId+t))j=$(restaurantDivId+t).innerText;if($(restaurantDivId+"YPId")){g=$(restaurantDivId+"YPId").innerText;m=CGUtilityGetWriteReviewUrl(k,g);o=CGUtilityGetPhotoUploadPageUrlWithYpId(l,g);h=CGUtilityGetBDPUrl(v,g)}CityGuidesMap.AddPushpin(new CGBusinessPushpin4($(restaurantDivId+"Lat").innerText,$(restaurantDivId+"Long").innerText,$(restaurantDivId+"Name").innerText,$(restaurantDivId+"Address").innerText,j,CGUtilityGetIcon(a),$(restaurantDivId+"ImageUrl").innerText,i,m,o,h,restaurantDivId,u,u,a))}}CityGuidesMap.Load();CityGuidesMap.SetMapView(true);ajaxComplete_showMapControl()}catch(F){}else window.setTimeout("ShowTop10UIPushpins('"+c+"', '"+f+"');",1e3)}function ShowOnePushpin(a,v,w){var s="text_list2",r="MsnCgBdpUrl",q="PhoneNumber",p="UserRatingUrl",o="MsnCgWriteReviewPage",n="MsnCgPhotoUploadPage",m="MsnCgImagePath",l="MsnCgBdp",k="arrayIndex",c=null;if(CityGuidesMap.GetMapObject()&&a!=c)try{CityGuidesMap.ClearAllPins();var d=$(g_currentPushPinDisplayed);if(d)d.removeAttribute(k);d=$(a);if(d)d.setAttribute(k,0);var e,f,g,t,j=c,u=c,h=c,i=c,b=v;if($(b+l))t=$(b+l).innerText;if($(b+m))i=$(b+m).innerText;if($(b+n))f=$(b+n).innerText;if($(b+o))e=$(b+o).innerText;if($(a+p))j='<img src="'+i+'clear.gif" class="'+$(a+p).innerText+'"/>';if($(a+q))u=$(a+q).innerText;if($(a+r))h=$(a+r).innerText;if($(a+"YPId")){g=$(a+"YPId").innerText;e=CGUtilityGetWriteReviewUrl(e,g);f=CGUtilityGetPhotoUploadPageUrlWithYpId(f,g);h=CGUtilityGetBDPUrl(t,g)}CityGuidesMap.AddPushpin(new CGBusinessPushpin4($(a+"Lat").innerText,$(a+"Long").innerText,$(a+"Name").innerText,$(a+"Address").innerText,u,CGUtilityGetIcon(w),$(a+"ImageUrl").innerText,j,e,f,h,a,s,s,0));CityGuidesMap.Load();CityGuidesMap.SetMapView(false);g_currentPushPinDisplayed=a}catch(x){}}function createPlayer(){var c="http://images.soapbox.msn.com/flash/soapbox1_1.swf";if(g_uuid){var a='<h3 id="uniqueid2_t">';a+="</h3>";a+='<div id="uniqueid2">';a+="<p>";a+='<a onclick="return Msn.Navigation.OpenNew(event,this)"';a+='href="http://www.adobe.com/go/getflashplayer">';a+="This video requires the Adobe";a+="Flash Player. Download a free version of the player.";a+="</a>";a+="</p>";a+="</div>";$("video1").innerHTML=a;Msn.Flash.Build(c,"8",300,272,"uniqueid2",{allowScriptAccess:"always",allowFullScreen:"true",wmode:"window",base:c,flashvars:"skin=0&amp;mkt=en-us&amp;fr=inline&amp;fg=gtlv2&amp;t=s4&amp;partnerlogo=true&amp;ch=true&amp;pg=T4VID3&amp;bsbpg=MSVBSB&amp;cbdata=uniqueid2&amp;cbprefix=Msn.Video.&amp;playlistmin=2&amp;ad=false&amp;timePlaying=180&amp;ps=6&amp;ifs=true&amp;c=v&amp;v="+g_uuid})}else{var b=$("hp_video_not_present");if(b!=undefined&&b!=null)b.style.display="block"}}function LoadHomePageTop10Restaurant(){var a=$("map_nav");if(a!=undefined&&a!=null){var b="?Top10Params="+g_homepage_top10_meta+"&where="+top10zipcode,d=CGUtility.WebserverPath+"/HomePageTop10Restaurant.aspx",c=new AjaxRequest(d+b,AjaxRequestType.GET,null,AjaxResponseType.Text,RestaurantsCallBack);c.Send()}}function RestaurantsCallBack(b){var a=$("map_nav");if(a!=undefined&&a!=null){a.innerHTML=b;FineAndReplaceScript(a)}ShowAllRestaurantsPushpins()}function FineAndReplaceScript(ajaxDiv){if(ajaxDiv!=null){var scriptTags=ajaxDiv.getElementsByTagName("script");if(scriptTags!=null)for(var i=0;i<scriptTags.length;i++)eval(scriptTags[i].innerHTML)}}