<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ---- [Public] Returns if the "switch to edit site" link should be visible
Function IsSwitchToEditSiteVisible
	IsSwitchToEditSiteVisible = (AutoSession.IsModePublished And _
								 IsSiteModeLinkVisible)
End Function

' ---- [Public] Returns if the "switch to live site" link should be visible
Function IsSwitchToLiveSiteVisible
	IsSwitchToLiveSiteVisible = (AutoSession.IsModeUnpublished And _
								IsSiteModeLinkVisible And _
								Request.QueryString(IDS_QPARAM_WBCPURPOSE) <> "")
End Function

' ---- [Public] get the URL of the "switch to edit site" link
Function GetEditSiteURL()
	GetEditSiteURL = GetWBCEditSiteModeURL( GetCurrentObject() )
End Function

' ---- [Public] get the URL of the "switch to live site" link
Function GetLiveSiteURL()
	GetLiveSiteURL = GetWBCLiveSiteModeURL()
End Function


' ---- [Private] Returns if the "switch to XXXX site" link should be visible
Function IsSiteModeLinkVisible
	IsSiteModeLinkVisible = (AutoSession.UserCanModifySite And _
							Not AutoSession.IsLoggedInAsGuest And _
							Not IsStagedOrCrawled)
End Function

%>