this.endAttempt(this.mSeqTree.getRoot(), false); 
ret=this.endAttempt(this.mSeqTree.getRoot(), false); 
	doSequencingRequest: function (iRequest)	{		// This method implements the Sequencing Request Process (SB.2.12)		sclog("SequencingRequest [SB.2.12]","seq");	 		var delReq = null;				// Clear global state		this.mEndSession = false;				// All sequencing requests are processed from the First Candidate		var from = this.mSeqTree.getFirstCandidate();				if (iRequest == SEQ_START)		{			// This block implements the Start Sequencing Request Process (SB.2.			sclog("StartSequencingRequest [SB.2.5]","seq");	    				// Make sure this request will begin a new session			if (from == null)			{				// Begin traversing the activity tree from the root				var walk = new Walk();				walk.at = this.mSeqTree.getRoot();								var success = this.processFlow(FLOW_FORWARD, true, walk, false);								if (success)				{					// Delivery request is where flow stopped.					delReq = walk.at.getID();				}			}		}		else if (iRequest == SEQ_RESUMEALL)		{			// This block implements the Resume All Sequencing Request Process			// (SB.2.6)			sclog("ResumeAllSequencingRequest [SB.2.6]","seq");    	  			// Make sure this request will begin a new session			if (from == null)			{				var resume = this.mSeqTree.getSuspendAll();								if (resume != null)				{					delReq = resume.getID();				}			}		}		else if (iRequest == SEQ_CONTINUE)		{			// This block implements the Continue Sequencing Request Process			// (SB.2.7)			sclog("ContinueSequencingRequest [SB.2.7]","seq");    	  			// Make sure the session has already started			if (from != null)			{				// Confirm 'flow' is enabled				var parent = from.getParent();				if (parent == null || parent.getControlModeFlow())				{										// Begin traversing the activity tree from the root					var walk = new Walk();					walk.at = from;										var success = this.processFlow(FLOW_FORWARD, false, walk, false);										if (success)					{						// Delivery request is where flow stopped.						delReq = walk.at.getID();					}					else					{						// If the Continue Navigation Request failed here, 						// we walked off the tree -- end the Sequencing Session						this.terminateDescendentAttempts(this.mSeqTree.getRoot());						this.endAttempt(this.mSeqTree.getRoot(), false);												// Start any subsequent seqencing request from the root						this.mSeqTree.setFirstCandidate(this.mSeqTree.getRoot());												// The sequencing session is over -- set global state						this.mEndSession = true;					}				}			}		}		else if (iRequest == SEQ_EXIT)		{			// This block implements the Exit Sequencing Request Process			// (SB.2.11)			sclog("ExitSequencingRequest [SB.2.11]","seq");    	  			// Make sure the session has already started			if (from != null)			{				if (!from.getIsActive())				{					var parent = from.getParent();										if (parent == null)					{						// The sequencing session is over -- set global state						this.mEndSession = true;					}				}			}		}		else if (iRequest == SEQ_PREVIOUS)		{			// This block implements the Previous Sequencing Request Process			// (SB.2.8)			sclog("PreviousSequencingRequest [SB.2.5]","seq");    	  			// Make sure the session has already started			if (from != null)			{				// Confirm 'flow' is enabled				var parent = from.getParent();				if (parent == null || parent.getControlModeFlow())				{					// Begin traversing the activity tree from the root					var walk = new Walk();					walk.at = from;										var success = this.processFlow(FLOW_BACKWARD, false, walk, false);										if (success)					{						// Delivery request is where flow stopped.						delReq = walk.at.getID();					}				}			}		}		else if (iRequest == SEQ_RETRY)		{			// This block implements the Retry Sequencing Request Process			// (SB.2.10)			// Make sure the session has already started			sclog("RetrySequencingRequest [SB.2.10]","seq");    	  			if (from != null)			{				if (this.mExitAll || (!(from.getIsActive() || from.getIsSuspended())))				{					if (from.getChildren(false) != null)					{						var walk = new Walk();						walk.at = from;						// Set 'Retry' flag						this.setRetry(true);												var success = this.processFlow(FLOW_FORWARD, true, walk, false);												// Reset 'Retry' flag						this.setRetry(false);												if (success)						{							delReq = walk.at.getID();						}					}					else					{						delReq = from.getID();					}				}			}		}		else		{			// This block implements the Choice Sequencing Request Process (SB.2)			sclog("ChoiceSequencingRequest [SB.2.9]","seq");    	  			// The sequencing request identifies the target activity			var target = this.getActivity(iRequest);						if (target != null)			{				var process = true;				var parent = target.getParent();								// Check if the activity should be considered.				if (!target.getIsSelected())				{					// Exception SB.2.9-2					process = false;				}								if (process)				{					var walk = target.getParent();										// Walk up the tree evaluating 'Hide from Choice' rules.					while (walk != null)					{						// Attempt to get rule information from the activity						var hideRules = walk.getPreSeqRules();						var result = null;												if (hideRules != null)						{							result = hideRules.evaluate(RULE_TYPE_HIDDEN,walk, false);						}												// If the rule evaluation did not return null, the activity						// must be hidden.						if (result != null)						{							// Exception SB.2.9-3							walk = null;							process = false;						}						else						{							walk = walk.getParent();						}					}				}								// Confirm the control mode is valid				if (process)				{					if (parent != null)					{						if (!parent.getControlModeChoice())						{							// Exception SB.2.9-4							process = false;						}					}				}								var common = this.mSeqTree.getRoot();								if (process)				{					if (from != null)					{						common = this.findCommonAncestor(from, target);												if (common == null)						{							process = false;						}					}					else					{						// If the sequencing session has not begun, start at the root						from = common;					}										// Choice Case #1 -- The current activity was selected					if (from == target)					{						// Nothing more to do...					}										// Choice Case #2 -- The current activity and target are in the					//                   same cluster					else if (from.getParent() == target.getParent())					{												var dir = FLOW_FORWARD;												if (target.getActiveOrder() < from.getActiveOrder())						{							dir = FLOW_BACKWARD;						}												var walk = from;												// Make sure no control modes or rules prevent the traversal						while (walk != target && process)						{							process = this.evaluateChoiceTraversal(dir, walk);														if (dir == FLOW_FORWARD)							{								walk = walk.getNextSibling(false);							}							else							{								walk = walk.getPrevSibling(false);							}						}					}										// Choice Case #3 -- Path to the target is forward in the tree					else if (from == common)					{												var walk = target.getParent();												while (walk != from && process)						{							process = this.evaluateChoiceTraversal(FLOW_FORWARD, walk);														// Test prevent Activation							if (process)							{								if (!walk.getIsActive() && 									walk.getPreventActivation())								{									// Exception 2.9-6									process = false;									continue;								}							}														walk = walk.getParent();						}												// Evaluate at the common ancestor						if (process)						{							process = this.evaluateChoiceTraversal(FLOW_FORWARD, walk);						}					}										// Choice Case #4 -- Path to target is backward in the tree					else if (target == common)					{						// Don't need to test choiceExit on the current activity 						// because the navigation request validated.						var walk = from.getParent();												while (walk != target && process)						{							// Need to make sure that none of the 'exiting' activities							// prevents us from reaching the common ancestor.							process = walk.getControlModeChoiceExit();							walk = walk.getParent();						}					}										// Choice Case #5 -- Target is a descendent of the ancestor					else					{						var con = null;						var walk = from.getParent();												// Walk up the tree to the common ancestor						while (walk != common && process)						{							process = walk.getControlModeChoiceExit();														if (process && con == null)							{								if (walk.getConstrainChoice())								{									con = walk;								}							}														walk = walk.getParent();						}												// Evaluate constrained choice set						if (process && con != null)						{							var walkCon = new Walk();							walkCon.at = con;														if (target.getCount() > con.getCount())							{								this.processFlow(FLOW_FORWARD, false, walkCon, true);							}							else							{								this.processFlow(FLOW_BACKWARD, false, walkCon, true);   							}														if (target.getParent() != walkCon.at &&								target != walkCon.at)							{								// Exception SB.2.9-8								process = false;							}						}												// Walk down the tree to the target						walk = target.getParent();												while (walk != common && process)						{							process = this.evaluateChoiceTraversal(FLOW_FORWARD, walk);														// Test prevent Activation							if (process)							{								if (!walk.getIsActive() && 									walk.getPreventActivation())								{									// Exception 2.9-6									process = false;									continue;								}							}							walk = walk.getParent();						}												// Evaluate the common ancestor						if (process)						{							process = this.evaluateChoiceTraversal(FLOW_FORWARD,								walk);						}					}										// Did we reach the target successfully?					if (process)					{												// Is the target a cluster						if (target.getChildren(false) != null)						{							var walk = new Walk();							walk.at = target;														var success = this.processFlow(FLOW_FORWARD,								true, walk, false);														if (success)							{								delReq = walk.at.getID();							}							else							{								if (this.mSeqTree.getCurrentActivity() != null &&									common != null)								{									this.terminateDescendentAttempts(common);									this.endAttempt(common, false);																		// Move the current activity									this.mSeqTree.setCurrentActivity(target);									this.mSeqTree.setFirstCandidate(target);								}							}						}						else						{							delReq = target.getID();						}					}				}			}			else			{			// Exception SB.2.9-1			}		}				return delReq;	},
6251	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6251/13ee04e214149cc9fc055550730d017e420331db/ADLSequencer.js/clean/Modules/Scorm2004/scripts/adl2js/ADLSequencer.js