<!--#include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/CommonAuthoringPlaceholderUIStrings.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."
' ********************************************************************

' -----------------------------------------------------------------------------
'
'	See OptionsServer.inc for details of whether EmitterThinEditIE_ActiveX.inc
'	or EmitterThinEditIE_DHTML.inc will be included
'
' -----------------------------------------------------------------------------

Const IDS_PATH_PH_IMAGES = "/Internals/PageTemplate/PlaceholdersSupport/Images/"

' ---- [Private] This subroutine writes placeholder content for Thin Client editing.
Sub EmitPh4ThinEdit(pThisPosting, PlaceholderEmitter)
	' temporary shut down propogation of wbc_purpose because we don't want
	' hyperlinks to other postings to contain a purpose WBC editing.
	' If we left the purpose, hyperlinks in preview mode would show the WBC console.
	Call DisableROMPropagationPolicyForWBCMode()

	If IsSingleLineText(PlaceholderEmitter.pPlaceholder) Then
		Call EmitPh4ThinSingleLine(pThisPosting, PlaceholderEmitter)
	ElseIf IsMultiLineText(PlaceholderEmitter.pPlaceholder) Then
		Call EmitPh4ThinMultiLine(pThisPosting, PlaceholderEmitter)
	ElseIf IsSingleImage(PlaceholderEmitter.pPlaceholder) Then
		Call EmitPh4ThinSingleImg(pThisPosting, PlaceholderEmitter)
	ElseIf IsSingleAttachment(PlaceholderEmitter.pPlaceholder) Or IsSingleVideo(PlaceholderEmitter.pPlaceholder) Then
		Call EmitPh4ThinSingleAttach(pThisPosting, PlaceholderEmitter)
	Else
		Call EmitPh4ThinMultiPurpose(pThisPosting, PlaceholderEmitter)
	End If

	' This will keep a count of the placeholders emitted in the form and store the placeholder name
	Call RegisterPlaceholderInThinEditForm( PlaceholderEmitter.pPlaceholder )

	' restore propagation of wbc_purpose query string parameter value for the rest of the world
	Call SetROMPropagationPolicyForWBCMode()
End Sub


' ---- [Private] This subroutine writes placeholder content for Single Line placeholder.
Sub EmitPh4ThinSingleLine( pThisPosting, PlaceholderEmitter )
%>
	<table border="0" cellpadding="0" cellspacing="0">

<%
	If OnInternalBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) And _
		OnBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) Then
%>
		<tr>
			<td align="right" bgcolor="#dedfde"><% Call ShowPhCapIcons(PlaceholderEmitter.pPlaceholder) %></td>
		</tr>
<%	End If %>

		<tr>
		    <td><input type="text"
					name="NCPH_<%= PlaceholderEmitter.pPlaceholder.Name %>"
					size="<%= PlaceholderEmitter.Columns%>"
<%
				If InternalShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) And _
					ShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) Then
%>
					style='<%= PlaceholderEmitter.Style %>'
				<% End If %>
					value="<%= GetFilteredPhHTML(PlaceholderEmitter.pPlaceholder) %>">
			</td>
		</tr>
	</table>
<%
End Sub


' ---- [Private] This subroutine writes placeholder content for Multi Line placeholder.
Sub EmitPh4ThinMultiLine(pThisPosting, PlaceholderEmitter)
	If InternalShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) And _
		ShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) Then
		Call EmitRichPh( pThisPosting, PlaceholderEmitter)
	Else
%>
	<table border="0" cellpadding="0" cellspacing="0">

<%
	If OnInternalBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) And _
		OnBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) Then
%>
		<tr>
			<td>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
					    <td rowspan="2" valign="bottom" nowrap><% Call ShowPhResBtns(pThisPosting, PlaceholderEmitter.pPlaceholder, IDS_PHTYPE_MULTILINETEXT) %></td>
						<td><img src="<%=IDS_TRANSPARENT_GIF%>" height="1" width="1"></td>
					</tr>
					<tr>
						<td align="right" bgcolor="#dedfde" width="99%"><% Call ShowPhCapIcons(PlaceholderEmitter.pPlaceholder) %></td>
					</tr>
				</table>
			</td>
		</tr>
<%		End If %>

		<tr>
		    <td><textarea name="NCPH_<%= PlaceholderEmitter.pPlaceholder.Name %>"
					cols="<%= PlaceholderEmitter.Columns %>"
					rows="<%= PlaceholderEmitter.Rows %>"
<%
				If InternalShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) And _
					ShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) Then
%>
					style='<%= PlaceholderEmitter.Style %>'
				<% End If %>
					wrap="virtual"><%= GetFilteredPhHTML(PlaceholderEmitter.pPlaceholder) %></textarea>
			</td>
		</tr>
	</table>
<%
	End If
End Sub


' ---- [Private] This subroutine writes placeholder content for Single Image placeholder.
Sub EmitPh4ThinSingleImg(pThisPosting, PlaceholderEmitter)
	Dim strPhName
	Dim strPhValue
    Dim pASPUtils

	strPhName = PlaceholderEmitter.pPlaceholder.Name
	strPhValue = ImageSRC(PlaceholderEmitter.pPlaceholder)
    Set pASPUtils = GetInitializedASPUtils()
%>
	<table border="0" cellpadding="0" cellspacing="0">

<%
	If OnInternalBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) And _
		OnBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) Then
%>
		<tr>
			<td>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
					    <td rowspan="2" valign="bottom" nowrap><% Call ShowPhResBtns(pThisPosting, PlaceholderEmitter.pPlaceholder, IDS_PHTYPE_SINGLEIMAGE) %></td>
						<td><img src="<%=IDS_TRANSPARENT_GIF%>"
									height="1" width="1"></td>
					</tr>
					<tr>
						<td align="right" bgcolor="#dedfde" width="99%"><% Call ShowPhCapIcons(PlaceholderEmitter.pPlaceholder) %></td>
					</tr>
				</table>
			</td>
		</tr>
<%	End If %>

		<tr>
<%
	' Netscape3 has problems swapping images in nested tables,
	' so we degrade to using input box to show selected image
	If isNetscape And browserVer < 4 Then

		Dim strDisplay

		If strPhValue = "" Then
			strDisplay = IDS_NO_IMAGE
		Else
			strDisplay = Mid(strPhValue, InStrRev(strPhValue, "/") + 1)
		End If
%>
		    <td><input type="text"
					name="NCPHImgNS3_<%= strPhName %>"
					value="<%= strDisplay%>"
					onfocus='document.NC_EditForm["NCPHImgNS3_<%= strPhName %>"].blur()'
				><input type="hidden"
					name="NCPH_<%= strPhName %>" value="<%= strPhValue %>"
				><input type="hidden"
					name="NCPHHRef_<%= strPhName %>"
					value="<%=HyperlinkHREF(PlaceholderEmitter.pPlaceholder)%>"
				><input type="hidden"
					name="NCPHAltText_<%= strPhName %>"
					value="<%= pASPUtils.HTMLEncode(ImageALT(PlaceholderEmitter.pPlaceholder))%>"
				></td>
<%
	Else
		Dim strImgSrc

		' put up default image if src is blank
		If strPhValue = "" Then
			strImgSrc = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "InsertImageHere.gif"
		Else
			strImgSrc = strPhValue
		End If
%>
		    <td>
				<table border="1" cellpadding="0" cellspacing="0">
					<tr>
						<td><img name="NCPHImg_<%= strPhName %>" src="<%=strImgSrc%>" border="0"
							><input type="hidden"
								name="NCPH_<%= strPhName %>"
								value="<%= strPhValue %>"
							><input type="hidden"
								name="NCPHHRef_<%= strPhName %>"
								value="<%=HyperlinkHREF(PlaceholderEmitter.pPlaceholder)%>"
							><input type="hidden"
								name="NCPHAltText_<%= strPhName %>"
								value="<%=pASPUtils.HTMLEncode(ImageALT(PlaceholderEmitter.pPlaceholder))%>"
							></td>
					</tr>
				</table>
			</td>
<%
	End If
%>
		</tr>
	</table>
<%
End Sub


' ---- [Private] This subroutine writes placeholder content for Single Attachment placeholder.
Sub EmitPh4ThinSingleAttach(pThisPosting, PlaceholderEmitter)
	Dim strPhName
	Dim strPhValue
    Dim pASPUtils

	strPhName = PlaceholderEmitter.pPlaceholder.Name
	strPhValue = AttachmentURL(PlaceholderEmitter.pPlaceholder)
    Set pASPUtils = GetInitializedASPUtils()
%>
	<table border="0" cellpadding="0" cellspacing="0">
<%
	If OnInternalBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) And _
		OnBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) Then
%>
		<tr>
			<td>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
					    <td rowspan="2" valign="bottom" nowrap><% Call ShowPhResBtns(pThisPosting, PlaceholderEmitter.pPlaceholder, IDS_PHTYPE_SINGLEATTACHMENT) %></td>
						<td><img src="<%=IDS_TRANSPARENT_GIF%>" height="1" width="1"></td>
					</tr>
					<tr>
						<td align="right" bgcolor="#dedfde" width="99%"><% Call ShowPhCapIcons(PlaceholderEmitter.pPlaceholder) %></td>
					</tr>
				</table>
			</td>
		</tr>
<%	End If %>

		<tr>
		    <td><input type="text"
					name="NCPHAttach_<%= strPhName %>"
					value="<% Call ShowAttachmentValue(PlaceholderEmitter.pPlaceholder) %>"
					size="<%= ID_SINGLEATTACHMENT_WIDTH %>"
					onfocus='document.NC_EditForm["NCPHAttach_<%= strPhName %>"].blur()'
				><input type="hidden"
					name="NCPH_<%= strPhName %>" value="<%= strPhValue %>"
				><input type="hidden"
					name="NCPHDispText_<%= strPhName %>"
					value="<%=pASPUtils.HTMLEncode(AttachmentContent(PlaceholderEmitter.pPlaceholder))%>"></td>
		</tr>
	</table>
<%
End Sub


' ---- [Private] This subroutine writes placeholder content for MultiPurpose placeholder.
Sub EmitPh4ThinMultiPurpose(pThisPosting, PlaceholderEmitter)
	If InternalShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) And _
		ShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) Then
		Call EmitRichPh( pThisPosting, PlaceholderEmitter)
	Else
%>
	<table border="0" cellpadding="0" cellspacing="0">

<%
	If OnInternalBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) And _
		OnBeforeRenderWBCAuthoringPhToolbar(pThisPosting, PlaceholderEmitter.pPlaceholder) Then
%>
		<tr>
			<td>
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
					    <td rowspan="2" valign="bottom" nowrap><% Call ShowPhResBtns(pThisPosting, PlaceholderEmitter.pPlaceholder, IDS_PHTYPE_MULTIPURPOSE) %></td>
						<td><img src="<%=IDS_TRANSPARENT_GIF%>" height="1" width="1"></td>
					</tr>
					<tr>
						<td align="right" bgcolor="#dedfde" width="99%"><% Call ShowPhCapIcons(PlaceholderEmitter.pPlaceholder) %></td>
					</tr>
				</table>
			</td>
		</tr>
<%		End If %>

		<tr>
		    <td><textarea name="NCPH_<%= PlaceholderEmitter.pPlaceholder.Name %>"
					cols="<%= PlaceholderEmitter.Width %>"
					rows="<%= PlaceholderEmitter.Height %>"
<%
				If InternalShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) And _
					ShouldRenderRichEditPlaceholder( pThisPosting, PlaceholderEmitter.pPlaceholder ) Then
%>
					style='<%= PlaceholderEmitter.Style %>'
				<% End If %>
					wrap="virtual"><%= GetFilteredPhHTML(PlaceholderEmitter.pPlaceholder) %></textarea></td>

		</tr>
	</table>
<%
	End If
End Sub

' ---- [Private] Retrieves placeholder HTML with illegal content filtered out
Function GetFilteredPhHTML( pPlaceholder )
    Dim pASPUtils
    Set pASPUtils = GetInitializedASPUtils()
	If IsMultiPurpose(pPlaceholder) Or _
		(IsMultiLineText(pPlaceholder) And _
		InternalShouldRenderRichEditPlaceholder( AutoSession.This, pPlaceholder ) And _
		ShouldRenderRichEditPlaceholder( AutoSession.This, pPlaceholder )) Then

		GetFilteredPhHTML = pASPUtils.HTMLEncode( pPlaceholder.GetHTML(True) )
	Else
		GetFilteredPhHTML = pASPUtils.HTMLEncode( pPlaceholder.GetHTML(True, True) )
	End If
End Function


' ---- [Private] Shows placeholder resource icons to launch image, video and attachment gallery.
Sub ShowPhResBtns(pThisPosting, pPlaceholder, strPhType)
	Dim strPostingQueryString
	strPostingQueryString = pThisPosting.QueryString

	' Show Image Button
	If pPlaceholder.AllowsImages Then
		Call ShowImageBtn(strPostingQueryString, pPlaceholder, strPhType)
		Call WriteSpacingForBtnIcon()
	End If

	' Show Image Propertes and Image Remove Button
	If IsSingleImage(pPlaceholder) Then
		Call ShowImagePropsBtn(strPostingQueryString, pPlaceholder)
		Call WriteSpacingForBtnIcon()
		Call ShowImageRemoveBtn(strPostingQueryString, pPlaceholder)
		Call WriteSpacingForBtnIcon()
	End If

	' Show Video Button
	If AllowsVideos(pPlaceholder) Then
		Call ShowVideoBtn(strPostingQueryString, pPlaceholder, strPhType)
		Call WriteSpacingForBtnIcon()
	End If

	' Show Attachment and Attachment Properties Button
	If AllowsAttachments(pPlaceholder) Then
		Call ShowAttachmentBtn(strPostingQueryString, pPlaceholder, strPhType)
		Call WriteSpacingForBtnIcon()
		If IsSingleAttachment(pPlaceholder) Then
			Call ShowAttachPropsBtn(strPostingQueryString, pPlaceholder)
			Call WriteSpacingForBtnIcon()
		End If
	End If

	' Show Attachment Remove Button
	If IsSingleAttachment(pPlaceholder) Or IsSingleVideo(pPlaceholder) Then
		Call ShowAttachmentRemoveBtn(strPostingQueryString, pPlaceholder)
		Call WriteSpacingForBtnIcon()
	End If

	' Show Table Button
	If pPlaceholder.AllowsFormattedLists Then
		Call ShowTableBtn(strPostingQueryString, pPlaceholder, strPhType)
		Call WriteSpacingForBtnIcon()
	End If


End Sub

' ---- [Private] Checks if placeholder is SingleLineText
Function IsSingleLineText(pPlaceholder)
	IsSingleLineText = pPlaceholder.XIsSingleLineText
End Function

' ---- [Private] Checks if placeholder is MultiLineText
Function IsMultiLineText(pPlaceholder)
	IsMultiLineText = pPlaceholder.XIsMultiLineText
End Function

' ---- [Private] Checks if placeholder is sharable
Function IsSharable(pPlaceholder)
	IsSharable = pPlaceholder.IsShared
End Function

' ---- [Private] Checks if placeholder is SingleImage
Function IsSingleImage(pPlaceholder)
	IsSingleImage = pPlaceholder.XIsSingleImage
End Function

' ---- [Private] Checks if placeholder is SingleAttachment
Function IsSingleAttachment(pPlaceholder)
	IsSingleAttachment = pPlaceholder.XIsSingleAttachment
End Function

' ---- [Private] Checks if placeholder is SingleVideo
Function IsSingleVideo(pPlaceholder)
	IsSingleVideo = pPlaceholder.XIsSingleVideo
End Function

' ---- [Private] Checks if placeholder is MultiPurpose
Function IsMultiPurpose(pPlaceholder)
	IsMultiPurpose = pPlaceholder.XIsMultiPurpose
End Function

' ---- [Private] Retrieves placeholder layout width
'Function TextCOLS(pPlaceholder)
'       TextCOLS = pPlaceholder.XTextCOLS
'End Function

' ---- [Private] Retrieves placeholder layout height
'Function TextROWS(pPlaceholder)
'       TextROWS = pPlaceholderXTextROWS
'End Function

' ---- [Private] Retrieves placeholder style
'Function Style(pPlaceholder)
'       Style = pPlaceholder.XStyle
'End Function

' ---- [Private] Checks if placeholder allows videos
Function AllowsVideos(pPlaceholder)
	AllowsVideos = pPlaceholder.XAllowsVideos
End Function

' ---- [Private] Retrieves Image source from SingleImage placeholder
Function ImageSRC(pPlaceholder)
	ImageSRC = pPlaceholder.XImageSRC
End Function

' ---- [Private] Retrieves Image HyperLink from SingleImage placeholder
Function HyperlinkHREF(pPlaceholder)
	HyperlinkHREF = pPlaceholder.XHyperlinkHREF
End Function

' ---- [Private] Retrieves Image Alt Tag from SingleImage placeholder
Function ImageALT(pPlaceholder)
	ImageALT = pPlaceholder.XImageALT
End Function

' ---- [Private] Checks if placeholder allows attachments
Function AllowsAttachments(pPlaceholder)
	AllowsAttachments = pPlaceholder.XAllowsAttachments
End Function

' ---- [Private] Retrieves Display Text from SingleAttachment placeholder
Function AttachmentContent(pPlaceholder)
	AttachmentContent = pPlaceholder.XAttachmentContent
End Function

' ---- [Private] Retrieves Attachment URL from SingleAttachment placeholder
Function AttachmentURL(pPlaceholder)
	AttachmentURL = pPlaceholder.XAttachmentURL
End Function

' ---- [Private] Checks if placeholder displays attachment as icons
Function AttachmentsAsIcons(pPlaceholder)
	AttachmentsAsIcons = pPlaceholder.XAttachmentsAsIcons
End Function

' ---- [Private] Checks if placeholder allows content's source html to be edited
'Function AllowsHtmlSrcEditing(pPlaceholder)
'       AllowsHtmlSrcEditing = pPlaceholder.XAllowsHtmlSrcEditing
'End Function

' ---- [Private] This subroutine shows image buttons.
Sub ShowImageBtn (strPostingQueryString, pPlaceholder, strPhType)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconImg_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Image.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "ImageDown.gif"
%><a href="#" target="_self"
		onclick="WBC_launchImageGallery('<%= strPostingQueryString %>', '<%= strPhName %>', '<%= strPhType %>', <%= Bool2LCaseStr(pPlaceholder.XAllowsImageUpload) %>);return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_ADD_OR_EDIT_IMAGE %>" vspace="1"></a><%
End Sub

' ---- [Private] This subroutine shows remove image button.
Sub ShowImageRemoveBtn (strPostingQueryString, pPlaceholder)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconImgR_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "ResourceRemove.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "ResourceRemoveDown.gif"
%><a href="#" target="_self"
		onclick="WBC_removeSingleImage('<%= strPhName %>');return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_REMOVE_IMAGE %>" vspace="1"></a><%
End Sub


' ---- [Private] This subroutine shows image properties button.
Sub ShowImagePropsBtn (strPostingQueryString, pPlaceholder)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconPropI_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Properties.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "PropertiesDown.gif"
%><a href="#" target="_self"
		onclick='WBC_launchImageProperties("<%= strPostingQueryString %>", "<%= strPhName %>");return false'
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_EDIT_IMAGE_PROPS %>" vspace="1"></a><%
End Sub


' ---- [Private] This subroutine shows video button.
Sub ShowVideoBtn (strPostingQueryString, pPlaceholder, strPhType)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	Dim bUseImgTag

	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconVideo_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Video.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "VideoDown.gif"
	bUseImgTag = ( LCase(pPlaceholder.XEmbeddedVideoElement) = "img" )
%><a href="#" target="_self"
		onclick="WBC_launchVideoGallery('<%= strPostingQueryString %>', '<%= strPhName %>', '<%= strPhType %>', <%= Bool2LCaseStr(pPlaceholder.XAllowsAttachmentUpload) %>, <%= Bool2LCaseStr(bUseImgTag) %>);return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_ADD_OR_EDIT_VIDEO %>" vspace="1"></a><%
End Sub


' ---- [Private] This subroutine shows attachment button.
Sub ShowAttachmentBtn (strPostingQueryString, pPlaceholder, strPhType)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconAttach_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Attachment.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "AttachmentDown.gif"
%><a href="#" target="_self"
		onclick="WBC_launchAttachmentGallery('<%= strPostingQueryString %>', '<%= strPhName %>', '<%= strPhType %>', <%= Bool2LCaseStr(pPlaceholder.XAllowsAttachmentUpload) %>, <%= Bool2LCaseStr(pPlaceholder.XAttachmentsAsIcons) %>, <%= Bool2LCaseStr(AllowsVideos(pPlaceholder)) %>);return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_ADD_OR_EDIT_ATTACHMENT %>" vspace="1"></a><%
End Sub


' ---- [Private] This subroutine shows either the attachment value or if it is empty, the default text
Sub ShowAttachmentValue (pPlaceholder)
	Dim strPhValue
	strPhValue = AttachmentURL(pPlaceholder)

	If strPhValue = "" Then
		If IsSingleVideo(pPlaceholder) Then
			Response.Write(IDS_NO_VIDEO)
		ElseIf AllowsVideos(pPlaceholder) Then
			Response.Write(IDS_NO_ATTACHMENT_VIDEO)
		Else
			Response.Write(IDS_NO_ATTACHMENT)
		End If
	Else
		Response.Write(Mid(strPhValue, InStrRev(strPhValue, "/") + 1))
	End If
End Sub


' ---- [Private] This subroutine shows remove video/attachment button.
Sub ShowAttachmentRemoveBtn (strPostingQueryString, pPlaceholder)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconAttachR_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "ResourceRemove.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "ResourceRemoveDown.gif"
	If IsSingleVideo(pPlaceholder) Then
%><a href="#" target="_self"
		onclick="WBC_removeSingleAttachment('<%= strPhName %>', '<%= IDS_NO_VIDEO %>');return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_REMOVE_VIDEO %>" vspace="1"></a><%
	ElseIf AllowsVideos(pPlaceholder) Then
%><a href="#" target="_self"
		onclick="WBC_removeSingleAttachment('<%= strPhName %>', '<%= IDS_NO_ATTACHMENT_VIDEO %>');return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_REMOVE_ATTACTMENT_OR_VIDEO %>" vspace="1"></a><%
	Else
%><a href="#" target="_self"
		onclick="WBC_removeSingleAttachment('<%= strPhName %>', '<%= IDS_NO_ATTACHMENT %>');return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_REMOVE_ATTACHMENT %>" vspace="1"></a><%
	End If
End Sub


' ---- [Private] This subroutine shows attachment properties button.
Sub ShowAttachPropsBtn (strPostingQueryString, pPlaceholder)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconPropA_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Properties.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "PropertiesDown.gif"
%><a href="#" target="_self"
		onclick="WBC_launchAttachmentProperties('<%= strPostingQueryString %>', '<%= strPhName %>', <%= Bool2LCaseStr(pPlaceholder.XAttachmentsAsIcons) %>);return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_EDIT_ATTACHMENT_PROPS %>" vspace="1"></a><%
End Sub

' ---- [Private] This subroutine shows table button.
Sub ShowTableBtn(strPostingQueryString, pPlaceholder, strPhType)
	Dim strPhName
	Dim strIconName
	Dim strIconUpURL
	Dim strIconDownURL
	strPhName = pPlaceholder.Name
	strIconName = "NCPHIconTable_" & Server.HTMLEncode(strPhName)
	strIconUpURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Table.gif"
	strIconDownURL = IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "TableDown.gif"
%><a href="#" target="_self"
		onclick="WBC_launchTable('<%= strPostingQueryString %>', '<%= strPhName %>', '<%= strPhType %>');return false"
		onmousedown="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconDownURL %>')"
		onmouseup="WBC_changeImgSafe('<%= strIconName %>', '<%= strIconUpURL %>')"><img
			name="<%= strIconName %>" src="<%= strIconUpURL %>"
			border="0" alt="<%= IDS_UI_TOOLTIP_INSERT_TABLE %>" vspace="1"></a><%
End Sub


' ---- [Private] This subroutine writes spacing/gap for placeholder resource buttons/icons.
Sub WriteSpacingForBtnIcon()
%><img src="<%=IDS_TRANSPARENT_GIF%>" height="16" width="3"><%
End Sub


' ---- [Private] This subroutine shows text formatting icon tags for a placeholder
Sub ShowPhCapIcons(pPlaceholder)

	If pPlaceholder.AllowsFonts Then
		Call ShowAllowFullFormat()
	Else
		If pPlaceholder.AllowsText Then
			Call ShowAllowsTextIcon()
		End If

		If pPlaceholder.AllowsHeadings Then
			Call ShowAllowsHeadingsIcon()
		End If

		If pPlaceholder.AllowsTextMarkUp Then
			Call ShowAllowsTextMarkUpIcon()
		End If
	End If

	If pPlaceholder.AllowsHyperlinks Then
		Call ShowAllowHyperLinksIcon()
	End If

	If pPlaceholder.AllowsImages Then
		If IsSingleImage(pPlaceholder) Then
			Call ShowAllowSingleImageIcon()
		Else
			Call ShowAllowMultiImagesIcon()
		End If
	End If
	If AllowsVideos(pPlaceholder) Then
		If IsSingleAttachment(pPlaceholder) Or IsSingleVideo(pPlaceholder) Then
			Call ShowAllowSingleVideoIcon()
		Else
			Call ShowAllowMultiVideosIcon()
		End If
	End If
	If AllowsAttachments(pPlaceholder) Then
		If IsSingleAttachment(pPlaceholder) Then
			Call ShowAllowSingleAttachIcon()
		Else
			Call ShowAllowMultiAttachIcon()
		End If
	End If

	'Show sharable icon
	If IsSharable(pPlaceholder) Then
		Call ShowSharableIcon()
	End If

	Call WriteSpacingForBtnIcon()

End Sub


' ---- [Private] This subroutine shows Allow Bold, Italics, Underline icon
Sub ShowAllowsTextMarkUpIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "BoldItalics.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_BOLD_ITALICS %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow HTML Styles icon
Sub ShowAllowsHeadingsIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "HTMLStyles.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_HTML_STYLES %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Plain Text icon
Sub ShowAllowsTextIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "PlainText.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_PLAIN_TEXT %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Full Format icon
Sub ShowAllowFullFormat()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "FullFormat.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_FULL_FORMAT %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Single Image icon
Sub ShowAllowSingleImageIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "SingleImage.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_IMAGE %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Multiple Images icon
Sub ShowAllowMultiImagesIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "MultipleImages.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_IMAGES %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Single Video icon
Sub ShowAllowSingleVideoIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "SingleVideo.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_VIDEO %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Multiple Videos icon
Sub ShowAllowMultiVideosIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "MultipleVideos.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_VIDEOS %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Single Attachment icon
Sub ShowAllowSingleAttachIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "SingleAttachment.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_ATTACHMENT %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Multiple Attachments icon
Sub ShowAllowMultiAttachIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "MultipleAttachments.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_ATTACTMENTS %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Hyperlink icon
Sub ShowAllowHyperLinksIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "Hyperlinks.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_ALLOW_HYPERLINKS %>" vspace="1"><%
End Sub


' ---- [Private] This subroutine shows Allow Hyperlink icon
Sub ShowSharableIcon()
%><img src="<%= IDS_FRAMEWORK_VIRTUAL_PATH & IDS_PATH_PH_IMAGES & "iconSharedBgWhite.gif" %>" border="0" alt="<%= IDS_UI_TOOLTIP_SHARED_PLACEHOLDER %>" vspace="1"><%
End Sub


%>