<%
' ********************************************************************
' 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."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/RevisionBrowser/Page/
'			RevisionCompare/CNCStateRenderer_TabView.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for displaying info based on different state
'
' Implement NCLCRenderer Interface:
'	- Sub  Sub RenderState( strState, strStateURL, bCurrentState )
' ********************************************************************

Class CNCStateRenderer_TabView

	' ---- [Public] Render a state told by CNCStateControl
	Public Sub RenderState( strState, strStateURL, bCurrentState )
		Dim strTabImage
		strTabImage = GetTabImage( strState, bCurrentState )

		If (bCurrentState) Then
			%><img src="<%= strTabImage %>" border="0" alt=""><%  Else %><a href="#" onclick="WBC_onClickTab('<%= strStateURL %>'); return false;"><img src="<%= strTabImage %>" border="0" alt=""></a><%
		End If
	End Sub

	Private Function GetTabImage( strState, bCurrentState )
		Select Case strState
			Case IDS_DISPLAY_APPEARANCE
				If bCurrentState Then
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_APPEARANCE_ON_GIF
				Else
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_APPEARANCE_OFF_GIF
				End If
			Case IDS_DISPLAY_SOURCE
				If bCurrentState Then
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_SOURCE_ON_GIF
				Else
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_SOURCE_OFF_GIF
				End If
			Case IDS_DISPLAY_PROPS
				If bCurrentState Then
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_PROPS_ON_GIF
				Else
					GetTabImage = IDS_PATH_IMAGES_COMMON & IDS_IMG_TAB_PROPS_OFF_GIF
				End If
		End Select
	End Function
End Class
%>