/* ##########################################################################################################################

Namespace : NRT.Property.Search
Classes   : TabCaptions
Summary	  : This file contains a series of properties and methods for all of the property search tab captions.
Copyright : (c) 2006 NRT Inc. All rights reserved.

RevisionHistory: 
-------------------------------------------------------------------------------------------------------------------------
Date		Name		Description
-------------------------------------------------------------------------------------------------------------------------
11/29/2006	dlawless	Initial Creation

###########################################################################################################################*/
NRT.Property.Search.TabCaptions = function()
{
	var _tabCaptions = [];
	var _defaultTab = null;

	return {
		/*******************************************************************************************************************
		*                               P U B L I C   P R O P E R T I E S
		*******************************************************************************************************************/
		/*==================================================================================
		Property	: getTabCaptions
		Summary		: Returns the tab caption array.
		Author		: Dale Lawless
		Create Date	: 11/27/2006
		====================================================================================*/
		getTabCaptions: function()
		{
			return _tabCaptions;
		},

		/*==================================================================================
		Property	: setTabCaptions
		Summary		: Sets the array of tab captions.
		Author		: Dale Lawless
		Create Date	: 11/27/2006
		====================================================================================*/
		setTabCaptions: function(value)
		{
			_tabCaptions = value;
		},

		/*==================================================================================
		Property	: getDefaultTab
		Summary		: Returns the default tab id.
		Author		: Dale Lawless
		Create Date	: 11/29/2006
		====================================================================================*/
		getDefaultTab: function()
		{
			return _defaultTab;
		},

		/*==================================================================================
		Property	: setDefaultTab
		Summary		: Sets the default tab id.
		Author		: Dale Lawless
		Create Date	: 11/29/2006
		====================================================================================*/
		setDefaultTab: function(value)
		{
			_defaultTab = value;
		},

		/*******************************************************************************************************************
		*									P U B L I C   M E T H O D S
		*******************************************************************************************************************/
		/*==================================================================================
		Method		: init
		Summary		: Sets the tab caption array and the default tab id.
		Author		: Dale Lawless
		Create Date	: 11/29/2006
		====================================================================================*/
		init: function()
		{
			var aTabs;
			try
			{
				// Tab Caption | DIV Tag to display | Tab Click Event | * (Default Selected Tab)
				aTabs = ['City/Zip|div_CZ_Tab|NRT.Property.Search.Utility.tabClick(0)|*', 'Nearby Cities|div_NC_Tab|NRT.Property.Search.Utility.tabClick(1)', 'Address|div_AD_Tab|NRT.Property.Search.Utility.tabClick(2)', 'MLS#|div_MN_Tab|NRT.Property.Search.Utility.tabClick(3)'];
				this.setTabCaptions(aTabs);
				this.setDefaultTab(0);
			}
			catch (err)
			{
				_oErrorHandler.Error('NRT.Property.Search.TabCaptions.init', _oErrorHandler.ERRORTYPE_JS, err);
				return;
			}
		}
	};
} ();

