<%
' *****************************************************************************
'
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	This file define the set of Hook functions that can be customized to
'	override the behavior of the Properties Page Dialog
'
'	The set of Hook functions exposed are:
'
'	- Sub OnInternalPropertiesDlgAddTab( pTabControl, pCurrentObject )
'	- Sub OnInternalAfterPropertiesSave( pASPPageManager )
'
' *****************************************************************************


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to insert extar Tabs in the
'	Properties dialog for Postings or Channels.
'
'	@pTabControl [in] - the TabControl class used in the dialog.
'
'	@pCurrentObject [in] - the current object (Posting or Channel) the dialog
'							is showing.
'
' -----------------------------------------------------------------------------
Sub OnInternalPropertiesDlgAddTab( ByVal pTabControl, ByVal pCurrentObject )
	' DEFAULT IMPLEMENTATION: do nothing


	' CUSTOM SCRIPT: to be customized by internal integration team
	If Not GetGlobalFeatureManager.FeatureIsRegistered( _
								IDS_FEATURE_CONNECTOR_PROFILEEDITOR ) Then
		Exit Sub
	End If

	' Add page profile tab for Content Connector profile
	Dim pProfileTab
	Set pProfileTab = New CNCTabRenderer_Profile
	Call pTabControl.AddTab(pProfileTab)

	'Output profile hidden form elements
	Dim pNRCSPosting
	Set pNRCSPosting = g_pNRCSSession.ThisPosting

	Dim g_pProfileEditor
	Set g_pProfileEditor = New NRCSProfileEditor

	Dim g_strPostingName
	g_strPostingName = pNRCSPosting.Posting.Name

	Call g_pProfileEditor.Initialize( pNRCSPosting )

	Call g_pProfileEditor.OutputPropertyAuthoringSheetHidden


End Sub


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to override the default
'	behavior of the CNCASPPageManager_SetProperties class for the saving of
'	properties for Postings or Channels.
'
'	@pASPPageManager [in] - the CNCASPPageManager_SetProperties class. See
'							that file for the properties and methods it exposes.
'
' -----------------------------------------------------------------------------
Sub OnInternalAfterPropertiesSave( ByVal pASPPageManager )
	' DEFAULT IMPLEMENTATION: do nothing


	' CUSTOM SCRIPT: to be customized by internal integration team
	If Not GetGlobalFeatureManager.FeatureIsRegistered( _
									IDS_FEATURE_CONNECTOR_FRAMEWORK ) Then
		Exit Sub
	End If
	
	Dim pPosting
	Set pPosting = pASPPageManager.CurrentObject
	
	If Not pPosting.IsPosting Then
		Exit Sub
	End If
	
	If Not (g_pNRCSSession.ThisPosting Is Nothing) Then

		Dim pNRCSPosting
		If g_pNRCSSession.ThisPosting.IsSimpleProductPosting Then
			Set pNRCSPosting = g_pNRCSFactory.GetSimpleProductPosting( _
												pPosting, _
												g_pNRCSSession.ThisPosting.Product )
		Else
			Set pNRCSPosting = g_pNRCSFactory.GetPosting( pPosting )
		End If

		Dim pFormReader
		Set pFormReader = GetInitializedFormReaderSafe( False )

		Call ProcessContentProfilePost( pNRCSPosting, pFormReader )

	End If
		
End Sub

%>