/*
 *	ccModuleConfig.js
 *	Build 3.2.0.23
 *	Copyright 1999-2003 Accenture
 */

/* Property:		Project Type
 * Description:		This property defines how the Standard Tutorial Architecture
 *					is used by this project.
 *					When:
 *					- "EMOD"	This project is an eModule.  Subsequent configuration
 *								properties should be set for to eModule defaults.
 *					- "CLASSIC"	This project is a classic implementation of Standard
 *								Tutorial Architecture.
 */
var sProjectType = "EMOD"; /* EMOD : eModule, CLASSIC : Basic STA */



/* Property:		Module ID
 * Description:		This property defines a unique module identifier for this module.
 *					(e.g. "m01")
 * Requirements:"	This value should match a moduleID set within the aCourseModules
 *					definition in the CourseConfig.js file.
 */
var sModuleID = "m01";	



/* Property:		Default Content Page
 * Description:		This property defines the default content page for this module.  This
 *					page should be located in the same folder as the frameset for this
 *					module.
 * Usage:			This property is used as the page name when starting the module for
 *					the first time or resuming from the beginning.
 */
var sDefaultContentPage = "c010101_act.htm";



/* Properties:		Default Navigational Pages
 * Description:		These properties define the default page names for the navigational
 *					frames.  This set is a complete set of pages; however, it is not
 *					required that all of these pages are 'in use'.  Four properties are
 *					defined (mini-main, header, left navigation, footer).
 * Usage:			Depending upon the Project Type for this course, the values may be
 *					overridden.  Ensure that the page names properly reflect the usage
 *					within your course.
 */
var sDefaultMiniMainPage = "NavMiniMain.htm";
var sDefaultHeaderPage = "NavHeader.htm";
var sDefaultFooterPage = "NavFooter.htm";
var sDefaultNavPage    = "NavTree.htm";

/* Apply overrides to default page names for eModules */
if ("EMOD" == sProjectType)
{
	sDefaultMiniMainPage = "eModHeader.htm";
	sDefaultHeaderPage = "eModLeft.htm";
	sDefaultFooterPage = "eModHeader.htm";
	sDefaultNavPage    = "eModLeft.htm";
}



/* Property:		Configuration of Optional Scroll Bars
 * Description:		This array contains the ids of those frames which have optional
 *					scroll bars based upon screen width.  Note that each module must
 *					be configured, and that the scroll bars are only set when the 
 *					frameset first loads.
 */
var aFramesWithOptionalScrollbars = new Array("fra_minimain", "fra_footer");



/* Property:		Screen Width Threshhold for Optional Scroll Bars
 * Description:		This value defines the screen width threshhold by which optional
 *					scroll bars may be required.  When the screen width is larger than
 *					this value, there is no need to check to see if optional scroll
 *					bars should be displayed.
 * Usage;			Set this value to the default display width for the module based
 *					upon the User Interface definition for the module.
 */
var iScrollBarScreenWidthThreshold = 650;



/* Property:		Always Restart Module
 * Description:		This variable defines how the course should handle 'resume' processing.
 *					When:
 *					- true:		The module will always be started using the default 
 *								content page
 *					- false:	The module will start by showing the last page visited by
 *								the user.
 */
var bModStartWithDefPage = false;



/* Property:		Optional Frame Configuration Table
 * Description:		This array should hold any frame configurations that are used within
 *					the module.  The default frame configuration is implied by the default
 *					display properties of the main frameset HTML page.
 * Usage:			These optional frame configurations are defined here and referenced
 *					within the navigational data for the pages that use the optional
 *					configurations.  The "FSC" property is used with an index to identify
 *					an item within this table.
 * Scope:			For configuration of an 'eModule', this property is not used.
 */
var aFrameConfig = new Array();


/* Value of sSTAPackageID should be set to "dummy" if WebCafe or to variable sPackageID if STA
/* ----- STA Overrides ----- */
//var sSTAPackageID = "dummy";	// if WebCafe
var sSTAPackageID = "CapacityManagement";	// if STA
var gsLocalVersionWindowTitle = "Supply Chain Education: Capacity Management";
sPackageID = sSTAPackageID;


/* Configuration Option:		Allow reconnect to MyLearning
 * Constant Name:				cEXIT_ALLOW_RECONNECT_MYL
 * Valid Values:				boolean
 * Notes:						If this course is hosted on MyLearning, set to true.
 *								Otherwise, set to false.
 */
var cEXIT_ALLOW_RECONNECT_MYL = true;



/* Configuration Option:		Module ID
 * Constant Name:				cEXIT_AU_MODULE_ID
 * Valid Values:				string
 * Notes:						This value indicates the module for which this
 *								exit script applies.  This value is used as a key
 *								when looking up the score for the Assessment
 *								(within the local data file).
 */
var cEXIT_AU_MODULE_ID = "m01";



/* Configuration Option:		Page ID for the Assessment Activity
 * Constant Name:				cEXIT_AU_ASSESSMENT_ID
 * Valid Values:				string (page name)
 * Notes:						This value indicates the page name for the Assessment
 *								activity (when using the eModules style of Assessment).
 *								This value is used as a key when looking up the score
 *								for the Assessment (within the local data file).
 */
var cEXIT_AU_ASSESSMENT_ID = "c010801_act";



/* Configuration Option:		Module Name for the Assignable Unit
 * Constant Name:				cEXIT_AU_MODULE_NAME
 * Valid Values:				string
 * Notes:						Used for display on the AICC dialog pages.
 */
var cEXIT_AU_MODULE_NAME = "Capacity Management";



/* Configuration Option:		Complete when launched flag, Reference Guides
 * Constant Name:				cEXIT_AU_LAUNCH_MEANS_COMPLETE
 * Valid Values:				boolean
 * Notes:						This value indicates if the module should be 
 *								marked "complete" when it is initially launched.
 *								This option provides functionality to support
 *								the "completion status" requirements of the
 *								learning designers for Reference Guides.
 * When:						true	:	The load of the Transmit Data dialog
 *											will be interpreted as "intent to use"
 *											and trigger a completion event.
 *								false	:	The user must exeucte the assignable
 *											unit and process the completion dialog
 *											to trigger the AICC completion event.
 */
var cEXIT_AU_LAUNCH_MEANS_COMPLETE = false;



/* Configuration Option:		Assignable Unit Frameset Usage
 * Constant Name:				cEXIT_AU_USES_FRAMESET
 * Valid Values:				boolean
 * Notes:						This value indicates whether or not the main page
 *								for the assignable unit is a frameset.  If it is,
 *								the "start the course" option will launch the
 *								frameset instead of the home page.
 */
var cEXIT_AU_USES_FRAMESET = false;



/* Configuration Option:		Assignable Unit Frameset
 * Constant Name:				cEXIT_AU_HOME_FRAMESET
 * Valid Values:				<string value>
 * Notes:						This value is relevant when cEXIT_AU_USES_FRAMESET
 *								is true.  Set this value to the name of the home
 *								frameset for this assignable unit.  Use a relative
 *								path to properly configure the location of the
 *								frameset relative to the AICC script objects.
 */
/*var cEXIT_AU_HOME_FRAMESET = "../m01/eModmainFrameset.htm";
  */
var cEXIT_AU_HOME_FRAMESET = "../m01/eModmainFrameset.asp";

/* Configuration Option:		Assignable Unit Home Page
 * Constant Name:				cEXIT_AU_HOME_PAGE
 * Valid Values:				<string value>
 * Notes:						Set this value to the name of the home page for this
 *								assignable unit.  Use a relative path to properly
 *								configure the location of the page relative to the
 *								AICC script objects.
 */
/*var cEXIT_AU_HOME_PAGE = "../default.htm";
  */
var cEXIT_AU_HOME_PAGE = "../default.asp";

/* Configuration Option:		Web Play for Assignable Unit
 * Constant Name:				cEXIT_AU_HAS_WEB_PLAY
 * Valid Values:				<boolean value>
 * Notes:						Set this value to true if this assignable unit supports
 *								a web play option.
 */
var cEXIT_AU_HAS_WEB_PLAY = true;



/* Configuration Option:		Local Play for Assignable Unit
 * Constant Name:				cEXIT_AU_HAS_LOCAL_PLAY
 * Valid Values:				<boolean value>
 * Notes:						Set this value to true if this assignable unit supports
 *								a local play option.
 */
var cEXIT_AU_HAS_LOCAL_PLAY = true;



/* Configuration Option:		Behavior option for presentation of the download option.
 * Constant Name:				cEXIT_ALWAYS_DOWNLOAD_OPTION
 * Valid Values:				<boolean value>
 * When:						true	:	The "Launch or Download" page is always
 *											displayed when launching from the web.
 *								false	:	The "Launch or Download" page is only
 *											displayed once for the initial install.
 */
var cEXIT_ALWAYS_DOWNLOAD_OPTION = true;



/* Configuration Option:		Local Play link to Download Page
 * Constant Name:				cEXIT_AU_LINK_LOCAL_DOWNLOAD
 * Valid Values:				<fully qualified URL>
 * Notes:						Set this value to the fully qualified URL for the page
 *								in the Technology Attachments library that provides the
 *								install package for the download version.
 */
var cEXIT_AU_LINK_LOCAL_DOWNLOAD = "";



/* Configuration Option:		Local Play installation keys path
 * Constant Name:				cEXIT_LOCAL_INSTPATH_VERSION
 * Valid Values:				<string>
 * Notes:						Set this value to the relative path [relative to 
 *								HKLM\SOFTWARE\Accenture] for the registry keys that
 *								are installed for the local version.
 */
var cEXIT_LOCAL_INSTPATH_VERSION = "CapacityManagement";



/* Configuration Option:		Local Play installation version key
 * Constant Name:				cEXIT_LOCAL_INSTKEY_VERSION
 * Valid Values:				<string>
 * Notes:						Set this value to the name of the version key for the
 *								local version.
 */
var cEXIT_LOCAL_INSTKEY_VERSION = "Version";



/* Configuration Option:		Local Play installation version key's value
 * Constant Name:				cEXIT_LOCAL_INSTVALUE_VERSION
 * Valid Values:				<string>
 * Notes:						Set this value to the string value that is written to
 *								the registry by your install program.
 */
var cEXIT_LOCAL_INSTVALUE_VERSION = "1.0";



/* Configuration Option:		Local play registry key path for FILEPATH
 * Constant Name:				cEXIT_LOCAL_INSTPATH_FILEPATH
 * Valid Values:				<string>
 * Notes:						Set this value to registry key path that contains the
 *								FILEPATH.
 */
var cEXIT_LOCAL_INSTPATH_FILEPATH = "CapacityManagement";



/* Configuration Option:		Local Play installation file path
 * Constant Name:				cEXIT_LOCAL_INSTKEY_FILEPATH
 * Valid Values:				<string>
 * Notes:						Set this value to the name of the installation key that
 *								contains the path of the local file.
 */
var cEXIT_LOCAL_INSTKEY_FILEPATH = "AppPath";



/* Configuration Option:		Local Play installation file name
 * Constant Name:				cEXIT_LOCAL_INSTALL_FILE_NAME
 * Valid Values:				<string>
 * Notes:						Set this value to the name of the file that should
 *								be executed to launch the local version of the course.
 */
var cEXIT_LOCAL_INSTALL_FILE_NAME = "CapacityManagement.exe";



/* Configuration Option:		Timestamp display on Transmit Page
 * Constant Name:				cEXIT_XMIT_SHOW_TIMESTAMPS
 * Valid Values:				<boolean value>
 */
var cEXIT_XMIT_SHOW_TIMESTAMPS = true;



/* Configuration Option:		Assignable Unit Version
 * Constant Name:				cEXIT_AU_VERSION
 * Valid Values:				<integer value>
 * Notes:						If you feel that your product may require minor
 *								revisions, use the following standard to apply
 *								revision numbers (using a floating decimal)
 *								cEXIT_AU_VERSION = 100	indicates	Version 1.0
 *								cEXIT_AU_VERSION = 110	indicates	Version 1.1
 */
var cEXIT_AU_VERSION = 100;



/* Configuration Option:		Maximum Score for Assignable Unit
 * Constant Name:				cEXIT_AU_MAX_SCORE
 * Valid Values:				<numeric value>
 * Notes:						The numeric value (expressed as a raw integer) that
 *								represents the total number of questions for all
 *								pages in this assignable unit.
 */
var cEXIT_AU_MAX_SCORE = 10;



/* Configuration Option:		Minimum Passing Score for Assignable Unit
 * Constant Name:				cEXIT_AU_REQD_SCORE
 * Valid Values:				<numeric value>
 * Notes:						The numeric value (expressed as a integer indicating
 *								a percentage from 100%, e.g. 80) that represents the
 *								minimum passing score for this assignable unit.
 */
var cEXIT_AU_REQD_SCORE = 80;



/* Configuration Option:		Scoring Type
 * Variable Name:				cEXIT_AU_TYPE
 * Valid Values:
 *		cAU_TYPE_SCORED			Indicates this is a scored assignable unit, 
 *								and status will be set according to score as
 *								Passed, Failed, ...
 *		cAU_TYPE_REFERENCE		Indicates this is a reference assignable unit,
 *								and status will be set accordingly as 
 *								Browsed, Complete, ...
 */
var cEXIT_AU_TYPE = cAU_TYPE_SCORED;



/* Configuration Option:		Score required for completion
 * Variable Name:				cEXIT_AU_SCORE_REQUIRED
 * Valid Values:				boolean
 * When:						true	:	The status exit will use the score
 *											to determine status.  A score of zero
 *											is treated as "incomplete".
 *								false	:	A score is not required for completion.
 *											This essentially tracks a score for
 *											a mastery activity which is optional
 *											for determining completion.
 */
var cEXIT_AU_SCORE_REQUIRED = true;



/* Configuration Option:		Status Type
 * Variable Name:				cEXIT_AU_STATUS
 * Valid Values:
 *		cAU_STATUS_SET_BY_AU	Indicates that the assignable unit is responsible
 *								for determining its status based upon score or
 *								other criteria.
 *		cAU_STATUS_SET_BY_LMS	Indicates that the Learning Management Server will
 *								determine the status of the assignable unit.
 */
var cEXIT_AU_STATUS = cAU_STATUS_SET_BY_AU;



/* Configuration Option:		Transmit Wait Cursor Style
 * Constant Name:				cEXIT_XMIT_WAIT_CURSOR
 * Valid Values:				<string value>
 * Notes:						Set this value to a valid cursor style for the
 *								browser
 */
var cEXIT_XMIT_WAIT_CURSOR = "wait";



/* Configuration Option:		Transmit Normal Cursor Style
 * Constant Name:				cEXIT_XMIT_NORMAL_CURSOR
 * Valid Values:				<string value>
 * Notes:						Set this value to a valid cursor style for the
 *								browser
 */
var cEXIT_XMIT_NORMAL_CURSOR = "";



/* ========================================================================== */



/* ========== Open script for configuration validation ====================== */

if (false != cEXIT_AU_LAUNCH_MEANS_COMPLETE)
{
	if (cEXIT_AU_TYPE != cAU_TYPE_REFERENCE)
	{
		cEXIT_AU_TYPE = cAU_TYPE_REFERENCE;
	}
}

/* ========================================================================== */



/* ========== Override AICC Constants for script paths/messages ============= */

/* Dialog Pages
 * - Uncomment the variable assignments to enable your overrides */
/*
	ccAICC_DLGOPTS_CONFIRM_DELCTXT	= "dialogWidth:520px; resizable:yes; dialogHeight:280px; ";
	ccAICC_DLG_TRANSMIT				= "../cDialogs/ccAICCDlg_TransmitData.htm";
	ccAICC_DLG_CONFIRM_DELCTXT		= "../cDialogs/ccAICCDlg_ConfirmContextDelete.htm";
	ccAICC_DLG_DOWNLOAD				= "../cDialogs/ccAICCDlg_LaunchOrDownload.htm";
*/
	ccAICC_DLG_USER_SELECT			= "../cCourse/ccSTAAICCDlg_SelectUser.htm";
	ccAICC_DLG_NOTENROLLED			= "../cCourse/ccSTAAICCDlg_NotEnrolled.htm";

/* Message Table
 * - Uncomment the variable assignments to enable your overrides 
 */
/*
	cINF_MSG_HTML_DOWNLOAD_OK		= "Download successful.  Options have been refreshed.";
	cINF_MSG_HTML_UPLOAD_OK			= "Upload successful.  Options have been refreshed";
	cWRN_MSG_HTML_DOWNLOAD_NOT_OK	= "Download processing was not successful.";
	cWRN_MSG_HTML_UPLOAD_NOT_OK		= "Upload processing was not successful.";
	cWRN_MSG_HTML_CLEAR_NOT_OK		= "Clear processing was not successful.";
	cINF_MSG_MAIN_RESULTS_SUBMITTED	= "Results have been submitted to the LMS.";
	cWRN_RUN_MAIN_TRYCONNECT		= "Your session with the Learning Management Server is expired.  Please launch the course from myLearning to reconnect.";
	cERR_RUN_MAIN_CONNECTFAIL		= "Unable to connect with the Learning Management Server or error processing reponse from Learning Management Server.  Please verify your internet connection and that you can connect with the Learning Management Server.";

	cERR_CFG_MAIN_WEB_DATASTORE		= "Configuration Error: No object for local data store";
	cERR_CFG_MAIN_NO_HOMEPAGE		= "Configuration Error: No Course Home Page";
	cERR_CFG_MAIN_NO_HOMEFRAME		= "Configuration Error: No Course Home Frameset";
	cERR_CFG_MAIN_TRKR_REQUIRED		= "Configuration Error: Method GetConfigServer() requires the tracker component.";
	cERR_CFG_MAIN_DLL_REQUIRED		= "Configuration Error: Method GetConfigServer() requires the AICC DLL.";
	cERR_CFG_MAIN_TRKR_REQUIRED2	= "Configuration Error: Method GetConfigSecure() requires the tracker component.";
	cERR_CFG_MAIN_DLL_REQUIRED2		= "Configuration Error: Method GetConfigSecure() requires the AICC DLL.";
	cERR_CFG_MAIN_FAIL_LOOKUP_VIP	= "Configuration Error: Decode failed for lookup of LMS VIP";
	cERR_CFG_MAIN_CHECKLOCAL		= "Configuration Error: User exit for check local install is not available.";
	cERR_CFG_MAIN_GETLOCAL			= "Configuration Error: User exit for local link is not available.";
	cERR_CFG_MAIN_RESUMELOCAL		= "Configuration Error: User exit for resume local link is not available.";
	cERR_CFG_STAT_MISSING_EXIT		= "Configuration Error: User exit for status is not available.";
	cERR_CFG_TRKR_JIT_LOADER		= "Configuration Error: The required script file [ccJITInstallation.js] containing the function [CC_CreateActiveXObject] is not linked into this web page."
	cERR_CFG_STA_HOME_BUT_NOT_STA	= "Configuration Error: Method requires STA homepage but scripts not found."

	cERR_RUN_MAIN_LOST_LMS			= "Runtime Error: Unable to find the Learning Management Server";
	cERR_RUN_MAIN_LCLDATA_FAIL		= "Runtime Error: ccAICC.GetDataOptions received failure or null code from Tracker for GetLocalData";
	cERR_RUN_MAIN_NO_OPTIONS		= "Runtime Error: Retrieval of data options failed ";
	cERR_RUN_MAIN_NO_AU_VERSION		= "Runtime Error: Assignable Unit's version cannot be determined";
	cERR_RUN_MAIN_GET_USER_LMS_FAIL	= "Runtime Error: Retrieve failed for LMS User Name";
	cERR_RUN_MAIN_DISCONNECTED		= "Runtime Error: The requested action requires an active connection with the Learning Management Server.";
	cERR_RUN_TRKR_DLL_INIT_FAIL		= "Runtime Error: The Active-X object that supports LMS communication did not initialize properly.  This page is unable to communicate with the LMS.";
	cERR_RUN_SCOR_NOMETH_STORNAME	= "Runtime Error: Registered data object does not support GetStorageName method";
	cERR_RUN_HTML_LMS_LOGIN_FAIL	= "Runtime Error: Failed to login to LMS";
	cERR_RUN_HTML_LMS_POST_FAIL		= "Runtime Error: Failed to post information to the LMS";
	cERR_RUN_HTML_DNLD_NOT_AVAIL	= "Runtime Error: Unable to process download option";
	cERR_RUN_HTML_UPLD_NOT_AVAIL	= "Runtime Error: Unable to process upload option";
	cERR_RUN_HTML_CLR_NOT_AVAIL		= "Runtime Error: Unable to process clear option";

	cERR_RUN_MAIN_NO_OPTIONS_TAIL_1	= "due to an internal logical error.";
	cERR_RUN_MAIN_NO_OPTIONS_TAIL_2	= "due to an internal error while parsing data.";
	cERR_RUN_MAIN_NO_OPTIONS_TAIL_3	= "because a connection with the LMS could not be made.  Please verify your connection with the LMS.";
	cERR_RUN_MAIN_NO_OPTIONS_TAIL_4	= "because data was not found on the LMS.";
	cERR_RUN_MAIN_NO_OPTIONS_TAIL_5	= "because the request to connect with the LMS was denied.  Please verify your connection with the LMS.";

	cERR_RUN_MAIN_NO_POST_TAIL_1	= "because a connection with the LMS is not available.";
	cERR_RUN_MAIN_NO_POST_TAIL_2	= "because current session parameters could not be established.";
	cERR_RUN_MAIN_NO_POST_TAIL_3	= "due to an internal processing error.";

	cERR_LOG_MAIN_STA_DATASTORE		= "Logical Error: Script error due to need to configure STA Data Storage handle.";
	cERR_LOG_MAIN_PARSE_PARM		= "Logical Error: parsing parameter from URL";
	cERR_LOG_MAIN_STA_NOUSER		= "Logical Error: Processing to get the User ID for STA is not enabled in ccAICC_envir_GetUserID()";
	cERR_LOG_MAIN_STA_NOSETUSER		= "Logical Error: Processing to set the User ID for STA is not enabled in ccAICC_envir_GetUserID()";
	cERR_LOG_TRKR_NO_NETSCAPE		= "Logical Error: Netscape not currently supported.";
	cERR_LOG_HTML_NO_LOCAL_INSTALL	= "Logical Error: Local installation is not available.";
*/
/* ========================================================================== */



/* ========== Methods for User Extensions to the AICC Script Objects ======== */

/* Function:					ccAICCUserExit_LaunchLocalLink
 * Purpose:						Launch the local course link
 * Called by:					ccAICC.LaunchLocalLink
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_LaunchLocalLink(oAICC)
{
	/* Get path to local link from registry */
	var sLclPath = oAICC.Tracker.oLMSConnection.GetInstallString(cEXIT_LOCAL_INSTPATH_FILEPATH, cEXIT_LOCAL_INSTKEY_FILEPATH);

	if ((ccAICC_KEY_NOTFOUND == sLclPath) || (ccAICC_KEY_ERROR == sLclPath))
	{
		/* Key not found or unreadable, need to show download option */
		alert(cERR_LOG_HTML_NO_LOCAL_INSTALL);
	}
	else
	{
		private_ccAICCUserExit_LaunchLocalLink(sLclPath);
	}
}

/* Function:					ccAICCUserExit_ResumeLocalLink
 * Purpose:						Launch the local course link with page resume
 * Called by:					ccAICC.ResumeLocalLink
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_ResumeLocalLink(oAICC)
{
	if ("undefined" != typeof(hp_Go))
	{
		/* Use STA logic */
		hp_Go('Resume');
	}
	else
	{
		ccAICCUserExit_LaunchLocalLink(oAICC);
	}
}
/* Function:					ccAICCUserExit_ExistsLocalPlay
 * Purpose:						Determines existence of local play course version
 * Called by:					ccAICC.HasLocalLink
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_ExistsLocalPlay(oAICC)
{
	/* Get path to local link from registry */
	var sLclPath = oAICC.Tracker.oLMSConnection.GetInstallString(cEXIT_LOCAL_INSTPATH_FILEPATH, cEXIT_LOCAL_INSTKEY_FILEPATH);

	if ((ccAICC_KEY_NOTFOUND == sLclPath) || (ccAICC_KEY_ERROR == sLclPath))
	{
		/* Key not found or unreadable, need to show download option */
		return false;
	}
	else
	{
		return true;
	}
}
/* Function:					ccAICCUserExit_IsLocalPlay
 * Purpose:						Return boolean true if executing version is local play
 * Called by:					ccAICC.LaunchLocalLink
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_IsLocalPlay(oAICC)
{
	return private_ccAICCUserExit_IsLocalPlay(oAICC);
}
function private_ccAICCUserExit_IsLocalPlay(oAICC)
{
	var sDocLocHref;
	sDocLocHref = document.location.href;
	if (("http" == sDocLocHref.substring(0,4)) || ("https" == sDocLocHref.substring(0,5)))
	{
		return false;
	}
	else
	{
		return true;
	}
}

/* Function:					private_ccAICCUserExit_LaunchLocalLink
 * Purpose:						Launch the local course link
 * Called by:					ccAICC.LaunchLocalLink
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function private_ccAICCUserExit_LaunchLocalLink(sLclPath)
{
	/* Insert your product specific code for launching a local link, here */

	var SDWAPIProgID = "SDWAPI.clsWapi";

	/* Use the JIT Loader to allocate SDWAPI if the JIT-loader is available.  The
	 * JIT-loader will install the component if it is not already installed.
	 */
	if (null != self.util_CreateActiveXObject)
		this.objsdWAPI = util_CreateActiveXObject(SDWAPIProgID);
	else
		this.objsdWAPI = new ActiveXObject(SDWAPIProgID);
	var sWindowTitle = gsLocalVersionWindowTitle;
	var sDefaultPage;
	var sAppPath;
	var x;
	switch (objsdWAPI.GetWindowState(sWindowTitle))
	{
		case 2: //the window we want is minimised, so normalize, bring to front
			objsdWAPI.SetWindowState(sWindowTitle, 1);
			objsdWAPI.SetOnTop(sWindowTitle);
			break;
		case -1: //the window is not open
			sDefaultPage = "default.htm";
			sAppPath = sLclPath + "\\" + cEXIT_LOCAL_INSTALL_FILE_NAME;
			window.open(sAppPath);
			break;
		default: //the window is either maximized or normal, so bring to front
			objsdWAPI.SetWindowState(sWindowTitle, 2);
			objsdWAPI.SetWindowState(sWindowTitle, 1);
			objsdWAPI.SetOnTop(sWindowTitle);
			break;
		}
	return;
}
/* Function:					ccAICCUserExit_OverrideScore
 * Purpose:						Override the computed score
 * Called by:					ccScore.ComputeScore
 * Co-Dependent(s):				ccScore.js
 */
function ccAICCUserExit_OverrideScore(sScore)
{
	/* Insert your product specific code for overriding the computed score
	 * here.  This exit has been included to support instances of courses
	 * which are "scored" (per se), but the test is optional.  In this 
	 * case, the exit can report a consistent "score" for all users
	 * who choose not to take the optional test.  (Added based upon input
	 * from architectural review.  Ensure that the range of the score 
	 * returned by this method is 0-100 (since it is a percentage.
	 */

	/* Truncate the decimal on the score to one digit */
	var sStrScore;
	if ("number" == typeof(sScore))
	{
		sStrScore = new String(sScore);
	}
	else
	{
		sStrScore = sScore;
	}

	var iInx = sStrScore.lastIndexOf(".");
	if (iInx > -1)
	{
		var iLen = sStrScore.length;
		iInx = iInx + 2;
		if (iInx < iLen)
		{
			sStrScore = sStrScore.substring(0,iInx);
		}
	}

	return sStrScore;

	/* ------------------------------------------------------------------------- */

	/* Stock/Reference Code for Tabulate Score - Do Not use for eModules */
	/* return sScore;
	 */
}
/* Function:					ccAICCUserExit_CheckLocalInstall
 * Purpose:						Version checking exit for the local download
 * Called by:					ccAICC.CheckLocalInstall
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_CheckLocalInstall(oAICC)
{
	var sLclVersion = oAICC.Tracker.oLMSConnection.GetInstallString(cEXIT_LOCAL_INSTPATH_VERSION, cEXIT_LOCAL_INSTKEY_VERSION);

	if ((ccAICC_KEY_NOTFOUND == sLclVersion) || (ccAICC_KEY_ERROR == sLclVersion))
	{
		/* Key not found or unreadable, need to show download option */
		return false;
	}
	else
	{
		/* Have a key, need to see if it is the current version */
		if (cEXIT_LOCAL_INSTVALUE_VERSION == sLclVersion)
		{
			/* Local version is installed */
			return true;
		}
		else
		{
			/* Local version does not match */
			return false;
		}
	}
}
/* Function:					ccAICCUserExit_GetAUVersion
 * Purpose:						Standard property method to return version
 * Called by:					ccAICC.GetAUVersion
 * Co-Dependent(s):				ccAICCMain.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_GetAUVersion()
{
	return cEXIT_AU_VERSION;
}
/* Function:					ccAICCUserExit_SetPageScore
 * Purpose:						Standard scoring method for an activity page.
 *								This is a default which is expected to be 
 *								customized.
 * Called by:					ccAICC.PageUnload
 * Co-Dependent(s):				ccAICCMain.js
 *								ccScore.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_SetPageScore()
{
	// For STA - activities set score.  So , this function should not be used.
	// For WebCafe - you can set score when page is unloaded.
	if (cCCDC_PROJECT_TYPE_CAFE == this.ProjectType)
	{
		var iMyScore = 1;

		/* At this point, we need to call an activity-based scoring exit to get
		 * the score for the page, then call the scoring object to set it.
		 */

		ccAICC.Score.SetPageScore(sPageName, iMyScore);
	}
}
/* Function:					ccAICCUserExit_TabulateLessonScore
 * Purpose:						Standard processing to tabulate a lesson score.
 *								This function should return the total "points"
 *								earned for the lesson (which should be a fraction
 *								of the total possible = cEXIT_AU_MAX_SCORE).  The
 *								parent function for this exit will compute the
 *								percentage score that was earned.
 *
 *								This is a default which is expected to be customized
 *								based upon the method of data persistence.
 * Called by:					ccScore.ComputeScore
 * Co-Dependent(s):				ccScore.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_TabulateLessonScore()
{
	/* Customize this function as required by your course.  There are two commonly
	 * used approaches:
	 * (a)	eModules style where a single assessment (i.e. test) is used at the end
	 *		of the course to determine the score.
	 * (b)	Classic STA approach where each activity within the module contributes
	 *		to the score and tabulation of individual "page_score" properties is required.
	 */

	/* Tabulate Score processing for eModules style - single assessment */

	var sScore = ccAICC.DataStorage.getItem(sSTAPackageID,cEXIT_AU_MODULE_ID,cEXIT_AU_ASSESSMENT_ID,"AICC_Enablement","Page_Score");
	return parseInt(sScore);

	/* ------------------------------------------------------------------------- */

	/* Stock/Reference Code for Tabulate Score - Do Not use for eModules */
	/*	
	 *	var iScore = 0;
	 *	var sOneScore = "";
	 *	var oNode = null;
	 *	var sDataFN = private_ccScore_GetDataFileName(); //This is the XML Data File
	 *	var sXML = ccAICC.DataStorage.GetElement();
	 *	
	 *	// Load the XML data file into a XML Document object
	 *	// No need to use jit installer because XML Dom downloaded with SDDATA
	 *	oXMLDoc = new ActiveXObject(csMICROSOFT_XML_DOM);
	 *	
	 *	
	 *	oXMLDoc.async = false;
	 *	oXMLDoc.loadXML(sXML);
	 *	
	 *	// Get a node list with all of the individual page scores
	 *	var oNodeList = oXMLDoc.getElementsByTagName(cAICC_KEY_PAGE_SCORE);
	 *	var iItem = 0;
	 *	var iTotal = oNodeList.length;
	 *	
	 *	while (iItem < iTotal)
	 *	{
	 *		// In our XML tree, the element name is the key and the first
	 *		// child is the node with the value.
	 *		//
	 *		sOneScore = oNodeList.item(iItem).firstChild.text;
	 *		iScore = iScore + parseInt(sOneScore);
	 *		iItem = iItem + 1;
	 *	}
	 *	
	 *	oNodeList = null;
	 *	oXMLDoc = null;
	 *
	 *	return iScore;
	 */
}
/* Function:					ccAICCUserExit_ParseSingleXMLKey
 * Purpose:						Parse the value of a single XML Key (assumed that
 *								there is only one in the file) from an XML
 *								document (assumed valid) given the Key Name.
 * Called by:					ccAICC.FindLMS
 */
function ccAICCUserExit_ParseSingleXMLKey(sDocument, sKeyName)
{
	var iScore = 0;
	var sOneScore = "";
	var oNode = null;
	var sReturn = "";

	/* Load the XML data file into a XML Document object */
	oXMLDoc = new ActiveXObject(csMICROSOFT_XML_DOM);
	oXMLDoc.async = false;
	oXMLDoc.loadXML(sDocument);

	/* Get a node list with the LMSRSHost */
	var oNodeList = oXMLDoc.getElementsByTagName(sKeyName);
	var iItem = 0;
	var iTotal = oNodeList.length;

	if (iItem < iTotal)
	{
		/* In our XML tree, the element name is the key and the first
		 * child is the node with the value.
		 */
		if (null == oNodeList.item(iItem).firstChild)
		{
			return "";
		}
		else
		{
			sReturn = oNodeList.item(iItem).firstChild.text;
		}
	}
	else
	{
		sReturn = "";
	}

	oNodeList = null;
	oXMLDoc = null;

	return sReturn;
}
/* Function:					ccAICCUserExit_ComputeStatus
 * Purpose:						Standard status exit for determining status
 *								of the AICC unit.
 * Called by:					ccAICC.CompleteAU
 *								ccAICC.Status.ComputeStatus
 * Co-Dependent(s):				ccAICCMain.js
 *								ccStatus.js
 *								ccAICCConstants.js
 */
function ccAICCUserExit_ComputeStatus(sCurrent, iScore)
{
	var sNewStatus = "";
	if (cAU_TYPE_SCORED == cEXIT_AU_TYPE)
	{
		sNewStatus = private_ccAICCUserExit_ComputeStatusForScore(sCurrent, iScore);
	}
	else
	{
		sNewStatus = private_ccAICCUserExit_ComputeStatusNoScore(sCurrent, iScore);
	}

	return sNewStatus;
}
/* Function:					ccAICCUserExit_ComputeStatusForScore
 * Purpose:						Standard status exit for determining a status
 *								based upon a score.
 *								of the AICC unit.
 * Called by:					ccAICCUserExit_ComputeStatus
 * Co-Dependent(s):				ccAICCUserExit.js
 */
function private_ccAICCUserExit_ComputeStatusForScore(sCurrent, iScore)
{
	var sNewStatus = cAICC_STATUS_INCOMPLETE;

	if (true == cEXIT_AU_SCORE_REQUIRED)
	{
		if (0 != iScore)
		{
			if (cAU_STATUS_SET_BY_AU == cEXIT_AU_STATUS)
			{	
				if (iScore < cEXIT_AU_REQD_SCORE)
				{	sNewStatus = cAICC_STATUS_FAILED; }
				else
				{	sNewStatus = cAICC_STATUS_PASS; }
			}
			else
			{	sNewStatus = cAICC_STATUS_COMPLETED; }
		}
	}
	else
	{
		sNewStatus = cAICC_STATUS_PASS;
	}

	return sNewStatus;
}
/* Function:					ccAICCUserExit_ComputeStatusNoScore
 * Purpose:						Standard status exit for determining a status
 *								not based upon a score.
 *								of the AICC unit.
 * Called by:					ccAICCUserExit_ComputeStatus
 * Co-Dependent(s):				ccAICCUserExit.js
 */
function private_ccAICCUserExit_ComputeStatusNoScore(sCurrent, iScore)
{
	var sNewStatus = cAICC_STATUS_BROWSED;

	/* The compute status routines are only invoked from the completion 
	 * page.  Therefore, we can assume that the user's intent is to mark
	 * this unit as complete when this routine runs.
	 */

	sNewStatus = cAICC_STATUS_COMPLETED;

	return sNewStatus;
}
