<ControllerBehavior>
	<ModuleLoaded>
		<If condition="IfCourseHasBeenVisited">
			<IfTrueActions>
<TestMessage TMessage="Course visited" />
				<If condition="IfModuleHasBeenVisited">
				    <IfTrueActions>
						<If condition="IfTargetPageSpecified">
							<IfTrueActions>
								<GoToTargetPage />
							</IfTrueActions>
							<IfFalseActions>
								<GoToFirstPage/>
							</IfFalseActions>
						</If>
						<GoToLastPageVisited/>
						<MarkModuleVisited />
						<StoreLinkParameters />
						<InitializeInterface/>
						<LoadBackground />
	 		    	</IfTrueActions>
			    	<IfFalseActions>
						<GoToFirstPage/>
			    	</IfFalseActions>
				</If>
				<InitializeInterface/>
				<LoadBackground />
			</IfTrueActions>
			<IfFalseActions>
<TestMessage TMessage="Course not visited" />
						<!-- a temp resolution for avoid mainmenu display twice -->
				<InitializeInterface/>
				<LoadBackground />
				<InitializeModule1Visited />
				<GoToMainMenu/>
				<SuspendInterface/>

				<!--InitializeInterface/-->
				<!--LoadBackground /-->
			</IfFalseActions>
		</If>
	</ModuleLoaded>
	<ModuleReplaced>


		<!--ExecuteNamedActionSet setName="ModuleLoadedActions" /-->
		<If condition="IfModuleHasBeenVisited">
		    <IfTrueActions>
				<If condition="IfTargetPageSpecified">
					<IfTrueActions>
						<GoToTargetPage />
					</IfTrueActions>
					<IfFalseActions>
						<GoToLastPageVisited/>
					</IfFalseActions>
				</If>
 		    </IfTrueActions>
		    <IfFalseActions>
				<If condition="IfTargetPageSpecified">
						<IfTrueActions>
							<GoToTargetPage />
						</IfTrueActions>
						<IfFalseActions>
							<GoToFirstPage/>
						</IfFalseActions>
				</If>
		    </IfFalseActions>
		</If>
		<MarkModuleVisited />
   		<StoreParameters />
	</ModuleReplaced>
	<PageStartPlayingForCert>
		<UpdatePagePlaying />
		<CacheVisitedState />
        <LoadPageFunctions/>
		<If condition="IfCourseIsCompleteForCert">
			<IfTrueActions>
				<SetButton button="Next" buttonEnabled="true" state="on" />
			</IfTrueActions>
			<IfFalseActions>
				<SetButton button="Next" buttonEnabled="false" state="off" />
			</IfFalseActions>
		</If>
		<SetButton button="Previous" buttonEnabled="true" state="off" />
	</PageStartPlayingForCert>
	<PageFinishedPlayingForCert>
		<RestoreVisitedState />
		<If condition="IfCourseIsCompleteForCert">
			<IfTrueActions>
				<SetButton button="Next" buttonEnabled="true" state="blink" />
			</IfTrueActions>
			<IfFalseActions>
				<SetButton button="Next" buttonEnabled="false" state="off" />
			</IfFalseActions>
		</If>
		<SetButton button="Previous" buttonEnabled="true" state="off" />
	</PageFinishedPlayingForCert>
	<PageStartPlaying>
		<UpdatePagePlaying />
		<CacheVisitedState />
        <LoadPageFunctions/>
		<If condition="IfKnowledgeCheckPage">
			<IfTrueActions>
				<SetButton button="Next" buttonEnabled="false" state="blink" />
				<DisableAllControls />
				<ResetKnowledgeCheck/>
			</IfTrueActions>
			<IfFalseActions>
			</IfFalseActions>
		</If>
		<MarkPageVisited />
		<StoreParameters />
    	<If condition="IfCurrentPageComplete">
		    <IfTrueActions>
				<SetButton button="Next" buttonEnabled="true" state="blink" />
		        <SetButton button="Previous" buttonEnabled="true" state="on" />
		    </IfTrueActions>
		    <IfFalseActions>
		        <SetButton button="Next" buttonEnabled="true" state="on" />
		        <SetButton button="Previous" buttonEnabled="true" state="on" />
		    </IfFalseActions>
		</If>
		<If condition="IfFirstPage">
			<IfTrueActions>
		        <SetButton button="Previous" buttonEnabled="true" state="off" />
			</IfTrueActions>
			<IfFalseActions>
		        <SetButton button="Previous" buttonEnabled="true" state="on" />
			</IfFalseActions>
		</If>
		<If condition="IfLastPage">

			<IfTrueActions>
				<If condition="IfThisAUEquals" name="Module10">
					<IfTrueActions>
						<SetButton button="Next" buttonEnabled="true" state="off" />
					</IfTrueActions>
					<IfFalseActions>
						<SetButton button="Next" buttonEnabled="true" state="on" />
					</IfFalseActions>
				</If>
		        <!--SetButton button="Next" buttonEnabled="true" state="off" /-->
<TestMessage TMessage="LastPage" />
<!--If condition="IfCourseIsComplete">
	<IfTrueActions>
		<TestMessage TMessage="CourseComplete" />
	</IfTrueActions>
	<IfFalseActions>
		<TestMessage TMessage="CourseNotComplete" />
	</IfFalseActions>
</If-->
			</IfTrueActions>
			<IfFalseActions>
		        <SetButton button="Next" buttonEnabled="true" state="on" />
			</IfFalseActions>
		</If>
	</PageStartPlaying>
	<NextButtonClicked>
		<If condition="IfLastPage">
			<IfTrueActions>
<!-- 				<PlayCredits /> -->
				<GoToMainMenu />
				<SuspendInterface/>
			</IfTrueActions>
			<IfFalseActions>
			<If condition="IfKnowledgeCheckPage">
				<IfTrueActions>
					<MarkPageComplete />
					<StoreParameters />
					<GoToNextPage/>
					<ResetKnowledgeCheck/>
				</IfTrueActions>
				<IfFalseActions>
				<If condition="IfAllPopupsVisited">
					<IfTrueActions>
						<MarkPageComplete />
						<StoreParameters />
						<GoToNextPage/>
					</IfTrueActions>
					<IfFalseActions>
						<DisplaySpecialPopup/>
						<SuspendInterface/>
					</IfFalseActions>
				</If>
				</IfFalseActions>
			</If>
			</IfFalseActions>
		</If>
	</NextButtonClicked>
	<PreviousButtonClicked>
	<If condition="IfFirstPage">
			<IfTrueActions>
				<PlayIntro />
			</IfTrueActions>
			<IfFalseActions>
				 <GoToPreviousPage/>
			</IfFalseActions>
		</If>
	</PreviousButtonClicked>
	<CourseMapLinkClicked>
		<TestMessage TMessage="CMLC" />
		<GoToCourseMapLink />
		<ResumeInterface/>
<!--ReplaceLoadedModule /-->
	</CourseMapLinkClicked>
	<TopicButtonClicked>
		<GoToTopic />
	</TopicButtonClicked>
	<PauseButtonClicked>
		<DisplayPause/>
		<SuspendInterface/>
	</PauseButtonClicked>
	<ResumeButtonClicked_508>
		<ResumeTopLevel_508/>
	</ResumeButtonClicked_508>
	<PauseButtonClicked_508>
		<PauseTopLevel_508/>
	</PauseButtonClicked_508>
	<LinkClicked>
		<GoToLink />
	</LinkClicked>
<!-- Course Map -->
	<PageLinkClicked>
		<GoToPageLink />
	</PageLinkClicked>
	<PopupClicked>
		<SetPopupButtonsState buttonsEnabled="false" />
	    <OpenPopupPage/>
		<MarkPopupVisited/>
	</PopupClicked>
	<PopupClosed>
		<ClosePopupPage />
	</PopupClosed>
	<PopupStartPlaying>
		<UpdatePagePlaying />
		<CacheVisitedState />
		<MarkPopupVisited />
	</PopupStartPlaying>
	<PopupFinishedPlaying>
		<UpdatePageFinished />
		<RestoreVisitedState />
		<SetPopupButtonsState buttonsEnabled="true" />
		<MarkPopupComplete />
	</PopupFinishedPlaying>
	<GlossaryButtonClicked>
		<DisplayGlossary/>
		<SuspendInterface/>
	</GlossaryButtonClicked>
	<MainMenuButtonClicked>
				<GoToMainMenu />
				<setShowtextOn />
		<SuspendInterface/>
	</MainMenuButtonClicked>
	<ReplayButtonClicked>
		<RestoreVisitedState />
		<ReplayPage/>
	</ReplayButtonClicked>
	<ResourcesButtonClicked>
		<DisplayResources/>
		<SuspendInterface/>
	</ResourcesButtonClicked>
	<TopicsButtonClicked>
		<DisplayTopics/>
		<SuspendInterface/>
	</TopicsButtonClicked>
	<CourseMapButtonClicked>
	</CourseMapButtonClicked>
	<ExitButtonClicked>
		<ConfirmExit />
		<SuspendInterface />
	</ExitButtonClicked>
	<ExitConfirmationClicked>
		<StoreParameters />
		<CloseWindow/>
	</ExitConfirmationClicked>
	<IdleLimitExceeded>
		<DisplayIdleLimit/>
		<SuspendInterface/>
	</IdleLimitExceeded>
	<SpecialFeatureUnloaded>
    		<UnloadSpecial/>
		<ResumeInterface/>
	</SpecialFeatureUnloaded>
	<PageFinishedPlaying>
		<RestoreVisitedState />
		<If condition="IfUseEmbeddedShowText">
		    <IfTrueActions>
				<ScrollShowText />
 		    </IfTrueActions>
		    <IfFalseActions>
		    </IfFalseActions>
		</If>
		<SetPopupButtonsState buttonsEnabled="true" />
		<If condition="IfAllPopupsVisited">
		    <IfTrueActions>
				<MarkPageComplete />
				<StoreParameters />
						<If condition="IfLastPage">
							<IfTrueActions>
								<If condition="IfThisAUEquals" name="Module10">
									<IfTrueActions>
										<SetButton button="Next" buttonEnabled="true" state="off" />
									</IfTrueActions>
									<IfFalseActions>
										<SetButton button="Next" buttonEnabled="true" state="blink" />
									</IfFalseActions>
								</If>
							</IfTrueActions>
							<IfFalseActions>
								<If condition="IfKnowledgeCheckPage">
									<IfTrueActions>
									</IfTrueActions>
									<IfFalseActions>
										<SetButton button="Next" buttonEnabled="true" state="blink" />
									</IfFalseActions>
								</If>
							</IfFalseActions>
						</If>
 		    </IfTrueActions>
		    <IfFalseActions>
		    </IfFalseActions>
		</If>
	</PageFinishedPlaying>
	<AllPopupVisited>
		<MarkPageComplete />
		<StoreParameters />
		<SetButton button="Next" buttonEnabled="true" state="blink" />
	</AllPopupVisited>
	<PageCompleted/>
	<EnteredSection/>
	<DepartedSection/>
	<SectionCompleted/>
	<ModuleStarted/>
	<EnteredModule/>
	<DepartedModule>
		<StoreProgress/>
	</DepartedModule>
	<ModuleComplete>
		<MarkModuleComplete />
<!--		<StoreLinkParameters />-->
	</ModuleComplete>
	<IntroStarted>
		<LoadPageFunctions/>
	</IntroStarted>
	<IntroFinished>
		<GoToFirstPage/>
		<MarkModuleVisited />
<!--		<StoreLinkParameters />-->
		<InitializeInterface/>
		<LoadBackground />
	</IntroFinished>
	<IdleLimitExceeded/>
	<ConnectionFault/>
	<UserEnteredText>
			<If condition="IfCurrentQuestionAnswered">
				<IfTrueActions>
					<GoToState name="doneButton_MC" state="on" btnEnabled="true" />
				</IfTrueActions>
				<IfFalseActions>
				</IfFalseActions>
			</If>
	</UserEnteredText>
	<ControlClicked>
		<If condition="IfKnowledgeCheckPage">
			<IfTrueActions>
				<If condition="IfSequentialQuestions">
					<IfTrueActions>
						<If condition="IfCurrentQuestionAnswered">
							<IfTrueActions>
								<GoToState name="doneButton_MC" state="on" btnEnabled="true" />
							</IfTrueActions>
							<IfFalseActions>
							</IfFalseActions>
						</If>
					</IfTrueActions>
					<IfFalseActions>
						<If condition="IfKnowledgeCheckComplete">
							<IfTrueActions>
								<GoToState name="doneButton_MC" state="on" btnEnabled="true" />
							</IfTrueActions>
							<IfFalseActions>
							</IfFalseActions>
						</If>
					</IfFalseActions>
				</If>
			</IfTrueActions>
			<IfFalseActions>
				<If condition="IfPageTypeEquals" pageType="Normal">
					<IfTrueActions>
					</IfTrueActions>
					<IfFalseActions>
						<If condition="IfAllTasksCompleted">
							<IfTrueActions>
								<MarkPageComplete />
								<StoreParameters />
								<!--<SetButton button="Next" buttonEnabled="true" state="blink" />-->
							</IfTrueActions>
							<IfFalseActions>
							</IfFalseActions>
						</If>
					</IfFalseActions>
				</If>
			</IfFalseActions>
		</If>
	</ControlClicked>
	<DoneButtonClicked>
		<EvaluateAndProvideFeedback />
	</DoneButtonClicked>
	<PreviousFeedbackClicked>
		<FeedbackClosedWithPrevious />
	</PreviousFeedbackClicked>
	<FeedbackClosed>
		<If condition="IfFeedbackClosedActionEquals" actionName="Done">
			<IfTrueActions>
				<SetButton button="Next" buttonEnabled="true" state="blink" />
				<MarkPageComplete />
				<StoreParameters />
			</IfTrueActions>
			<IfFalseActions>
			</IfFalseActions>
		</If>
		<FeedbackClosedWithNextOrDone />
	</FeedbackClosed>
	<NextButtonClickedOnPage>
		<GoToNextPopup />
	</NextButtonClickedOnPage>
	<PreviousButtonClickedOnPage>
		<GoToPreviousPopup />
	</PreviousButtonClickedOnPage>
	<CourseCompleted>
		<MarkCourseComplete />
	</CourseCompleted>
	  <ExternalLinkClicked>
	      <OpenExternalResource/>
      </ExternalLinkClicked>
</ControllerBehavior>