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

'======================================================================
' For Properties Information
'	Public Function:
'		Sub WBC_writeChannelGeneralPropsHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writePostingGeneralPropsHTML(pThisObject, bCanSetSharedProperties,
'											bCanSetLocalProperties)
'
'	Private Function:
'		Sub WBC_writePropsNameHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writePropsDisplayNameHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writePropsURLModePublishedHTML(pThisObject)
'======================================================================

' ---- [Public]	Write Channel general information html tags
Sub WBC_writeChannelGeneralPropsHTML( pThisObject, bCanSetSharedProperties )
%>
	<!-- Show the Top Title -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr class="WBC_styclsBackground1">
			<td width="50"><img src="<%=IDS_PATH_IMAGE_LOGO %>" border=0></td>
			<td width=100% valign="middle" class="WBC_styclsHeaderText">
				<%= IDS_UI_DISPLAY_CHANNEL_PROPERTIES %>
			</td>
			<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_LEVEL1_HEIGHT %>" border="0"></td>
		</tr>
	</table>

	<!-- Show the Channel Information -->
	<table width="100%" border="0" cellspacing="0" cellpadding="10">
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td class="WBC_styclsBackground1">
						<table width="100%" border="0" cellspacing="2" cellpadding="5">
							<tr class="WBC_styclsBackground2">
								<td>
									<table width="100%" border="0" cellspacing="0" cellpadding="2">
										<% Call WBC_writePropsNameHTML(pThisObject,  bCanSetSharedProperties) %>
										<% Call WBC_writePropsDisplayNameHTML(pThisObject, bCanSetSharedProperties) %>
										<% Call WBC_writePropsURLModePublishedHTML(pThisObject) %>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</tr>
	</table>
<%
End Sub


' ---- [Public]	Write Page general information html tags
Sub WBC_writePostingGeneralPropsHTML( pThisObject, bCanSetSharedProperties, bCanSetLocalProperties )
%>
	<!-- Show the Top Title -->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr class="WBC_styclsBackground1">
			<td width="50"><img src="<%=IDS_PATH_IMAGE_LOGO %>" border=0></td>
			<td width=100% valign="middle" class="WBC_styclsHeaderText">
				<%= IDS_UI_DISPLAY_PAGE_PROPERTIES %>
			</td>
			<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_LEVEL1_HEIGHT %>" border="0"></td>
		</tr>
	</table>

	<!-- Show the Page Information -->
		<table width="100%" border="0" cellspacing="0" cellpadding="10">
		<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td class="WBC_styclsBackground1">
						<table width="100%" border="0" cellspacing="2" cellpadding="5">
							<tr class="WBC_styclsBackground2">
								<td>
									<table width="100%" border="0" cellspacing="0" cellpadding="2">
								<% 
									Call WBC_writePropsNameHTML(pThisObject,  bCanSetSharedProperties) 
									Call WBC_writePropsDisplayNameHTML(pThisObject, bCanSetLocalProperties)
									Call WBC_writePropsURLModePublishedHTML(pThisObject)
									Call WBC_writePropsTemplatePath(pThisObject)
								%>
							</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</tr>
	</table>
<%
End Sub


' ---- [Private] Write Channel/Page name html tags
Sub WBC_writePropsNameHTML( pThisObject, bCanSetSharedProperties )
	Dim pASPUtils
    Set pASPUtils = GetInitializedASPUtils()
    
	Dim strName
	strName = pASPUtils.HTMLEncode( pThisObject.Name )

%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1" width="150">
			Name:
<%			If pThisObject.IsPosting Then
				If pThisObject.IsConnected Then %>
					<img border=0 src=<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_SHARABLE %> alt="<%= IDS_UI_TOOLTIP_SHARED_PROPERTY %>">
<%				End If
			End If%>
		</td>
		<td class="WBC_styclsTextColor1" colspan="2">
<%		If bCanSetSharedProperties Then %>
			<input class="WBC_styclsInputField" type="text" name="WBC_intxtName"
				size="<%= IIf(IsIE, ID_UI_INPUTBOX_SIZE_IE, ID_UI_INPUTBOX_SIZE_NS) %>" value="<%= strName %>" >
			<% Call WBC_writeHiddenFieldInHTML( "WBC_intxtName_original", strName)
		Else %>
			<input type="hidden" name="WBC_intxtName", value="<%= strName %>">
<%			Call pASPUtils.MBCSWrite( strName, pThisObject.CodePage )
		End If %>
		</td>
	</tr>
<%
End Sub


' ---- [Private] Write Channel/Page display name html tags
Sub WBC_writePropsDisplayNameHTML( pThisObject, bCanSetLocalProperties )
    Dim pASPUtils
    Dim strDisplayName
    Set pASPUtils = GetInitializedASPUtils()
	strDisplayName = pASPUtils.HTMLEncode( pThisObject.DisplayName )

	Dim lCodePage
	lCodePage = pThisObject.CodePage
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1">
			Display Name:
		</td>
		<td class="WBC_styclsTextColor1">
<%		If bCanSetLocalProperties Then %>
			<input class="WBC_styclsInputField" type="text" name="WBC_intxtDisplayName"
				size="<%= IIf(IsIE, ID_UI_INPUTBOX_SIZE_IE, ID_UI_INPUTBOX_SIZE_NS) %>" value="<% Call pASPUtils.MBCSWrite(strDisplayName, lCodePage) %>">
			<input type="hidden" name="WBC_intxtDisplayName_original" value="<% Call pASPUtils.MBCSWrite(strDisplayName, lCodePage) %>">
<%		Else
			Call pASPUtils.MBCSWrite(strDisplayName, lCodePage)
		End If %>
		</td>
		<td class="WBC_styclsTextColor1" valign="bottom">
<%		If bCanSetLocalProperties Then %>
			<a href="#" onclick="WBC_resetDisplayName(); return false;"><img name="WBC_imgResetDisplayName" src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_OFFRESET %>" border="0" alt=""></a>
<%		Else %>
			&nbsp;
<%		End If %>
		</td>
	</tr>
<%
End Sub


' ---- [Private] Write Channel/Page parent Path html tags
Sub WBC_writePropsURLModePublishedHTML( pThisObject )
	Dim pASPUtils
	Dim strURLModePublished
	
	Set pASPUtils = GetInitializedASPUtils()
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1">
			URL:
		</td>
		<td class="WBC_styclsTextColor1" colspan="2">
<%		If pThisObject.IsChannel Then
			strURLModePublished = pASPUtils.HTMLEncode( pThisObject.URLModePublished) 
			Call pASPUtils.MBCSWrite( strURLModePublished, pThisObject.CodePage )
		Else

			' construct path because URLModePublished for waiting status posting will
			' return GUID base path instead of name path.
			Dim strPageName
			strPageName = pASPUtils.HTMLEncode( Replace( pThisObject.Name, " ", "+" ) )

			If Not (pThisObject.Parent is Nothing) Then
				strURLModePublished = pASPUtils.HTMLEncode( pThisObject.Parent.URLModePublished )
				Call pASPUtils.MBCSWrite( strURLModePublished & strPageName, pThisObject.CodePage )
			Else
				Call pASPUtils.MBCSWrite( ("/" & strPageName), pThisObject.CodePage )
			End If
		End If
%>
		</td>
	</tr>
<%
End Sub

Sub WBC_writePropsTemplatePath(pThisObject)
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1">
			Template Path:
		</td>
		<td class="WBC_styclsTextColor1" colspan="2">
			<%= pThisObject.Template.Path %>
		</td>
	</tr>
<%	
End Sub


'======================================================================
' For Properties Standard Tab
'	Public Function:
'		Sub WBC_writeChannelStandardTabHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writePostingStandardTabHTML(pThisObject, bCanSetSharedProperties,
'											bCanSetLocalProperties)
'
'	Private Function:
'		Sub WBC_writePropsDescriptionHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writePropsPublishingOptionsHTML()
'		Sub WBC_writePropsOwnerHTML(pThisObject)
'		Sub WBC_writePropsLastModifiedDateHTML(pThisObject)
'		Sub WBC_writeStartDateHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writeExpiryDateHTML(bCanSetSharedProperties, pThisPosting)
'		Sub WBC_writePropsNativeFlagsHTML(pThisObject, bCanSetSharedProperties)
'		Sub WBC_writeNativeFlagsCheckedBox(strNativeFlagsName, strNativeFlagsLabel,
'									  bCanSetSharedProperties, bIsChecked)
'		Sub WBC_writeHiddenFieldInHTML()
'		Sub WBC_writeMonthList()
'		Sub WBC_writeDayList()
'		Sub WBC_writeYearList()
'		Sub WBC_writeHoursList()
'		Sub WBC_writeMinutesList()
'======================================================================

' ---- [Public] Write Channel Standard tab html tags
Sub WBC_writeChannelStandardTabHTML( pThisObject, bCanSetSharedProperties )
%>
	<!-- Standard Tab Form -->
	<form name="WBC_formStandardProps">
		<table border="0" cellspacing="0" cellpadding="0" width="<%= ID_PROPS_TAB_CONTENT_WIDTH %>">

			<!-- Begin Properties Content in Standard Tab -->
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="5">
						<% Call WBC_writePropsDescriptionHTML( pThisObject, bCanSetSharedProperties ) %>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<% Call WBC_writePropsPublishingOptionsHTML() %>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<td>
							<table width="100%" border="0" cellspacing="0" cellpadding="4">
								<% Call WBC_writeStartDateHTML( pThisObject, bCanSetSharedProperties ) %>
								<% Call WBC_writeExpiryDateHTML( pThisObject, bCanSetSharedProperties ) %>
								<tr class="WBC_styclsBackground2">
									<td  colspan="2"><IMG height="5" src="<%= IDS_TRANSPARENT_GIF %>" border="0"></td>
								</tr>
								<% Call WBC_writePropsOwnerHTML( pThisObject ) %>
								<% Call WBC_writePropsLastModifiedDateHTML( pThisObject ) %>
							</table>
						</td>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<% Call WBC_writePropsNativeFlagsHTML( pThisObject, bCanSetSharedProperties ) %>
					</table>
				</td>
			</tr>
			<!-- End of Properties Content in Standard Tab -->

		</table>
	</form>
<%
End Sub


' ---- [Public] Write Page Standard tab html tags
Sub WBC_writePostingStandardTabHTML( pThisObject, bCanSetSharedProperties, bCanSetLocalProperties )
%>
	<!-- Standard Tab Form -->
	<form name="WBC_formStandardProps">
		<table border="0" cellspacing="0" cellpadding="0" width="<%= ID_PROPS_TAB_CONTENT_WIDTH %>">

			<!-- Begin Properties Content in Standard Tab -->
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="5">
						<% Call WBC_writePropsDescriptionHTML( pThisObject, bCanSetSharedProperties ) %>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<% Call WBC_writePropsPublishingOptionsHTML() %>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<td>
							<table width="100%" border="0" cellspacing="0" cellpadding="4">
								<% Call WBC_writeStartDateHTML( pThisObject, bCanSetLocalProperties ) %>
								<% Call WBC_writeExpiryDateHTML( pThisObject, bCanSetLocalProperties ) %>
								<tr class="WBC_styclsBackground2">
									<td  colspan="2"><IMG height="5" src="<%= IDS_TRANSPARENT_GIF %>" border="0"></td>
								</tr>
								<% Call WBC_writePropsOwnerHTML( pThisObject ) %>
								<% Call WBC_writePropsLastModifiedDateHTML( pThisObject ) %>
							</table>
						</td>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<% Call WBC_writePropsNativeFlagsHTML( pThisObject, bCanSetLocalProperties ) %>
					</table>
				</td>
			</tr>
			<!-- End of Properties Content in Standard Tab -->

		</table>
	</form>
<%
End Sub


' ---- [Private] Write Channel/Page description html tags
Sub WBC_writePropsDescriptionHTML( pThisObject, bCanSetSharedProperties )
	Dim strDescription
    Dim pASPUtils
    Set pASPUtils = GetInitializedASPUtils()
	strDescription = pASPUtils.HTMLEncode(pThisObject.Description)

	Dim lCodePage
	lCodePage = pThisObject.CodePage
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1" width="30%">
			Description:
<%			If pThisObject.IsPosting Then
				If pThisObject.IsConnected Then %>
					<img border=0 src=<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_SHARABLE %> alt="<%= IDS_UI_TOOLTIP_SHARED_PROPERTY %>">
<%				End If
			End If %>
		</td>
		<td class="WBC_styclsTextColor1" width="70%">
		<% If bCanSetSharedProperties Then %>
			<textarea class="WBC_styclsInputField" name="WBC_txtareaDescription"
				cols="<%= IIf(IsIE, ID_UI_TEXTAREA_COLS_IE, ID_UI_TEXTAREA_COLS_NS) %>"
				rows="<%= IIf(IsIE, ID_UI_TEXTAREA_ROWS_IE, ID_UI_TEXTAREA_ROWS_NS) %>"
				wrap="soft"><% Call pASPUtils.MBCSWrite(strDescription, lCodePage) %></textarea>
			<input type="hidden" name="WBC_txtareaDescription_original"
					value="<% Call pASPUtils.MBCSWrite(strDescription, lCodePage) %>">
		<% Else
			Call pASPUtils.MBCSWrite(strDescription, lCodePage)
		End If %>
		</td>
	</tr>
<%
End Sub


' ---- [Private] Write page description html tags
Sub WBC_writePropsPublishingOptionsHTML()
%>
	<tr>
		<td width="240"><hr></td>
		<td class="WBC_styclsHeavyTextColor1" width="150" height="100%" align="Center">Publishing Options</td>
		<td width="240"><hr></td>
	</tr>
<%
End Sub


' ---- [Private] Write page latest modified date html tags
Sub WBC_writePropsLastModifiedDateHTML( pThisObject )
	Dim strLastModifiedDate
	strLastModifiedDate = FormatDate( pThisObject.LastModifiedDate )
%>
	<tr>
		<td class="WBC_styclsHeavyTextColor1">
			Modified:
		</td>
		<td class="WBC_styclsTextColor1">
			<script language="JavaScript" type="text/javascript">
				<!--
					WBC_writeUTC2Local( "<%= strLastModifiedDate %>" )
				// -->
			</script>
		</td>
	</tr>
<%
End Sub


' ---- [Private] Write channel/page owner html tags
Sub WBC_writePropsOwnerHTML( pThisObject )
	Dim pUser
	Dim strOwner
	Set pUser = pThisObject.OwnedBy
	strOwner = pUser.FullName
	
	Dim pASPUtils
	Set pASPUtils = GetInitializedASPUtils()
	
	Dim lCodePage
	lCodePage = pThisObject.CodePage
%>
	<tr>
		<td class="WBC_styclsHeavyTextColor1">
			Owner:
		</td>
		<td class="WBC_styclsTextColor1">
			<%= pASPUtils.MBCSWrite(pASPUtils.HTMLEncode(strOwner), lCodePage) %>
		</td>
	</tr>
<%
End Sub


' ---- [Private] Write Channel/Page Native Flag Properties html tags
Sub WBC_writePropsNativeFlagsHTML( pThisObject, bCanSetLocalProperties )
	Dim strIsImportLabel
	Dim strIsRobotIndexableLabel
	Dim bIsFramedChannel

	If pThisObject.IsChannel Then
		strIsImportLabel = IDS_UI_PROPS_LABEL_ISIMPORTANT_CHANNEL
		strIsRobotIndexableLabel = IDS_UI_PROPS_LABEL_ISROBOTINDEXABLE_Channel
		bIsFramedChannel = pThisObject.IsFramed
	Else
		strIsImportLabel = IDS_UI_PROPS_LABEL_ISIMPORTANT_PAGE
		strIsRobotIndexableLabel = IDS_UI_PROPS_LABEL_ISROBOTINDEXABLE_PAGE
		bIsFramedChannel = true
	End If
%>
	<tr class="WBC_styclsBackground2" valign="top">
<%		Call WBC_writeNativeFlagsCheckedBox("WBC_inchkIsImportant", _
						strIsImportLabel, _
						bCanSetLocalProperties, _
						pThisObject.IsImportant)
	If (bIsFramedChannel) Then
		Call WBC_writeNativeFlagsCheckedBox("WBC_inchkIsRobotFollowable", _
											IDS_UI_PROPS_LABEL_ISROBOTFOLLABLE, _
											bCanSetLocalProperties, _
											pThisObject.IsRobotFollowable)
	End If %>
	</tr>
	<tr class="WBC_styclsBackground2" valign="top">
<%		Call WBC_writeNativeFlagsCheckedBox("WBC_inchkIsHiddenModePublished", _
											IDS_UI_PROPS_LABEL_ISHIDDENMODEPUBLISHED, _
											bCanSetLocalProperties, _
											pThisObject.IsHiddenModePublished)
	If (bIsFramedChannel) Then
		Call WBC_writeNativeFlagsCheckedBox("WBC_inchkIsRobotIndexable", _
											strIsRobotIndexableLabel, _
											bCanSetLocalProperties, _
											pThisObject.IsRobotIndexable)
	End If %>
	</tr>
<%
End Sub


' ---- [Private]	Write Each Native Flag Properties html tags
Sub WBC_writeNativeFlagsCheckedBox( strNativeFlagsName, strNativeFlagsLabel, bCanSetLocalProperties, bResult )
%>
	<td class="WBC_styclsHeavyTextColor1">
<%	If bCanSetLocalProperties Then %>
		<input class="WBC_styclsInputField" type="checkbox" name="<%= strNativeFlagsName %>" value="true"
				 <% If bResult Then %>Checked<% End If %>>
			<%= strNativeFlagsLabel %>
		<% Call WBC_writeHiddenFieldInHTML(strNativeFlagsName & "_original", bResult) %>
<%	Else  %>
		<td class="WBC_styclsHeavyTextColor1">
			&nbsp;<%= strNativeFlagsLabel %>:
		</td>
		<td class="WBC_styclsTextColor1" width="28">
<%
		If bResult Then
			Response.Write("Yes")
		Else
			Response.Write("No")
		End If
	End If
%>
		</td>
	</td>
<%
End Sub


' ---- [Private]	Write start date html tags
Sub WBC_writeStartDateHTML( pThisObject, bCanSetLocalProperties )
	Dim strStartDate
	strStartDate = FormatDate(pThisObject.StartDate)
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1" nowrap width>
			Start Publishing:
		</td>
<%	If bCanSetLocalProperties Then %>
		<td class="WBC_styclsTextColor1" nowrap>
			<input class="WBC_styclsInputField" type="radio" name="WBC_inradioStartDate" value="" checked>&nbsp;
				Immediately
		</td>
	</tr>
	<tr class="WBC_styclsBackground2" valign="top">
		<td>&nbsp;</td>
		<td class="WBC_styclsTextColor1" nowrap>
			<input class="WBC_styclsInputField" type="radio" name="WBC_inradioStartDate" value="<%=strStartDate %>">
			<select class="WBC_styclsInputField" name="WBC_selStartMonth" size="1" onchange="g_pradioStartDate[1].checked=true">
				<%	Call WBC_writeMonthList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selStartDay" size="1" onchange="g_pradioStartDate[1].checked=true">
				<%	Call WBC_writeDayList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selStartYear" size="1" onchange="g_pradioStartDate[1].checked=true">
				<%	Call WBC_writeYearList() %>
			</select>
			&nbsp;
			<select class="WBC_styclsInputField" name="WBC_selStartHours" size="1" onchange="g_pradioStartDate[1].checked=true">
				<%	Call WBC_writeHoursList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selStartMinutes" size="1" onchange="g_pradioStartDate[1].checked=true">
				<%	Call WBC_writeMinutesList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selStartAmPm" size="1" onchange="g_pradioStartDate[1].checked=true">
				<option value="am">am</option>
				<option value="pm">pm</option>
			</select>
		</td>
		<% Call WBC_writeHiddenFieldInHTML("WBC_inradioStartDate_original", strStartDate)
	Else %>
		<td class="WBC_styclsTextColor1" nowrap>
			<%
			'	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_writeStartDate("<%= strStartDate %>");
				// -->
				</script>
			<%	End If %>
		</td>
<%	End If %>
	</tr>
<%
End Sub


' ---- [Public]	Write expiry date html tags
Sub WBC_writeExpiryDateHTML( pThisObject, bCanSetLocalProperties )
	Dim strExpiryDate
	strExpiryDate = FormatDate(pThisObject.ExpiryDate)
%>
	<tr class="WBC_styclsBackground2" valign="top">
		<td class="WBC_styclsHeavyTextColor1" nowrap>
			Stop Publishing:
		</td>
<%	If bCanSetLocalProperties Then %>
		<td class="WBC_styclsTextColor1" nowrap>
			<input class="WBC_styclsTextColor1" type="radio" name="WBC_inradioExpiryDate"
					value="Jan 01 3000 00:00:00" checked>&nbsp;
				Never
		</td>
	</tr>
	<tr class="WBC_styclsBackground2" valign="top">
		<td>&nbsp;</td>
		<td class="WBC_styclsTextColor1" nowrap>
			<input class="WBC_styclsInputField" type="radio" name="WBC_inradioExpiryDate"
				value="<%= strExpiryDate %>">
			<select class="WBC_styclsInputField" name="WBC_selExpiryMonth" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<%	Call WBC_writeMonthList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selExpiryDay" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<%	Call WBC_writeDayList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selExpiryYear" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<%	Call WBC_writeYearList() %>
			</select>
			&nbsp;
			<select class="WBC_styclsInputField" name="WBC_selExpiryHours" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<%	Call WBC_writeHoursList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selExpiryMinutes" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<%	Call WBC_writeMinutesList() %>
			</select>
			<select class="WBC_styclsInputField" name="WBC_selExpiryAmPm" size="1" onchange="g_pradioExpiryDate[1].checked=true">
				<option value="am">am</option>
				<option value="pm">pm</option>
			</select>
		</td>
<%			Call WBC_writeHiddenFieldInHTML("WBC_inradioExpiryDate_original", strExpiryDate)
	Else %>
		<td class="WBC_styclsTextColor1" nowrap>
			<%
				If pThisObject.ExpiryDate = DATE_NEVER Then
					Response.Write("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_writeExpiryDate("<%= strExpiryDate %>");
					// -->
					</script>
			<%
					End If
				End If
			%>
		</td>
<%	End If %>
	</tr>
<%
End Sub


' ---- [Private] Write option list for months
Sub WBC_writeMonthList()
	Dim i
	For i = 0 to 11
%>
				<option value="<%= i+1 %>"><%= IDCOL_MONTH(i) %></option>
<%
	Next
End Sub

' ---- [Private] Write option list for days
Sub WBC_writeDayList()
	Dim i
	For i = 1 to 31
		If i < 10 Then
%>
				<option value="<%= i %>">0<%= i %></option>
<%		Else %>
				<option value="<%= i %>"><%= i %></option>
<%
		End If
	Next
End Sub


' ---- [Private] Write option list for years
Sub WBC_writeYearList()
	Dim i
	For i = 1997 to 2010
%>
				<option value="<%= i %>"><%= i %></option>
<%
	Next
End Sub


' ---- [Private] Write option list for hours
Sub WBC_writeHoursList()
%>
				<option value="12">12</option>
<%
	Dim i
	For i = 1 to 11
		If i < 10 Then
%>
				<option value="<%= i %>">0<%= i %></option>
<%		Else %>
				<option value="<%= i %>"><%= i %></option>
<%
		End If
	Next
End Sub


' ---- [Private]	Write option list for minutes
Sub WBC_writeMinutesList()
	Dim i
	For i = 0 to 59
		If i < 10 Then
%>
				<option value="<%= i %>">0<%= i %></option>
<%		Else %>
				<option value="<%= i %>"><%= i %></option>
<%
		End If
	Next
End Sub


'======================================================================
' For Properties Custom Tab
'	Public Function
'		Sub WBC_WBC_writeCustomTabHTML()
'
'	Private Function:
'		Sub WBC_writeScrollBarInCustomTabHTML()
'======================================================================

' ---- [Public] Write Custom Tab content html tags
Sub WBC_writeCustomTabHTML( pGridControl )

	If (isIE) Then
%>
		<!-- Create the outer and inner area for the scroller bar -->
		<div id="WBCCustomTabOuterList" style="position: absolute; top: 20; left: 20; width: 590;
						height: 310; overflow: scroll;background-color: #EEEEEE">
			<!-- Custom Tab Form -->
			<form name="WBC_formCustomProps">

				<!-- Begin to Grid Decorator Content in Custom Tab -->
				<% Call pGridControl.DisplayGrid %>
				<!-- End of Grid Decorator Content in Custom Tab -->

			</form>
		</div>
<%	Else %>
		<div id="WBCCustomTabOuterList" style="position: absolute; top: 20; left: 20; width: 580;
						height: 310; clip: rect(0 580 310 0); layer-background-color: #EEEEEE">
			<div id="WBCCustomTabInnerList" style="position: absolute; width: 580;">

				<!-- Custom Tab Form -->
				<form name="WBC_formCustomProps">

					<!-- Begin to Grid Decorator Content in Custom Tab -->
					<% Call pGridControl.DisplayGrid %>
					<!-- End of Grid Decorator Content in Custom Tab -->

				</form>
			</div>
		</div>

		<!-- Begin to write the scrollbar -->
		<% Call WBC_writeScrollBarInCustomTabHTML() %>
		<!-- End of write the scrollbar -->

<%	End If %>
	<!-- End of Properties Content in Standard Tab -->
<%
End Sub


' ---- [Private] Write scroll bar html tags for netscape only
Sub WBC_writeScrollBarInCustomTabHTML()
%>

	<layer left="600" top="20">
		<a href="#" onclick="return false"
				onmousedown="return WBC_doListViewScrollerUp()"
				onmouseout="clearInterval(sRepeat)">
			<img src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_UPARROW %>" border="1" alt=""></a>
	</layer>

	<layer left="600" top="313">
		<a href="#" onclick="return false"
				onmousedown="return WBC_doListViewScrollerDown()"
				onmouseout="clearInterval(sRepeat)">
			<img src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_DOWNARROW %>" border="1" alt=""></a>
	</layer>
	<layer left="600" top=38" bgcolor="#778899">
		<td>
			<img src="<%= IDS_TRANSPARENT_GIF %>" width="13" height="272" border="0" alt=""></a>
		</td>
	</layer>
<%
End Sub


'======================================================================
' For Properties General Function
'	Public Function:
'
'	Private Function:
'		Sub WBC_writeTabBackGroundHTML(nWidth, nHeight)
'		Sub WBC_writeHiddenFieldInSubmitForm(pThisObject, bCanSetSharedProperties,
'											bCanSetLocalProperties)
'		Sub WBC_writeHiddenFieldInHTML(strPropsName, strPropsValue)
'		Sub WBC_showFailToSaveDialog(pThisObject)
'======================================================================

'----[Private] Write the tab background
Sub WBC_writeTabBackGroundHTML( nWidth, nHeight )
%>
	<table width="<%= nWidth %>"  border="0" cellpadding="0" cellspacing="0">
		<tr><td class="WBC_styclsBackground1" width="<%= nWidth %>" height="2">
				<spacer type="block" width="<%= nWidth %>" height="2"></td></tr>
	</table>
	<table width="<%= nWidth %>"  border="0" cellpadding="0" cellspacing="0">
		<tr><td class="WBC_styclsBackground1" width="2" height="<%= nHeight %>">
				<spacer type="block" width="2" height="<%= nHeight %>">
			</td>
			<td class="WBC_styclsBackground2" width="<%= nWidth %>" height="<%= nHeight %>">
				<spacer type="block" width="<%= nWidth - 5 %>" height="<%= nHeight %>">
			</td>
			<td class="WBC_styclsBackground1" width="2" height="<%= nHeight %>">
				<spacer type="block" width="2" height="<%= nHeight %>">
			</td></tr>
	</table>
	<table width="<%= nWidth %>" border="0" cellpadding="0" cellspacing="0">
		<tr><td class="WBC_styclsBackground1" width="<%= nWidth %>" height="2">
				<spacer type="block" width="<%= nWidth %>" height="2"></td></tr>
	</table>
<%
End Sub


' ---- [Private] Write the hidden field for all properties items
Sub WBC_writeHiddenFieldInSubmitForm( pThisObject, bCanSetSharedProperties, bCanSetLocalProperties )
	Dim pASPUtils
	Set pASPUtils = GetInitializedASPUtils()

	' write hidden field for the submit form
	Call WBC_writeHiddenFieldInHTML("WBC_inhidProperties", "")

	' write hidden field for page charset
	Call WBC_writeHiddenFieldInHTML("WBC_inhidPageCharset", g_strCharSet)

	' write hidden fields base on pThisObject.CanSetSharedProperties such as Name and Eop
	If (bCanSetSharedProperties) Then
		Dim i
		Dim colEops
		Dim strEopId
		Dim strEopEnumValue

		Set colEops = pThisObject.CustomProperties

		' write hidden fields for EOP
		For i = 0 To colEops.Count - 1
			strEopId = "WBC_intxtEop_" & i
			strEopEnumValue = WBC_getEopEnumValueString( colEops(i) )
			%><input type="hidden" name="<%= strEopId & "_listvalue" %>"  value="<% Call pASPUtils.MBCSWrite( strEopEnumValue, g_nCodePage ) %>"><%
		Next
	End If
%>
<%
End Sub


' ---- [Private] Construct a string which contains all the list value of an EOP
Function WBC_getEopEnumValueString( pEop )
	Dim i
	Dim strAllowValue

	Dim pASPUtils
	Set pASPUtils = GetInitializedASPUtils()

	' concat each value of the list into a string
	strAllowValue = ""

	' Notes: Since we need to support empty string in the Eop value of the "Selection" type,
	' when constructing the string of the Eop list (i.e., strAllowValue), each Eop available value
	' should wrap with a single quote in order to support empty string. If the string list doesn't
	' contain the single quote, the client side scripting won't contain the empty string value
	' when retrieving the Eop value with a empty string.
	For i=0 To pEop.AllowedValues.Count - 1

		' wrap each Eop value with a single quote and concat as as string
		strAllowValue = strAllowValue & "'" & pASPUtils.HTMLEncode( pEop.AllowedValues(i) ) & "'"

		' get rid of the last vbCrLf
		If (i <> pEop.AllowedValues.Count - 1) Then
			strAllowValue = strAllowValue & vbCrLf
		End If
	Next

	WBC_getEopEnumValueString = strAllowValue
%>
<%
End Function


' ---- [Private] Write the hidden field for a specified property item
Sub WBC_writeHiddenFieldInHTML( strPropsName, strPropsValue )
%>	<input type="hidden" name="<%= strPropsName %>"  value="<%= strPropsValue %>">
<%
End Sub


' ---- [Public] write HTML for Eop Name with supporting Multi-Byte Character Set
'				 If the name is long the ID_MAX_NO_OF_NAME_CHAR (i.e., 15 characters)
'                and bTruncated = true, then truncate the name.
Sub WBC_writeMBCSEopName( pEop, bTruncated )
	Dim pASPUtils
	Set pASPUtils = GetInitializedASPUtils()

	Dim strEopName
	If (Len(pEop.Name) > ID_MAX_NO_OF_NAME_CHAR) And (bTruncated) Then
		' return a truncated name
		strEopName = pASPUtils.HTMLEncode(Left(pEop.Name, ID_MAX_NO_OF_NAME_CHAR) & "...")
	Else
		' return the original name
		strEopName = pASPUtils.HTMLEncode(pEop.Name)
	End If

	Call pASPUtils.MBCSWrite(strEopName, g_nCodePage)
End Sub


' ---- [Public] return the Eop is a "Value List" or "Text"
Function WBC_getEopType( pEop )
	Dim strEopType

	If (pEop.AllowedValues.Count > 0) Then
		strEopType = IDS_UI_DISPLAY_EOP_SELECTION
	Else
		strEopType = IDS_UI_DISPLAY_EOP_TEXT
	End If

	WBC_getEopType = strEopType
End Function


' ---- [Public] write HTML for Eop value with supporting Multi-Byte Character Set
Sub WBC_WriteMBCSEopValue( strEopValue )
	Dim pASPUtils
	Set pASPUtils = GetInitializedASPUtils()

	Dim strResultValue
	strResultValue = pASPUtils.HTMLEncode(strEopValue)

	Call pASPUtils.MBCSWrite(strResultValue, g_nCodePage)
End Sub


%>


