<ControllerBehavior>
	<ToggleRMABtnClicked>
		<ToggleNavBtnsRMA/>
	</ToggleRMABtnClicked>
	<Disablenext>
	<SetButton button="Next" buttonEnabled="false" state="off" />
	</Disablenext>
	<ModuleReplaced>
		<ExecuteNamedActionSet setName="ModuleLoadedActions" />
		<If condition="IfModuleHasBeenVisited">
		    <IfTrueActions>
				<If condition="IfTargetPageSpecified">
					<IfTrueActions>
						<GoToTargetPage />
					</IfTrueActions>
					<IfFalseActions>
						<GoToLastPageVisited/>
					</IfFalseActions>
				</If>
 		    </IfTrueActions>
		    <IfFalseActions>
				<GoToFirstPage/>
		    </IfFalseActions>
		</If>
	</ModuleReplaced>
	<ModuleLoaded>
			<If condition="IfCourseHasBeenVisited">
				<IfTrueActions>
					<GoToLastVisitedModuleAndPage />
					<!--- <ExecuteNamedActionSet setName="ModuleLoadedActions" />-->
				</IfTrueActions>
				<IfFalseActions>
					<!--- <ExecuteNamedActionSet setName="ModuleLoadedActions" />-->
	            	<GoToMainMenu/>
					<!--			<GoToFirstPage/>-->
				</IfFalseActions>
			</If>
	</ModuleLoaded>
	<ModuleLoadedActions>
		<InitializeInterface/>
		<LoadBackground />
		<!--LoadTopicBarMovie /-->
		<MarkModuleVisited />
		<StoreParameters />
	</ModuleLoadedActions>
	<LaunchIntro />
	<PageStartPlaying>
		<If condition="IfKnowledgeCheckPage">
			<IfTrueActions>
				<ResetKnowledgeCheck/>
				<DisableAllControls />
			</IfTrueActions>
			<IfFalseActions>
			</IfFalseActions>
		</If>
		<CollapseTopicsMap />
		<UpdatePagePlaying />
		<CacheVisitedState />
        <LoadPageFunctions/>
		<SetPopupButtonsState buttonsEnabled="false" />
		<MarkPageVisited />
		<MarkModuleVisited />
		<StoreParameters />
		<ExecuteNamedActionSet setName="SetNextButton" />
		<If condition="IfFirstPage">
			<IfTrueActions>
				<SetButton button="Previous" buttonEnabled="true" state="on" />
			</IfTrueActions>
			<IfFalseActions>
				<SetButton button="Previous" buttonEnabled="true" state="on" />
			</IfFalseActions>
		</If>
	</PageStartPlaying>
	<SetNextButton>
    	<If condition="IfLastPage">
		    <IfTrueActions>
				<SetButton button="Next" buttonEnabled="false" state="off" />
		    </IfTrueActions>
		    <IfFalseActions>
		    	<If condition="IfCurrentPageComplete">
				    <IfTrueActions>
<TestMessage TMessage="CPC" />
						<SetButton button="Next" buttonEnabled="true" state="blink" />
				    </IfTrueActions>
				    <IfFalseActions>
<TestMessage TMessage="CPNC" />
				        <SetButton button="Next" buttonEnabled="true" state="on" />
				    </IfFalseActions>
				</If>
		    </IfFalseActions>
		</If>
	</SetNextButton>
	<EmbeddedVideoStartPlaying>
		<StopPagePlaying/>
	</EmbeddedVideoStartPlaying>
	<EmbeddedVideoFinishedPlaying>
		<ContinuePagePlaying/>
	</EmbeddedVideoFinishedPlaying>
	<ContinueButtonClicked>
		<GoToEndOfEmbeddedVideo/>
		<ContinuePagePlaying/>
	</ContinueButtonClicked>
	<NextButtonClicked>

		<SetButton button="Next" buttonEnabled="true" state="off" />
		<ExecuteNamedActionSet setName="PerformCertificateCheck" />
		<MarkPageComplete />
<!--		<StoreParameters />  -->
		<If condition="IfLastPage">
			<IfTrueActions>
 		<GoToMainMenu />
			</IfTrueActions>
			<IfFalseActions>
				<GoToNextPage/>
			</IfFalseActions>
		</If>
	</NextButtonClicked>
	<PreviousButtonClicked>
		<If condition="IfFirstPage">
			<IfTrueActions>
 			<GoToMainMenu />
			</IfTrueActions>
			<IfFalseActions>
				 <GoToPreviousPage/>
			</IfFalseActions>
		</If>
	</PreviousButtonClicked>
	<ExternalLinkClicked>
		<OpenExternalResource/>
	</ExternalLinkClicked>
	<CourseMapLinkClicked>
		<GoToCourseMapLink />
		<HideTopicBar/>
	</CourseMapLinkClicked>
	<TopicButtonClicked>
		<GoToTopic />
	</TopicButtonClicked>
	<PauseButtonClicked>
		<PausePlayback/>
		<!--DisplayPause/>
		<SuspendInterface/-->
	</PauseButtonClicked>
	<ResumeButtonClicked>
		<ResumeInterface/>
	</ResumeButtonClicked>
	<ResumeButtonClicked_508>
		<ResumeTopLevel_508/>
	</ResumeButtonClicked_508>
	<PauseButtonClicked_508>
		<PauseTopLevel_508/>
	</PauseButtonClicked_508>
	<LinkClicked>
		<GoToLink />
	</LinkClicked>
<!-- Course Map -->
	<PageLinkClicked>
		<GoToPageLink />
	</PageLinkClicked>
	<PopupClicked>
		<HideTopicBar/>
	    <OpenPopupPage/>
		<MarkPopupVisited/>
	</PopupClicked>
	<PopupClosed>
		<!--ShowTopicBar/-->
		<ClosePopupPage />
	</PopupClosed>
	<PopupStartPlaying>
		<UpdatePagePlaying />
		<CacheVisitedState />
		<LoadPageFunctions/>
<!-- REVIIST VERIFY THIS IS WHAT WE WANT -->
		<SetPopupButtonsState buttonsEnabled="true" />
		<MarkPopupVisited />
	</PopupStartPlaying>
	<PopupFinshedPlaying>
		<UpdatePageFinished />
		<RestoreVisitedState />
		<SetPopupButtonsState buttonsEnabled="true" />
		<MarkPopupComplete />
		<MakeCloseButtonBlink />
	</PopupFinshedPlaying>
	<PopupFinishedPlaying>
		<UpdatePageFinished />
		<RestoreVisitedState />
		<SetPopupButtonsState buttonsEnabled="true" />
		<MarkPopupComplete />
		<MakeCloseButtonBlink />
	</PopupFinishedPlaying>
	<GlossaryButtonClicked>
		<DisplayGlossary/>
		<SuspendInterface/>
	</GlossaryButtonClicked>
	<MainMenuButtonClicked>
		<GoToMainMenu />
		<SuspendInterface/>
	</MainMenuButtonClicked>
	<ReplayButtonClicked>
		<RestoreVisitedState />
		<ReplayPage/>
	</ReplayButtonClicked>
	<ResourcesButtonClicked>
		<DisplayResources/>
		<SuspendInterface/>
	</ResourcesButtonClicked>
	<TopicsButtonClicked>
		<DisplayTopics/>
		<SuspendInterface/>
	</TopicsButtonClicked>
	<CourseMapButtonClicked>
		<DisplayCourseMap />
		<SuspendInterface/>
	</CourseMapButtonClicked>
	<ExitButtonClicked>
		<ConfirmExit />
		<SuspendInterface />
	</ExitButtonClicked>
	<ExitConfirmationClicked>
		<StoreParameters />
		<!--UnloadSpecial2 resume="no" /-->
		<UnloadSpecial resume="maybe" />
		<PlayCredits />

		<!--ExitSCO closeWindow="false"/-->
	</ExitConfirmationClicked>
	<ExitCancelClicked>
		<CancelExit />
	</ExitCancelClicked>
	<IdleLimitExceeded>
		<DisplayIdleLimit/>
		<SuspendInterface/>
	</IdleLimitExceeded>
	<SpecialFeatureUnloaded>
		<UnloadSpecial resume="maybe" />
		<ResumeInterface/>
	</SpecialFeatureUnloaded>
	<PageFinishedPlaying>
		<SetPopupButtonsState buttonsEnabled="true" />
		<UpdatePageFinished />
		<RestoreVisitedState />
		<If condition="IfKnowledgeCheckPage">
			<IfTrueActions>
				<EnableAllControls />
			</IfTrueActions>
			<IfFalseActions>
				<If condition="IfAllPopupsVisited">
					<IfTrueActions>
						<If condition="IfPageTypeEquals" pageType="Normal">
							<IfTrueActions>
								<MarkPageComplete />
								<StoreParameters />
								<ExecuteNamedActionSet setName="SetNextButton" />
							</IfTrueActions>
							<IfFalseActions>
							</IfFalseActions>
						</If>
				 	</IfTrueActions>
					<IfFalseActions>
					</IfFalseActions>
				</If>
			</IfFalseActions>
		</If>
		<ExecuteNamedActionSet setName="PerformCertificateCheck" />
		<!--SetButton button="Next" buttonEnabled="true" state="blink" /-->
	</PageFinishedPlaying>
	<PrintComplete>
	<TestMessage TMessage="PrintCom--ResumeInterface" />
		<!--PrintClose/-->
		<ResumeInterface/>

	</PrintComplete>
	<AllPopupVisited>
		<MarkPageComplete />
		<StoreParameters />
		<SetButton button="Next" buttonEnabled="true" state="blink" />
	</AllPopupVisited>
	<PageCompleted/>
	<EnteredSection/>
	<DepartedSection/>
	<SectionCompleted/>
	<ModuleStarted/>
	<EnteredModule/>
	<DepartedModule>
		<StoreProgress/>
	</DepartedModule>
<!-- This code pops up ther certificate upon course completion -->
<!--
	<ModuleComplete>
		<If condition="IfCourseIsComplete">
			<IfTrueActions>
				<SetSCOCompletionStatus complete="true" />
				<SetSCOSuccessStatus success="true" />

				<If condition="IfThisAUEquals" name="GuidedTour">
					<IfTrueActions>
					</IfTrueActions>
					<IfFalseActions>
						<If condition="IfLinkParameterEquals" name="CertificateAwarded" value="1">
							<IfTrueActions>
							</IfTrueActions>
							<IfFalseActions>
								<SetLinkParameter name="CertificateAwarded" value="1" />
								<PresentCertificate />
							</IfFalseActions>
						</If>
					</IfFalseActions>
				</If>
			</IfTrueActions>
			<IfFalseActions>
			</IfFalseActions>
		</If>
		<MarkModuleComplete />
		<StoreParameters />
	</ModuleComplete>
-->
	<IntroStarted>
		<LoadPageFunctions/>
		<SetLinkParameter name="IntroVisited" value="1" />
		<StoreParameters />
	</IntroStarted>
	<IntroFinished>
		<LoadTopicBarMovie />
		<GoToMainMenu/>
	</IntroFinished>
	<IdleLimitExceeded/>
	<ConnectionFault/>

    <ControlClicked>
      <If condition="IfKnowledgeCheckPage">
        <IfTrueActions>
          <CheckInputCompleteStatus />
        </IfTrueActions>
        <IfFalseActions> </IfFalseActions>
      </If>
    </ControlClicked>

    <!--  Knowledge Check Feedback related events -->
    <DoneButtonClicked>
      <EvaluateAndProvideFeedback />
      <!-- if only 1 question and no summary feedback then make forward blink -->
    </DoneButtonClicked>

    <PreviousFeedbackClicked>
      <FeedbackClosedWithPrevious />
    </PreviousFeedbackClicked>

<!--  NEW WAY:   -->
    <NextFeedbackClicked>
      <FeedbackClosedWithNext />
    </NextFeedbackClicked>

    <TryAgainClicked>
    	<FeedbackClosedWithTryAgain />
    </TryAgainClicked>

    <CloseFeedbackClicked>
      <FeedbackClosedWithDone />
      <SetButton button="Next" buttonEnabled="true" state="blink" />
      <SetPopupButtonsState buttonsEnabled="true" />
      <If condition="IfOnLastPageOfTopic">
          <IfTrueActions>
              <ExpandTopicsMap />
              <MarkPageComplete />
          </IfTrueActions>
          <IfFalseActions> </IfFalseActions>
      </If>
    </CloseFeedbackClicked>

    <ProvideSummaryFeedback />

    <UserEnteredText>
      <If condition="IfCurrentQuestionAnswered">
        <IfTrueActions>
          <GoToState name="doneButton_MC" state="on" btnEnabled="true" />
        </IfTrueActions>
        <IfFalseActions> </IfFalseActions>
      </If>
    </UserEnteredText>
    <PerformCertificateCheck>
    	<PKICertCheck>
    </PerformCertificateCheck>
    <PerformCertificateCheck_OLD>
<!--      <XMLDebug>Performing certificate check</XMLDebug> -->
<!--      <If condition="IfAllModulePagesVisited"> -->
      <If condition="IfModuleIsComplete">
        <IfTrueActions>
<!--
          <MarkModuleComplete />
          <ExecuteNamedActionSet setName="ModuleComplete" />
-->
            <!--If condition="IfLinkParameterEquals" name="CertificateAwarded" value="1">
                <IfTrueActions>
                </IfTrueActions>
                <IfFalseActions-->
                    <If condition="IfThisAUEquals" name="guidedTour">
                        <IfTrueActions>
                        </IfTrueActions>
                        <IfFalseActions>
                            <!--SetLinkParameter name="CertificateAwarded" value="1" /-->
                            <PresentCertificate />
                            <SuspendInterface/>
                        </IfFalseActions>
                    </If>
                <!--/IfFalseActions>
            </If-->

        </IfTrueActions>
        <IfFalseActions>
        </IfFalseActions>
      </If>
    </PerformCertificateCheck_OLD>

</ControllerBehavior>