<%


' -----------------------------------------------------------------------------
'
'	This function is called to determine whether a placeholder should be 
'	rendered as the WYSIWYG rich editing placeholder. This is called in the
'	WBC Authoring mode for Multipurpose and Multiline types of placeholders.
'
'	@pThis [in] - the current posting 
'
'	@pPlaceholder[in] - the placeholder of this posting
'
'	@return - A boolean value to indicate whether rendering of the WYSIWYG
'				rich editing placeholder should proceed as normal.
'
' -----------------------------------------------------------------------------
Function ShouldRenderRichEditPlaceholder( pThis, pPlaceholder )
	' default implementation is to render the WYSIWYG rich editing
	' placeholders for IE browsers under Windows environment. 
	
	ShouldRenderRichEditPlaceholder = CBool( isIE And (browserVer > 3) And IsWindows )
End Function

' -----------------------------------------------------------------------------
'
'	This is the hook function being called before the toolbar attached above 
'	a placeholder is rendered in the WBC Authoring mode. Note that this toolbar
'	is the one attached above the placeholders, not the ActiveX toolbar 
'	attached top the top of the browser address bar.
'	This hook allows site or template designer or customize the toolbar or turn 
'	it off altogether.
'
'	@pThis [in] - the current posting 
'
'	@pPlaceholder[in] - the placeholder of this posting
'
'	@return - A boolean value to indicate whether rendering of the toolbar 
'				should proceed as normal.
'
' -----------------------------------------------------------------------------
Function OnBeforeRenderWBCAuthoringPhToolbar( pThis, pPlaceholder )

	' TODO: Custom Script

	' Return value determines whether toobar should be displayed
	'	TRUE (default): go ahead and display tool bar
	'	FALSE: do not display the tool bar

	OnBeforeRenderWBCAuthoringPhToolbar = True
End Function


' -----------------------------------------------------------------------------
'
'	This is the hook function being called before before a placeholder is 
'	rendered in some mode.
'
'	@pThis [in] - the current posting
'
'	@strPhName[in] - the placeholder name
'
'	@strEmitMode[in] - the emitting mode. Its possible values are: 
'				{ IDS_EMIT_THINEDIT, IDS_EMIT_WIN32EDIT, IDS_EMIT_VIEW, "" }
'
'	@return - A boolean value to indicate whether the placeholder rendering
'				should proceed as normal or not.
' -----------------------------------------------------------------------------
Function OnBeforeEmit( pThis, strPhName, strEmitMode )

	If strEmitMode = IDS_EMIT_THINEDIT Then
		' place custom code before placeholder emitted for ThinClient (WBC)
		
	ElseIf strEmitMode = IDS_EMIT_WIN32EDIT Then
		' place custom code before placeholder emitted for Win32 Client
	
	Else
		' place custom code before placeholder emitted for viewing
		
	End If
	
	' Return value determines whether emitting should be canceled:
	'	TRUE (default): go ahead with emitting 
	'	FALSE: cancel emitting
	OnBeforeEmit = True
End Function


' -----------------------------------------------------------------------------
'
'	This is the hook function being called before After a placeholder has been
'	emitted in some mode.
'
'	@pThis [in] - the current posting
'
'	@strPhName[in] - the placeholder name
'
'	@strEmitMode[in] - the emitting mode. Its possible values are: 
'				{ IDS_EMIT_THINEDIT, IDS_EMIT_WIN32EDIT, IDS_EMIT_VIEW, "" }
'
' ------------------------------------------------------------------------------
Sub OnAfterEmit( pThis, strPhName, strEmitMode )

	If strEmitMode = IDS_EMIT_THINEDIT Then
		' place custom code after placeholder emitted for ThinClient (WBC)
		
	ElseIf strEmitMode = IDS_EMIT_WIN32EDIT Then
		' place custom code after placeholder emitted for Win32 Client
	
	Else
		' place custom code after placeholder emitted for viewing
		
	End If

End Sub


' -----------------------------------------------------------------------------
'
'	This is the hook function being called before a placeholder is picking up 
'	the contents in the Authoring mode
'
'	@pPosting [in] - the current posting
'
'	@pPlaceholder[in] - the placeholder object
'
'	@return - A boolean value to indicate whether the setting of placeholder
'				content should proceed as normal.
'
' ------------------------------------------------------------------------------
Function OnBeforeSetPhContent( pPosting, pPlaceholder )

	' Return value determines whether placeholder contents should be updated:
	'	TRUE (default): go ahead to pick up the latest contents for the placeholder from screen
	'	FALSE: cancel 
	OnBeforeSetPhContent = True
End Function


' -----------------------------------------------------------------------------
'
'	This is the hook function being called before after a placeholder has picked up
'   the latest info from the the screen
'
'	@pPosting [in] - the current posting
'
'	@pPlaceholder[in] - the placeholder object
'
' ------------------------------------------------------------------------------
Sub OnAfterSetPhContent( pPosting, pPlaceholder )

	' TODO: Custom Script

End Sub



%>