<!-- #include virtual="/NR/System/WBC/Internals/Main/WBCApp.inc"-->
<!-- #include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/MLSDisplayConfig/RevisionBrowserConfig.inc" -->
<!-- #include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/PageRevisionUIStrings.inc" -->
<!-- #include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/RevisionBrowser/Page/Common/ProgrammingConstants.inc"-->

<%
' ********************************************************************
' 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/CNCASPPageManager_PageCompareResult.asp
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Encapsulate the ASP logic associated with PageRevisionCompareResult.asp
'
' Implements the INCASPPageManager interface:
'	- Sub InitManager()
'
' Exposes the following properties:
'	- Property CompareResultHTML [Read only]
'	- Property CurrentPage
'	- Property DisplayOption
' ********************************************************************

Class CNCASPPageManager_PageCompareResult

	' -- Objects needed for Page Compare
	Public CurrentPage
	Public DisplayOption
	Public CodePage
	Public Charset
	Public ASPUtils

	Private m_pFormReader
	Private m_strContentCompareFrom
	Private m_strContentCompareTo
	Private m_strInsertionOption
	Private m_strDeletionOption
	Private m_strCompareFromDate
	Private m_strCompareToDate
	Private m_pCompareFromPage
	Private m_pCompareToPage
	Private m_pLazyInitFormReader

	' ---- [Private] Initialize the class
	Private Sub Class_Initialize()
		Set m_pLazyInitFormReader = Nothing
	End Sub

	' ---- [Public] InitManaer will take care of all programming logic in the ASP page
	Public Sub InitManager()
		' -- Set up Page and Page configure control to control the compare of the Page Revision
		Call SetupCurrentPage()
		Call SetupComparePage()
		Call SetupMLSInfo()
		Call SetupFormReader()
		Call SetupASPUtils()
		Call SetupCompareInfo()
	End Sub

	' ---- [Private] Sets up the current Page
	Private Sub SetupCurrentPage()
		Set CurrentPage = AutoSession.ThisPosting
	End Sub

	' ---- [Private] Sets up the ASP Utility
	Private Sub SetupASPUtils()
		Set ASPUtils = GetInitializedASPUtils()
	End Sub

	' ---- [Private] Set up the MLS info this ASP page will be running under
	Private Sub SetupMLSInfo()
		CodePage = GetCodePageForRevisionComparison( m_pCompareFromPage, m_pCompareToPage, ASPUtils )
		If  GetCharacterSetForRevisionComparison( m_pCompareFromPage, m_pCompareToPage ) = "" Then
			Charset = CurrentPage.Charset
		Else
			Charset = GetCharacterSetForRevisionComparison( m_pCompareFromPage, m_pCompareToPage )
		End If
	End Sub

	' ---- [Private] Sets up a set of state control for tab view
	Private Sub SetupCompareInfo()
		' get the compare time stamp
		m_strContentCompareFrom = m_pFormReader.Form( IDS_CONTENT_COMPARE_FROM )
		m_strContentCompareTo = m_pFormReader.Form( IDS_CONTENT_COMPARE_TO )

		' get the compare color option
		m_strInsertionOption = m_pFormReader.Form( IDS_OPTIONS_INSERTION )
		m_strDeletionOption = m_pFormReader.Form( IDS_OPTIONS_DELETION )

		' get the display option (i.e., appearance or source)
		DisplayOption = m_pFormReader.Form( IDS_DISPLAY_OPTIONS )

	End Sub

	' ---- [Private] Sets up a set of state control for tab view
	Private Sub SetupComparePage()

		' get the revision page object
		If (Request.QueryString( IDS_QSTR_COMPARETO_DATE ) <> "") Then
			' get the revisions object
			If (CDate(Request.QueryString( IDS_QSTR_COMPAREFROM_DATE )) = DATE_NEVER) Then
				Set m_pCompareFromPage = CurrentPage.WorkingRevision
				m_strCompareFromDate = FormatDate( m_pCompareFromPage.LastModifiedDate )
			Else
				Set m_pCompareFromPage = CurrentPage.RevisionForDate( CDate( Request.QueryString( IDS_QSTR_COMPAREFROM_DATE ) ) )
				m_strCompareFromDate = FormatDate( m_pCompareFromPage.RevisionDate )
			End If

			' get the revsions date for compare to
			Set m_pCompareToPage = CurrentPage.RevisionForDate( CDate( Request.QueryString( IDS_QSTR_COMPARETO_DATE  ) ) )
			m_strCompareToDate = FormatDate( m_pCompareToPage.RevisionDate )
		Else
			' get the revisions object
			Set m_pCompareFromPage = CurrentPage.WorkingRevision
			Set m_pCompareToPage = CurrentPage.RevisionForDate( CDate( Request.QueryString( IDS_QSTR_COMPAREFROM_DATE ) ) )

			' get the revisions date
			m_strCompareFromDate = FormatDate( m_pCompareFromPage.LastModifiedDate )
			m_strCompareToDate = FormatDate( m_pCompareToPage.RevisionDate )
		End If
	End Sub

	' ---- [Private] get the Reader form
	Private Sub SetupFormReader()
		Set m_pFormReader = GetRevisionFormReaderSafe( false )
	End Sub

	' ---- [Public] Initialize the NCASPExtensions.ASPFormReader object for form reading and display any errors
	Private Function GetRevisionFormReaderSafe( bUpoadValidate )
		On Error Resume Next

		' If the form reader has already been initialized, then return the existing reader.
		If Not m_pLazyInitFormReader Is Nothing Then
			Set GetRevisionFormReaderSafe = my_pLazyInitFormReader
			Exit Function
		End If

		' Create the ASPFormReader object
		Set m_pLazyInitFormReader = Server.CreateObject("NCASPExtensions.ASPFormReader")

		' set global CodePage value to the one from AutoSession.This
		m_pLazyInitFormReader.CodePage = CodePage

		' Turn on/off validation according to passed in parameter
		m_pLazyInitFormReader.UploadValidation = bUpoadValidate

		'If there was any errors here, respond to the user and bail out.
		If (Err.Number <> 0) Then

			RespondFormReadFailed

			' Read all the content and throw it away so we can do a clean exit
			Dim varContent
			while true
				Dim nCount
				nCount = 100000
				varContent = Request.BinaryRead(nCount)
				if nCount = 0 then
					Response.End
				end if
			wend

		End If

		Set GetRevisionFormReaderSafe = m_pLazyInitFormReader
	End Function

	' ---- [Public] get the compare result string
	Public Property Get CompareResultHTML()
		CompareResultHTML = ""

		' creat the compare object
		Dim pCompareObject
		Set pCompareObject = Server.CreateObject( "Comparehtml.Compare.1" )

		' set the style of insertion, deletion and the meta type of the charset
		pCompareObject.CompositeFileHeader = GetCompareTextStyleHeader()

		' set the text insertion and deletion
		pCompareObject.InsertedTextPreTag = IDS_VER_TEXT_STYLE_CLS_INSERTION_TAG
		pCompareObject.InsertedTextPostTag = IDS_VER_TEXT_STYLE_CLS_END_TAG
		pCompareObject.DeletedTextPreTag = IDS_VER_TEXT_STYLE_CLS_DELETION_TAG
		pCompareObject.DeletedTextPostTag = IDS_VER_TEXT_STYLE_CLS_END_TAG

		' set the image insertion and deletion
		If (m_strInsertionOption <> IDS_INSERTION_NONE) Then
			pCompareObject.InsertedImagePreTag = "<table cellpadding='10'><tr><td bgcolor='#" & m_strInsertionOption & "'>"
		Else
			pCompareObject.InsertedImagePreTag = "<table><tr><td>"
		End If
		pCompareObject.InsertedImagePostTag = IDS_VER_IMAGE_STYLE_CLS_END_TAG



		If (m_strDeletionOption <> IDS_DELETION_NONE) Then
			pCompareObject.DeletedImagePreTag = "<table cellpadding='10'><tr><td bgcolor='#" & m_strDeletionOption & "'>"
		Else
			pCompareObject.DeletedImagePreTag = "<table><tr><td>"
		End If
		pCompareObject.DeletedImagePostTag = IDS_VER_IMAGE_STYLE_CLS_END_TAG

		' return the compare result
		If (DisplayOption = IDS_DISPLAY_SOURCE) Then
			CompareResultHTML = "<pre>" + pCompareObject.CompareBuffers(  ASPUtils.HTMLencode( m_strContentCompareTo ), ASPUtils.HTMLencode( m_strContentCompareFrom ),  True ) + "</pre>"
		Else
			CompareResultHTML = pCompareObject.CompareBuffers(  m_strContentCompareTo, m_strContentCompareFrom, False )
		End If
	End Property

	' ---- [Private] get the comparison style
	' For Example:	<style type="text/css">
	'				<!--
	'				.WBC_styclsInsertion { color: #00FF00; }
	'				.WBC_styclsDeletion  { color: #FF0000; text-decoration: line-through }
	'				-->
	'				</style>
	'				<meta http-equiv='Content-Type' content='text/html; charset=Big5'>
	Private Function GetCompareTextStyleHeader()
		Dim strHeader

		strHeader =""
		strHeader = "<style type='text/css'>" & vbCrLf
		strHeader = strHeader & "<!--" & vbCrLf
		strHeader = strHeader & GetInsertionStyleClass() & vbCrLf
		strHeader = strHeader & GetDeletionStyleClass()& vbCrLf
		strHeader = strHeader & "-->" & vbCrLf
		strHeader = strHeader & "</style>" & vbCrLf
		strHeader = strHeader & "<meta http-equiv='Content-Type' content='text/html; charset=" & Charset & "'>" & vbCrLf
		GetCompareTextStyleHeader = strHeader
	End Function

	' ---- [Private] return the Insertion of the style class
	' For example: .WBC_styclsInsertion { color: #00FF00; }
	Private Function GetInsertionStyleClass()
		If (m_strInsertionOption = IDS_INSERTION_NONE) Then
			GetInsertionStyleClass = "." & IDS_VER_STYLE_CLS_INSERTION_NAME & "{ }"
		Else
			GetInsertionStyleClass = "." & IDS_VER_STYLE_CLS_INSERTION_NAME & "{ color:#" & m_strInsertionOption & "; }"
		End If
	End Function

	' ---- [Private] return the Deletion of the style class
	' For example: .WBC_styclsDeletion  { color: #FF0000; text-decoration: line-through }
	Private Function GetDeletionStyleClass()
		If (m_strDeletionOption = IDS_DELETION_NONE) Then
			GetDeletionStyleClass = "." & IDS_VER_STYLE_CLS_DELETION_NAME & "{ }"
		Else
			GetDeletionStyleClass = "." & IDS_VER_STYLE_CLS_DELETION_NAME & "{ color:#" & m_strDeletionOption & "; text-decoration: line-through }"
		End If
	End Function

	' ---- [Private] return true if two values are different
	Private Function Diff( strNewValue, strOldValue )
		If (StrComp( strNewValue, strOldValue) = 0) Then
			Diff = False
		Else
			Diff = True
		End If
	End Function

	' ---- [Private] return true if two values are different
	Private Function ShowPropsDiff( strNewValue, strOldValue )
		If Diff( strNewValue, strOldValue ) Then
			Response.Write( " * " )
		Else
			Response.Write( "&nbsp;" )
		End If
	End Function

	' ---- [Private] return true if one of the value is exit the max characters (i.e., 100 characters )
	Private Function IsExceedMaxChar( strNewValue, strOldValue )
		If (Len( strNewValue ) > ID_MAX_NO_OF_CHAR Or Len( strOldValue ) > ID_MAX_NO_OF_CHAR) Then
			IsExceedMaxChar = True
		Else
			IsExceedMaxChar = False
		End If
	End Function

	' ---- [Private] return true if one of the value is exit the max characters
	Private Function ShowPropsValue( strValue, bTextArea, nCols  )

		If bTextArea Then
			' display <textarea> if the text is greater than ID_MAX_NO_OF_CHAR (i.e., 100 character )
			Response.Write( "<textarea class='WBC_styclsInputField' ReadOnly rows='3' cols='" & nCols & "' onfocus='this.blur();' wrap='soft' style='background-color: transparent;'>" )
			Call ASPUtils.MBCSWrite( strValue, CodePage )
			Response.Write( "</textarea>" )
		Else
			' display plain text if the text is less than ID_MAX_NO_OF_CHAR (i.e., 100 character )
			Call ASPUtils.MBCSWrite( strValue, CodePage )
		End If
	End Function

	' ---- [Public] Write HTML for the comparison result of the Standard Properties
	Public Function WriteChangedStandardPropHTML()
		Dim bDiffValue
		Dim bTextArea
		Dim strNewDesc
		Dim strOldDesc
		Dim strNewApprover
		Dim strOldApprover

		' retrieve the data
		strNewDesc = m_pCompareFromPage.Description
		strOldDesc = m_pCompareToPage.Description
		strNewApprover = m_pCompareFromPage.LastApprovedDeclinedBy.ShortName
		strOldApprover = m_pCompareToPage.LastApprovedDeclinedBy.ShortName
		bTextArea = IsExceedMaxChar( strNewDesc, strOldDesc )
%>
		<table class="WBC_styclsAlternateRowBg2" width="100%" border="0" cellspacing="2" cellpadding="4">
			<tr class="WBC_styclsBackground2">
				<td class="WBC_styclsHeavyTextColor1" align="center" width="20%" colspan="2"><%= IDS_UI_LABEL_HEADER_PROPERTIES %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="40%">
					<script language="JavaScript" type="text/javascript">
					<!--
						WBC_writeUTC2Local("<%= m_strCompareFromDate %>");
					// -->
					</script>
				</td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="40%">
					<script language="JavaScript" type="text/javascript">
					<!--
						WBC_writeUTC2Local("<%= m_strCompareToDate %>");
					// -->
					</script>
				</td>
			</tr>
			<tr class="WBC_styclsAlternateRowBg1" valign="top">
				<td class="WBC_styclsHeavyTextColorStandout0" align="center">
					<% Call ShowPropsDiff( strNewApprover, strOldApprover ) %>
				</td>
				<td class="<%= BoldText( strNewApprover, strOldApprover ) %>"><%= IDS_UI_LABEL_APPROVED_BY %></td>
				<td class="WBC_styclsTextColor0"><% Call ASPUtils.MBCSWrite( ASPUtils.HTMLEncode( strNewApprover ), CodePage) %></td>
				<td class="WBC_styclsTextColor0"><% Call ASPUtils.MBCSWrite( ASPUtils.HTMLEncode( strOldApprover ), CodePage) %></td>
			</tr>
			<tr class="WBC_styclsAlternateRowBg2" valign="top">
				<td class="WBC_styclsHeavyTextColorStandout0" align="center">
					<% Call ShowPropsDiff( strNewDesc, strOldDesc ) %>
				</td>
				<td class="<%= BoldText( strNewDesc, strOldDesc ) %>"><%= IDS_UI_LABEL_DESCRIPTION %></td>
				<td class="WBC_styclsTextColor0"><% Call ShowPropsValue( ASPUtils.HTMLEncode( strNewDesc ), bTextArea, IIf( isIE, ID_LARGE_TEXTAREA_IE, ID_LARGE_TEXTAREA_NS ) ) %></td>
				<td class="WBC_styclsTextColor0"><% Call ShowPropsValue( ASPUtils.HTMLEncode( strOldDesc ), bTextArea, IIf( isIE, ID_LARGE_TEXTAREA_IE, ID_LARGE_TEXTAREA_NS ) ) %></td>
			</tr>
		</table>
<%
	End Function

	' ---- [Public] Write HTML for the comparison result of the Standard Properties
	Private Function BoldText( strNewValue, strOldValue )
		If Diff( strNewValue, strOldValue ) Then
			' show bold text
			BoldText = "WBC_styclsHeavyTextColorStandout0"
		Else
			' show normal text
			BoldText = "WBC_styclsTextColor0"
		End If
	End Function

	' ---- [Public] Write HTML for the comparison result of the Standard Properties
	Public Function WriteChangedCustomPropHTML()
%>
		<table class="WBC_styclsAlternateRowBg2" width="100%" border="0" cellspacing="2" cellpadding="4">
			<tr class="WBC_styclsBackground2">
				<td colspan="2">&nbsp;</td>
				<td class="WBC_styclsHeavyTextColor1" align="center" colspan="3">
					<script language="JavaScript" type="text/javascript">
					<!--
						WBC_writeUTC2Local("<%= m_strCompareFromDate %>");
					// -->
					</script>
				</td>
				<td class="WBC_styclsHeavyTextColor1" align="center" colspan="3">
					<script language="JavaScript" type="text/javascript">
					<!--
						WBC_writeUTC2Local("<%= m_strCompareToDate %>");
					// -->
					</script>
				</td>
			</tr>
			<tr class="WBC_styclsBackground2">
				<td class="WBC_styclsHeavyTextColor1" align="center" width="20%" colspan="2"><%= IDS_UI_LABEL_HEADER_PROPERTIES %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="5%"><%= IDS_UI_LABEL_HEADER_TYPE %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="5%"><%= IDS_UI_LABEL_HEADER_DEFAULT %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="30%"><%= IDS_UI_LABEL_HEADER_VALUE %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="5%"><%= IDS_UI_LABEL_HEADER_TYPE %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="5%"><%= IDS_UI_LABEL_HEADER_DEFAULT %></td>
				<td class="WBC_styclsHeavyTextColor1" align="center" width="30%"><%= IDS_UI_LABEL_HEADER_VALUE %></td>
			</tr>
			<%	Call WriteEopsPropertiesHandler() %>
		</table>
<%
	End Function

	' ---- [Private] compare each Eop value
	Private Function WriteEopsPropertiesHandler()
		Dim i
		Dim j
		Dim lIndex
		Dim pNewEops
		Dim pOldEops
		Dim bCmpResult

		i = 0
		j = 0
		lIndex = 0

		' get the new and old page's EOP object
		Set pNewEops = m_pCompareFromPage.CustomProperties
		Set pOldEops = m_pCompareToPage.CustomProperties

		If ((pNewEops.Count = 0) And (pOldEops.Count = 0)) Then

			' display Eop no available statement if there is no Eop value
			Response.Write( "<tr class='WBC_styclsAlternateRowBg1' valign='top'>" )
			Response.Write( "<td class='WBC_styclsTextColor0' colspan='8' align='center'>" & IDS_UI_NO_EOP_AVAILABLE & "</td>" )
			Response.Write( "</tr>" )
		Else
			' The ROM will return a sorted Eop list. Start to combine two Eops list together
			While (( i < pNewEops.Count ) And ( j < pOldEops.Count ))
				bCmpResult = StrComp( pNewEops(i).Name, pOldEops(j).Name )

				If ( bCmpResult < 0 ) Then
					' new Eop name less that old Eop name
					Call WriteCompareEopHTML( lIndex, pNewEops(i).Name )
					i = i + 1
				ElseIf ( bCmpResult = 0 ) Then
					' new Eop name is equal to old Eop name
					Call WriteCompareEopHTML( lIndex, pNewEops(i).Name )
					i = i + 1
					j = j + 1
				Else
					' new Eop name is greater than old Eop name
					Call WriteCompareEopHTML( lIndex, pOldEops(j).Name )
					j = j + 1
				End If
				lIndex = lIndex + 1
			Wend

			' get the reminder Eop from "m_pCompareFromPage"
			While ( i < pNewEops.Count )
				Call WriteCompareEopHTML( lIndex, pNewEops(i).Name )
				i = i + 1
				lIndex = lIndex + 1
			Wend

			' get the reminder Eop from "m_pCompareToPage"
			While ( j < pOldEops.Count )
				Call WriteCompareEopHTML( lIndex, pOldEops(i).Name )
				j = j + 1
				lIndex = lIndex + 1
			Wend
		End If
	End Function


	' ---- [Private] show the comparison result of the each Eop in HTML
	Private Function WriteCompareEopHTML( lIndex, strEopName )
		Dim pNewEop
		Dim pOldEop
		Dim strEncodeEopName
		Dim strNewEopType
		Dim strOldEopType
		Dim strNewEopIsDefault
		Dim strOldEopIsDefault
		Dim strNewEopValue
		Dim strOldEopValue
		Dim strNewCombineValue
		Dim strOldCombineValue
		Dim strStyclsRowBg
		Dim bTextArea

		' get the new page Eop value
		Set pNewEop = GetEopByName( m_pCompareFromPage, strEopName )
		If Not (pNewEop Is Nothing) Then
			strNewEopType = GetEopType( pNewEop )
			strNewEopIsDefault = GetEopIsDefault( pNewEop )
			strNewEopValue = pNewEop.Value
		Else
			' the Eop doesn't exist
			strNewEopType = IDS_UI_LABEL_NOT_APPLY
			strNewEopIsDefault = IDS_UI_LABEL_NOT_APPLY
			strNewEopValue = IDS_UI_LABEL_NOT_APPLY
		End If
		strNewCombineValue = strNewEopType & strNewEopIsDefault & strNewEopValue

		' get the old page Eop value
		Set pOldEop = GetEopByName( m_pCompareToPage, strEopName )
		If Not (pOldEop Is Nothing) Then
			strOldEopType = GetEopType( pOldEop )
			strOldEopIsDefault = GetEopIsDefault( pOldEop )
			strOldEopValue = pOldEop.Value
		Else
			' the Eop doesn't exist
			strOldEopType = IDS_UI_LABEL_NOT_APPLY
			strOldEopIsDefault =IDS_UI_LABEL_NOT_APPLY
			strOldEopValue = IDS_UI_LABEL_NOT_APPLY
		End If
		strOldCombineValue = strOldEopType & strOldEopIsDefault & strOldEopValue

		' encode Eop name
		strEncodeEopName = ASPUtils.HTMLEncode( strEopName )

		' get the background color
		strStyclsRowBg = IIf( ( (lIndex mod 2) > 0 ), "WBC_styclsAlternateRowBg2", "WBC_styclsAlternateRowBg1" )

		' check whether show textare or not
		bTextArea = IsExceedMaxChar( strNewEopValue, strOldEopValue )
%>
		<tr class="<%= strStyclsRowBg %>" valign="top">
			<td class="WBC_styclsHeavyTextColorStandout0">
				<% Call ShowPropsDiff( strNewCombineValue, strOldCombineValue ) %>
			</td>
			<td class="<%= BoldText( strNewCombineValue, strOldCombineValue ) %>">
				<% Call ASPUtils.MBCSWrite( strEncodeEopName, CodePage ) %>
			</td>
			<td class="WBC_styclsTextColor0" align="center"><%= strNewEopType %></td>
			<td class="WBC_styclsTextColor0" align="center"><%= strNewEopIsDefault %></td>
			<td class="WBC_styclsTextColor0"><% Call ShowPropsValue( ASPUtils.HTMLEncode( strNewEopValue ), bTextArea, IIf( isIE, ID_SMALL_TEXTAREA_IE, ID_SMALL_TEXTAREA_NS ) ) %></td>
			<td class="WBC_styclsTextColor0" align="center"><%= strOldEopType %></td>
			<td class="WBC_styclsTextColor0" align="center"><%= strOldEopIsDefault %></td>
			<td class="WBC_styclsTextColor0"><% Call ShowPropsValue( ASPUtils.HTMLEncode( strOldEopValue ), bTextArea, IIf( isIE, ID_SMALL_TEXTAREA_IE, ID_SMALL_TEXTAREA_NS ) ) %></td>
		</tr>
<%
	End Function

	' ---- [Private] get the Eop object by name. Return Nothing if Eop doesn't exist
	Private Function GetEopByName( pPosting, strEopName )
		On Error Resume Next
		Set GetEopByName = Nothing
		Set GetEopByName = pPosting.CustomProperties( strEopName )
	End Function

	' ---- [Public] return Yes if the Eop is a default value
	Private Function GetEopIsDefault( pEop )
		If (pEop.UsesDefaultValue) Then
			GetEopIsDefault = IDS_UI_LABEL_YES
		Else
			GetEopIsDefault = "&nbsp;"
		End If
	End Function

	' ---- [Public] return the Eop is a "Selection" or "Text"
	Private Function GetEopType( pEop )
		If (pEop.AllowedValues.Count > 0) Then
			GetEopType = IDS_UI_DISPLAY_EOP_SELECTION
		Else
			GetEopType = IDS_UI_DISPLAY_EOP_TEXT
		End If
	End Function

	' ---- [Public] Write HTML for the unchanged Page properties
	Public Function WriteUnChangedPropsHTML()
		Dim strPostingName
		Dim strDisplayName
		Dim strStartDate
		Dim strExpiryDate
		Dim strURLModePublished

		' retrieve the Page information
		strDisplayName = ASPUtils.HTMLEncode( m_pCompareFromPage.DisplayName )
		strStartDate = FormatDate( m_pCompareFromPage.StartDate )
		strExpiryDate = FormatDate( m_pCompareFromPage.ExpiryDate )
		strPostingName = Replace( m_pCompareFromPage.Name, " ", "+" )
		strURLModePublished = ASPUtils.HTMLEncode( m_pCompareFromPage.Parent.URLModePublished & strPostingName )
%>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_NAME %></td>
			<td class="WBC_styclsTextColor1" colspan="3"><% Call ASPUtils.MBCSWrite( ASPUtils.HTMLEncode( m_pCompareFromPage.Name), CodePage ) %></td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_DISPLAYNAME %></td>
			<td class="WBC_styclsTextColor1" colspan="3"><% Call ASPUtils.MBCSWrite( strDisplayName, CodePage ) %></td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_URL %></td>
			<td class="WBC_styclsTextColor1" colspan="3"><% Call ASPUtils.MBCSWrite( strURLModePublished, CodePage ) %></td>
		</tr>
		<tr>
			<td colspan="4">
				<table  class="WBC_styclsBackground2" width="100%" border="0" cellspacing="1" cellpadding="0">
					<tr>
						<td width="300"><hr></td>
						<td class="WBC_styclsHeavyTextColor1" width="150" align="Center">
							<%= IDS_UI_LABEL_PUBLISHING_OPTIONS %>
						</td>
						<td width="300"><hr></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_START_PUBLISHING %></td>
			<td class="WBC_styclsTextColor1" colspan="3">
<%
				'	Netscape 3 has problems running javascript document.write in nested tables.
				'	Date & Time will be disabled if browser is ns3.
				If isNetscape And browserVer < 4 Then
					Response.Write( IDS_UNAVAILABLE_FOR_BROWSER )
				Else %>
					<script language="JavaScript" type="text/javascript">
					<!--
						WBC_writeUTC2Local("<%= strStartDate %>");
					// -->
					</script>
<%				End If %>
			</td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_STOP_PUBLISHING %></td>
			<td class="WBC_styclsTextColor1" colspan="3">
<%				If m_pCompareFromPage.ExpiryDate = DATE_NEVER Then
					Response.Write( IDS_UI_LABEL_NEVER )
				Else
					'	Netscape 3 has problems with javascript document.write in nested tables.
					'	Date & Time will be disabled if browser is ns3.
					If isNetscape And browserVer < 4 Then
						Response.Write( IDS_UNAVAILABLE_FOR_BROWSER )
					Else %>
						<script language="JavaScript" type="text/javascript">
						<!--
							WBC_writeUTC2Local( "<%= strExpiryDate %>" );
						// -->
						</script>
<%					End If
				End If %>
			</td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_ISIMPORTANT %></td>
			<td class="WBC_styclsTextColor1" width="20%">
				<% 	If m_pCompareFromPage.IsImportant Then
						Response.Write( IDS_UI_LABEL_YES  )
				   	Else
				    	Response.Write( IDS_UI_LABEL_NO )
				   	End If %>
			</td>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_ISROBOTFOLLABLE %></td>
			<td class="WBC_styclsTextColor1" width="20%">
				<%	If m_pCompareFromPage.IsRobotFollowable Then
						Response.Write( IDS_UI_LABEL_YES )
				   	Else
						Response.Write( IDS_UI_LABEL_NO )
					End If %>
			</td>
		</tr>
		<tr>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_ISHIDDENMODEPUBLISHED %></td>
			<td class="WBC_styclsTextColor1" width="2O%">
				<%	If m_pCompareFromPage.IsHiddenModePublished Then
						Response.Write( IDS_UI_LABEL_YES )
					Else
						Response.Write( IDS_UI_LABEL_NO )
					End If %>
			</td>
			<td class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_ISROBOTINDEXABLE_PAGE %></td>
			<td class="WBC_styclsTextColor1" width="20%">
				<%	If m_pCompareFromPage.IsRobotIndexable Then
						Response.Write( IDS_UI_LABEL_YES )
					Else
						Response.Write( IDS_UI_LABEL_NO )
					End If %>
			</td>
		</tr>
<%
	End Function
End Class

%>