function fblogout(){var divFBPic=document.getElementById("divFBPic");if(divFBPic!=null)divFBPic.innerHTML="<fb:profile-pic size='square' uid='loggedinuser' facebook-logo='true'></fb:profile-pic>";FB.Connect.logout();var spanLogout=document.getElementById("divLogout");if(spanLogout!=null)spanLogout.style.display="none"}function fbconnect_dff(){SetFBCInfoHTML_DFF("block")}function fbnotconnect_dff(){SetFBCInfoHTML_DFF("none")}function fbnotconnect(){SetFBCInfoHTML("none")}
function fbconnect(){SetFBCInfoHTML("block")}
function SetFBCInfoHTML_DFF(DisplayLogoutLink){var spanInfo=document.getElementById("spanInfo");if(spanInfo!=null)spanInfo.innerHTML="<strong>Share your dining reviews with friends.</strong>";var divFBPic=document.getElementById("divFBPic");if(divFBPic!=null)divFBPic.innerHTML="<fb:profile-pic size='square' uid='loggedinuser' facebook-logo='true'></fb:profile-pic>";var divPublishReview=document.getElementById("divPublishReview");if(divPublishReview!=null)divPublishReview.innerHTML="<a href='#' onclick='javascript:PublishToFacebook(document.SearchForm.txtHid_FBC_ReviewTemplateID.value,getDFFTemplateData, \"FBPostReview\");'>Publish to Facebook</a>";
var divLogout=document.getElementById("divLogout");if(divLogout!=null)divLogout.style.display=DisplayLogoutLink;if(document.getElementById("divShareFB")!=null)document.getElementById("divShareFB").style.display="";FB.XFBML.Host.parseDomTree()}
function SetFBCInfoHTML(DisplayLogoutLink){var divNewText=document.getElementById("divNewText");if(divNewText!=null)divNewText.innerHTML="<strong>Share your plans with your friends </strong>";var divFBPic=document.getElementById("divFBPic");if(divFBPic!=null)divFBPic.innerHTML="<fb:profile-pic size='square' uid='loggedinuser' facebook-logo='true'></fb:profile-pic>";var spanTxtInfo=document.getElementById("spanTxtInfo");if(spanTxtInfo!=null){var str="Now OpenTable makes it simple to post your upcoming reservation at "+
document.ViewForm.txtHid_RestaurantName.value+" and also to share your restaurant review through your Facebook profile. ";spanTxtInfo.innerHTML=str+"<a class='linkLearnMore' href='javascript:ShowLearnMore(true)'<span id='spanLearnMore' style='text-decoration: underline;'>Learn More</span> </a>"}var divPublish=document.getElementById("divPublish");if(divPublish!=null)divPublish.innerHTML='<fb:login-button onlogin="PublishToFacebook(document.ViewForm.txtHid_FBC_ResoTemplateID.value,getConfTemplateData,\'FBPostReservation\');" size="large" background="light" length="long"></fb:login-button>';
var divLogout=document.getElementById("divLogout");if(divLogout!=null)divLogout.style.display=DisplayLogoutLink;if(document.getElementById("divFBconnectpanel")!=null)document.getElementById("divFBconnectpanel").style.display="block";FB.XFBML.Host.parseDomTree()}function launchLearnMoreWindow(sUrl){openWindow(sUrl,564,530,"DinersChoiceLearnMore",0,0)}
function getDFFTemplateData_old(){var jsonObj={"post-title":document.SearchForm.txtHid_RestaurantName.value,"post-url":"http://www.opentable.com/rest_profile.aspx?rid="+document.SearchForm.txtHid_RestaurantID.value+"&ref=5263","post-url-mobile":"http://www.opentable.com/mobile","post-url2":"http://www.opentable.com/rest_profile.aspx?rid="+document.SearchForm.txtHid_RestaurantID.value+"&rnr=1&ref=5263","opentable-url":"http://www.opentable.com/home.aspx?ref=5263","category-text":document.SearchForm.txtHid_ReviewCategories.value,
"overall-rating":document.SearchForm.txtHid_ReviewRatings.value,review:document.SearchForm.txtHid_ReviewText.value};if(document.SearchForm.txtHidHasProfImage.value=="1")jsonObj.images=[{src:"http://www.opentable.com/img/restimages/"+document.SearchForm.txtHid_RestaurantID.value+".jpg",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.SearchForm.txtHid_RestaurantID.value+"&ref=5263"}];return jsonObj}
function getDFFTemplateData(){var attachment={name:"submitted a review for a recent visit to "+document.SearchForm.txtHid_RestaurantName.value+" using OpenTable.com",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.SearchForm.txtHid_RestaurantID.value+"&ref=5263",caption:"Overall Rating: "+document.SearchForm.txtHid_ReviewRatings.value,description:document.SearchForm.txtHid_ReviewText.value,properties:{"I also tagged the restaurant":document.SearchForm.txtHid_ReviewCategories.value}};
if(document.SearchForm.txtHidHasProfImage.value=="1")attachment.media=[{type:"image",src:"http://www.opentable.com/img/restimages/"+document.SearchForm.txtHid_RestaurantID.value+".jpg",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.SearchForm.txtHid_RestaurantID.value+"&ref=5263"}];return attachment}
function getConfTemplateData_old(){var jsonObj={"post-title":document.ViewForm.txtHid_RestaurantName.value,"post-url-mobile":"http://www.opentable.com/mobile","post-url2":"http://www.opentable.com/rest_profile.aspx?rid="+document.ViewForm.txtHid_RestaurantID.value+"&ref=5062","opentable-url":"http://www.opentable.com/home.aspx?ref=5062","post-url":"http://www.opentable.com/rest_profile.aspx?rid="+document.ViewForm.txtHid_RestaurantID.value+"&rnr=1&ref=5062"};if(document.ViewForm.txtHidHasProfImage.value==
"1")jsonObj.images=[{src:"http://www.opentable.com/img/restimages/"+document.ViewForm.txtHid_RestaurantID.value+".jpg",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.ViewForm.txtHid_RestaurantID.value+"&ref=5062"}];return jsonObj}
function getConfTemplateData(){var attachment={name:"made a reservation for "+document.ViewForm.txtHid_RestaurantName.value+" using OpenTable.com",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.ViewForm.txtHid_RestaurantID.value+"&ref=5062"};if(document.ViewForm.txtHidHasProfImage.value=="1")attachment.media=[{type:"image",src:"http://www.opentable.com/img/restimages/"+document.ViewForm.txtHid_RestaurantID.value+".jpg",href:"http://www.opentable.com/rest_profile.aspx?rid="+document.ViewForm.txtHid_RestaurantID.value+
"&ref=5062"}];return attachment}function ShowLearnMore(close){var divLearnMorePopup=document.getElementById("LearnMorePopup");if(close)divLearnMorePopup.style.visibility="visible";else divLearnMorePopup.style.visibility="hidden"}function PublishToFacebook(templateID,getTemplateFunc,propValue){FB.Connect.streamPublish("",getTemplateFunc());FBButtonTrack(propValue)}
function FBButtonTrack(propValue){var sObj=s_gi(s_account);sObj.linkTrackVars="prop41";sObj.linkTrackEvents="None";sObj.prop41=propValue;sObj.tl(true,"o",propValue)}function LogVisitorOverlapMetric(){FB.Connect.get_status().waitUntilReady(function(status){switch(status){case FB.ConnectState.connected:ottrack("FB_Connected","72942");break;case FB.ConnectState.appNotAuthorized:ottrack("FB_Not_Authorized","72943");break;case FB.ConnectState.userNotLoggedIn:break}})};

