ITIL V3 Service Operation Processes

  • Upload
    vudang

  • View
    239

  • Download
    9

Embed Size (px)

Citation preview

_run.cmdclsstart java -classpath WebServerLite.jar WebServerMain . 9090ping -n 5 localhost > nulstart http://127.0.0.1:9090/Content/scp/BPage.htm?CBTLAUNCH=ib_itil_a08_it_enus_c

WebServerLite.jar

META-INF/MANIFEST.MF

Manifest-Version: 1.0Created-By: 1.5.0_05 (Sun Microsystems Inc.)

Logger.class

public synchronized class Logger { private void Logger(); public static void log(String, String, int);}

RequestThread.class

public synchronized class RequestThread implements Runnable { private java.net.Socket _socket; private java.io.File _rootDir; public void RequestThread(java.net.Socket, java.io.File); public void run();}

ServerSideIncludeEngine.class

public synchronized class ServerSideIncludeEngine { private void ServerSideIncludeEngine(); public static void deliverDocument(java.io.BufferedOutputStream, java.io.File) throws java.io.IOException; private static void parse(java.io.BufferedOutputStream, java.util.HashSet, java.io.File) throws java.io.IOException;}

ServerSideScriptEngine.class

public synchronized class ServerSideScriptEngine { public void ServerSideScriptEngine(); public static void execute(java.io.BufferedOutputStream, java.util.HashMap, java.io.File, String) throws Throwable;}

WebServer.class

public synchronized class WebServer { private java.io.File _rootDir; private int _port; private boolean _active; public void WebServer(String, int) throws WebServerException; public void activate() throws WebServerException;}

WebServerConfig.class

public synchronized class WebServerConfig { public static final String VERSION = Jibble Web Server 1.0 - An extremely small Java web server; public static final String DEFAULT_ROOT_DIRECTORY = .; public static final int DEFAULT_PORT = 80; public static final String[] DEFAULT_FILES; public static final byte[] LINE_SEPARATOR; public static final java.util.HashSet SSI_EXTENSIONS; public static final java.util.HashMap MIME_TYPES; private void WebServerConfig(); public static String getExtension(java.io.File); static void ();}

WebServerException.class

public synchronized class WebServerException extends Exception { public void WebServerException(String);}

WebServerMain.class

public synchronized class WebServerMain { public void WebServerMain(); public static void main(String[]);}

Content/scp/APIWrapper.js/*********************************************************************************** FileName: APIWrapper.js*********************************************************************************//*********************************************************************************** Modified with permission by Skillsoft Corporation.**** Code based on APIWrapper.js by Concurrent Technologies Corporation (CTC)*********************************************************************************//*********************************************************************************** Concurrent Technologies Corporation (CTC) grants you ("Licensee") a non-** exclusive, royalty free, license to use, modify and redistribute this** software in source and binary code form, provided that i) this copyright** notice and license appear on all copies of the software; and ii) Licensee does** not utilize the software in a manner which is disparaging to CTC.**** This software is provided "AS IS," without a warranty of any kind. ALL** EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY** IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-** INFRINGEMENT, ARE HEREBY EXCLUDED. CTC AND ITS LICENSORS SHALL NOT BE LIABLE** FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR** DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL CTC OR ITS** LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,** INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER** CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OFWBT Creation Guide for LMS 5.x 39** OR INABILITY TO USE SOFTWARE, EVEN IF CTC HAS BEEN ADVISED OF THE POSSIBILITY** OF SUCH DAMAGES.*********************************************************************************//********************************************************************************* This file is part of the ADL Sample API Implementation intended to provide** an elementary example of the concepts presented in the ADL Sharable** Content Object Reference Model (SCORM).**** The purpose in wrapping the calls to the API is to (1) provide a** consistent means of finding the LMS API implementation within the window** hierarchy and (2) to validate that the data being exchanged via the** API conforms to the defined CMI data types.**** This is just one possible example for implementing the API guidelines for** runtime communication between an LMS and executable content components.** There are several other possible implementations.**** Usage: Executable course content can call the API Wrapper** functions as follows:**** javascript:** var result = doLMSInitialize();** if (result != true)** {** // handle error** }**** authorware** result := ReadURL("javascript:doLMSInitialize()", 100)*********************************************************************************/var _Debug = false; // set this to false to turn debugging off // and get rid of those annoying alert boxes.

// Define exception/error codesvar _NoError = 0;var _GeneralException = 101;var _ServerBusy = 102;var _InvalidArgumentError = 201;var _ElementCannotHaveChildren = 202;var _ElementIsNotAnArray = 203;var _NotInitialized = 301;var _NotImplementedError = 401;var _InvalidSetValue = 402;var _ElementIsReadOnly = 403;var _ElementIsWriteOnly = 404;var _IncorrectDataType = 405;

// local variable definitionsvar apiHandle = null;var api = null;

// player needs scorm version, either "1.2" or "2004"var scormVersion = "1.2";

/*********************************************************************************** Function: doLMSInitialize()** Inputs: None** Return: CMIBoolean true if the initialization was successful, or** CMIBoolean false if the initialization failed.**** Description:** Initialize communication with LMS by calling the LMSInitialize** function which will be implemented by the LMS.*********************************************************************************/function doLMSInitialize(){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSInitialize was not successful."); return "false"; }

var result = api.LMSInitialize("");

if (result.toString() != "true") { var err = ErrorHandler(); }

return result.toString();}

/*********************************************************************************** Function doLMSFinish()** Inputs: None** Return: CMIBoolean true if successful** CMIBoolean false if failed.**** Description:** Close communication with LMS by calling the LMSFinish** function which will be implemented by the LMS*********************************************************************************/function doLMSFinish(){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSFinish was not successful."); return "false"; } else { // call the LMSFinish function that should be implemented by the API

var result = api.LMSFinish(""); if (result.toString() != "true") { var err = ErrorHandler(); }

} return result.toString();}

/*********************************************************************************** Function doLMSGetValue(name)** Inputs: name - string representing the cmi data model defined category or** element (e.g. cmi.core.student_id)** Return: The value presently assigned by the LMS to the cmi data model** element defined by the element or category identified by the name** input value.**** Description:** Wraps the call to the LMS LMSGetValue method*********************************************************************************/function doLMSGetValue(name){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSGetValue was not successful."); return ""; } else { var value = api.LMSGetValue(name); return value.toString(); }}

/*********************************************************************************** Function doLMSSetValue(name, value)** Inputs: name -string representing the data model defined category or element** value -the value that the named element or category will be assigned** Return: CMIBoolean true if successful** CMIBoolean false if failed.**** Description:** Wraps the call to the LMS LMSSetValue function*********************************************************************************/function doLMSSetValue(name, value){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSSetValue was not successful."); return; } else { var result = api.LMSSetValue(name, value); if (result.toString() != "true") { var err = ErrorHandler(); } } return result.toString();}

/*********************************************************************************** Function doLMSCommit()** Inputs: None** Return: None**** Description:** Call the LMSCommit function*********************************************************************************/function doLMSCommit(){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSCommit was not successful."); return "false"; } else { var result = api.LMSCommit(""); if (result != "true") { var err = ErrorHandler(); } } return result.toString();}

/*********************************************************************************** Function doLMSGetLastError()** Inputs: None** Return: The error code that was set by the last LMS function call**** Description:** Call the LMSGetLastError function*********************************************************************************/function doLMSGetLastError(){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSGetLastError was not successful."); //since we can't get the error code from the LMS, return a general error return _GeneralException; } return api.LMSGetLastError().toString();}

/*********************************************************************************** Function doLMSGetErrorString(errorCode)** Inputs: errorCode - Error Code** Return: The textual description that corresponds to the input error code**** Description:** Call the LMSGetErrorString function**********************************************************************************/function doLMSGetErrorString(errorCode){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSGetErrorString was not successful."); } return api.LMSGetErrorString(errorCode).toString();}

/*********************************************************************************** Function doLMSGetDiagnostic(errorCode)** Inputs: errorCode - Error Code(integer format), or null** Return: The vendor specific textual description that corresponds to the** input error code**** Description:** Call the LMSGetDiagnostic function*********************************************************************************/function doLMSGetDiagnostic(errorCode){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSGetDiagnostic was not successful."); } return api.LMSGetDiagnostic(errorCode).toString();}

/*********************************************************************************** Function LMSIsInitialized()** Inputs: none** Return: true if the LMS API is currently initialized, otherwise false**** Description:** Determines if the LMS API is currently initialized or not.*********************************************************************************/function LMSIsInitialized(){ // there is no direct method for determining if the LMS API is initialized // for example an LMSIsInitialized function defined on the API so we'll try // a simple LMSGetValue and trap for the LMS Not Initialized Error var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nLMSIsInitialized() failed."); return false; } else { var value = api.LMSGetValue("cmi.core.student_name"); var errCode = api.LMSGetLastError().toString(); if (errCode == _NotInitialized) { return false; } else { return true; } }}

/*********************************************************************************** Function ErrorHandler()** Inputs: None** Return: The current value of the LMS Error Code**** Description:** Determines if an error was encountered by the previous API call** and if so, displays a message to the user. If the error code** has associated text it is also displayed.*********************************************************************************/function ErrorHandler(){ var api = getAPIHandle(); if (api == null) { if (_Debug) alert("Unable to locate the LMS's API Implementation.\nCannot determine LMS error code."); return; }

// check for errors caused by or from the LMS var errCode = api.LMSGetLastError().toString(); if (errCode != _NoError) { // an error was encountered so display the error description var errDescription = api.LMSGetErrorString(errCode); if (_Debug) { errDescription += "\n"; errDescription += api.LMSGetDiagnostic(null); // by passing null to LMSGetDiagnostic, we get any available diagnostics // on the previous error. alert(errDescription); } } return errCode;}

/********************************************************************************** Function getAPIHandle()** Inputs: None** Return: value contained by APIHandle**** Description:** Returns the handle to API object if it was previously set,** otherwise it returns null*********************************************************************************/function getAPIHandle(){ if (apiHandle == null) { apiHandle = getAPI(); } return apiHandle;}

/*********************************************************************************** Function findAPI(win)** Inputs: win - a Window Object** Return: If an API object is found, it's returned, otherwise null is returned**** Description:** This function looks for an object named API in parent and opener windows*********************************************************************************/function findAPI(win){ // Search the window hierarchy for an object named "API" // Look in the current window (win) and recursively look in any child frames if (_Debug) { //alert("Window location is:\n" + win.location.href); } if (win.API != null) { if (_Debug) { alert("Found API in this window."); } return win.API; }

if (win.length > 0) { if (_Debug) { alert("Looking for API in window's frames."); } for (var i=0;i 0 && document.body.clientHeight > 0 && self.screen.height < 801 && document.body.clientHeight < 560) { // RGO - using '801' above doesn't seem right for a height check. // That value seems more appropriate for width. Leave for now unless // we find it is breaking something. var htmlOffset = 20; this.applet8x6offset = 553 - document.body.clientHeight; this.pageHtmlTop -= this.applet8x6offset; this.appletTop -= this.applet8x6offset; this.pageHtmlOrig -= (this.applet8x6offset - htmlOffset); this.htmlHeaderTop = this.applet8x6offset - htmlOffset; this.pageHtmlHeight = this.pageHtmlHeight - htmlOffset; }} else if (is.ie) { this.appletWidth -= 1; if (isReducedScreenMode) { // reducing visible height of header to 18 by moving down appletTop by 36 var headerDelta = 36; this.appletTop -= headerDelta; // reducing content area by 7 pixels by shifting content up var contentDelta = 7; this.pageHtmlHeight -= contentDelta; this.htmlHeaderHeight = 18; this.pageHtmlTop -= (headerDelta+contentDelta); this.pageHtmlOrig = this.htmlHeaderHeight; }}}

/** * Updates the applet sizes for Code Judge content * Code Judge courses don't use a specified width and height. * The applet sizes are adjusted for reducedScreenMode in support of IE and * 800x600 screen resolution. */function cjGeom(width, height, isReducedScreenMode) {if (is.ie) { this.appletWidth -= 1;if (isReducedScreenMode) {this.appletNavbarHeight = 18;var navbarDelta = 32;this.appletToolbarHeight = 18;this.htmlHeaderHeight = 18;var headerDelta = 36;var contentDelta = 7;this.appletHeight -= (2*navbarDelta +headerDelta +contentDelta);this.appletTop = -this.appletNavbarHeight;this.applet1Height = this.appletNavbarHeight;this.pageHtmlHeight -= contentDelta;this.pageHtmlTop = this.pageHtmlHeight+this.htmlHeaderHeight;this.pageHtmlOrig = this.htmlHeaderHeight;}}else if (is.nav) {// for netscape and 8x6if (self.screen.height > 0 && document.body.clientHeight > 0 && self.screen.height < 801 && document.body.clientHeight < 560) {var htmlOffset = 20; this.applet8x6offset = 553 - document.body.clientHeight; this.pageHtmlTop -= this.applet8x6offset; this.appletTop -= this.applet8x6offset; this.pageHtmlOrig -= (this.applet8x6offset - htmlOffset); this.htmlHeaderTop = this.applet8x6offset - htmlOffset; this.pageHtmlHeight = this.pageHtmlHeight - htmlOffset;}}}

/** * Updates the applet sizes for CCA Dialogue content * CCA Dialogue courses use the specified width and height set in the launch page * which are the document.body.clientWidth and document.body.clientHeight. * The applet sizes are adjusted for reducedScreenMode in support of IE and * 800x600 screen resolution. */function ccaDialogueGeom(width, height, isReducedScreenMode) {if (isReducedScreenMode && is.ie) {this.appletNavbarHeight = 18;this.appletToolbarHeight = 18;this.htmlHeaderHeight = 18;this.pageHtmlOrig = this.htmlHeaderHeight;height = this.reducedClientHeight;width = this.appletWidth;}this.appletHeight = height + this.appletNavbarHeight;this.appletWidth = width;this.appletTop = -this.appletNavbarHeight;this.pageHtmlHeight = height - this.appletNavbarHeight;this.pageHtmlWidth = width;this.pageHtmlTop = height - this.appletNavbarHeight;this.htmlHeaderHeight = 1; // setting this to 1 allows us to tab to the accessible link on the logo imagethis.htmlHeaderWidth = this.appletWidth;this.pageHtmlCapHeight = height - (this.htmlHeaderHeight + this.appletNavbarHeight);this.pageHtmlCapTop = height - this.appletNavbarHeight;this.appletLeft = -this.appletWidth;this.splashWidth = this.appletWidth; // used only in IE this.applet1Height = this.getNavAndToolbarSum(); this.pageHtmlContentWidth = this.pageHtmlWidth; this.pageHtmlContentHeight = this.pageHtmlHeight; this.pageHtmlContentCapHeight = this.pageHtmlCapHeight;

if (is.ie) { this.appletWidth -= 1;}else if (is.nav) {// for netscape and 8x6if (self.screen.height > 0 && document.body.clientHeight > 0 &&self.screen.height < 801 && document.body.clientHeight < 560) {this.applet8x6offset = 553 - height;this.appletTop -= this.applet8x6offset;this.appletHeight += this.applet8x6offset;this.pageHtmlTop -= this.applet8x6offset;}}}

/** * Updates the applet sizes for CCA content (not dialogue or code judge) content * CCA courses use the specified width and height set in the launch page which are * the document.body.clientWidth and document.body.clientHeight. * The applet sizes are adjusted for reducedScreenMode in support of IE and * 800x600 screen resolution. */function ccaGeom(width, height, isReducedScreenMode) {if (isReducedScreenMode && is.ie) {this.appletNavbarHeight = 18;this.appletToolbarHeight = 18;this.htmlHeaderHeight = 18;this.pageHtmlOrig = this.htmlHeaderHeight;height = this.reducedClientHeight;}else {var ccaAppletHeight = 636;var minCCAFrameHeight = ccaAppletHeight-this.getNavAndToolbarSum();// enforce a minimum height for standard CCA contentif (height < minCCAFrameHeight) {height = minCCAFrameHeight;}}this.appletHeight = height + this.getNavAndToolbarSum();this.appletWidth = width;this.appletTop = -this.getNavAndToolbarSum();this.pageHtmlHeight = height - (this.htmlHeaderHeight + this.getNavAndToolbarSum());this.pageHtmlWidth = width;this.pageHtmlTop = height - this.getNavAndToolbarSum(); this.pageHtmlCapHeight = height - (this.htmlHeaderHeight + this.appletNavbarHeight);this.pageHtmlCapTop = height - this.appletNavbarHeight;

this.htmlHeaderWidth = this.appletWidth;this.appletLeft = -this.appletWidth;this.splashWidth = this.appletWidth;this.applet1Height = this.getNavAndToolbarSum();

if (is.ie) { this.appletWidth -= 1;} else if (is.nav) {// for netscape and 8x6if (self.screen.height > 0 && document.body.clientHeight > 0 && self.screen.height < 801 && document.body.clientHeight < 560) {var htmlOffset = 20; this.applet8x6offset = 553 - document.body.clientHeight; this.pageHtmlTop -= this.applet8x6offset; this.appletTop -= this.applet8x6offset; this.pageHtmlOrig -= (this.applet8x6offset - htmlOffset); this.htmlHeaderTop = this.applet8x6offset - htmlOffset; this.pageHtmlHeight = this.pageHtmlHeight - htmlOffset;}}}

/** * Updates the applet sizes for custom content. Custom content does not need * the toolbar. * The parent customWidth and customHeight are passed in here as opposed to the * document.body.clientWidth and document.body.clientHeight. * The isReducedScreenMode flag is ignored as we don't use the special 8x6 skin * for custom content. * */function customGeom(width, height, isReducedScreenMode) {this.appletWidth = width;this.appletHeight = height + this.appletNavbarHeight;this.pageHtmlWidth = this.appletWidth;this.pageHtmlTop = height - this.appletNavbarHeight; this.appletTop = -this.appletNavbarHeight;this.htmlHeaderWidth = this.appletWidth;this.appletLeft = -this.appletWidth;this.splashWidth = this.appletWidth; this.applet1Height = this.appletNavbarHeight;

if (is.ie) { this.appletWidth -= 1;this.pageHtmlHeight = this.pageHtmlTop - this.htmlHeaderHeight;// adjust for 8x6 in ie (not using the 8x6 skin)if (self.screen.height < 801 && document.body.clientHeight < 560) {//this.pageHtmlTop = height - 67;//this.pageHtmlHeight = this.pageHtmlTop - this.htmlHeaderHeight;}} else if (is.nav) {this.pageHtmlHeight = this.pageHtmlTop - this.htmlHeaderHeight - 4;if (self.screen.height > 0 && document.body.clientHeight > 0 &&self.screen.height < 801 && document.body.clientHeight < 560) {// adjust for 8x6 in NSvar htmlOffset = 20; // move up the applet to reveal more of the navbarthis.applet8x6offset = 553 - document.body.clientHeight;this.appletTop -= this.applet8x6offset;this.pageHtmlTop -= this.applet8x6offset;this.pageHtmlOrig -= (this.applet8x6offset - htmlOffset);this.htmlHeaderTop = this.applet8x6offset - htmlOffset;this.pageHtmlHeight -= htmlOffset;}} else if (is.mac || is.safari) {this.pageHtmlHeight = this.pageHtmlTop - this.htmlHeaderHeight; }}

/** * Updates the applet sizes for E3 Dialogue content * E3 Dialogue courses use the specified width and height set in the launch page * which are the document.body.clientWidth and document.body.clientHeight. * The applet sizes are adjusted for reducedScreenMode in support of IE and * 800x600 screen resolution. * */function e3DialogueGeom(width, height, isReducedScreenMode) {var header8x6Offset = 0;var navbar8x6Offset = 0;if (isReducedScreenMode && is.ie) {// reducing visible height of header to 18 by moving down appletTop by 36header8x6Offset = 36;// reducing visible height of navbars to 18navbar8x6Offset = 32;this.appletToolbarHeight = 18;this.htmlHeaderHeight = 18;this.pageHtmlOrig = this.htmlHeaderHeight;height = this.reducedClientHeight;width = this.appletWidth;}this.appletHeight = height + this.getNavAndToolbarSum() +navbar8x6Offset +header8x6Offset;this.appletWidth = width;this.appletTop = -this.getNavAndToolbarSum() - header8x6Offset;this.pageHtmlTop = height - this.getNavAndToolbarSum() +navbar8x6Offset;this.pageHtmlHeight = this.pageHtmlTop - this.htmlHeaderHeight;this.pageHtmlWidth = width;this.rspPageHeight = height - this.appletNavbarHeight +navbar8x6Offset; // not using toolbarthis.htmlHeaderWidth = this.appletWidth;this.appletLeft = -this.appletWidth;this.splashWidth = this.appletWidth; this.applet1Height = this.getNavAndToolbarSum();

if (is.ie) {this.appletWidth -= 1;} else if (is.nav) {// for netscape and 8x6if (self.screen.height > 0 && document.body.clientHeight > 0 && self.screen.height < 801 && document.body.clientHeight < 560) {this.applet8x6offset = 553 - height;this.appletTop -= this.applet8x6offset;this.appletHeight += this.applet8x6offset;this.pageHtmlTop -= this.applet8x6offset;}}}

/** * Updates the applet sizes for E3 content * E3 courses don't use the specified width and height. We just modify the * defaults for BS. * The applet sizes are adjusted for reducedScreenMode in support of IE and * 800x600 screen resolution. */function e3Geom(width, height, isReducedScreenMode) { var header8x6Offset = 0; var toobar8x6Offset = 0; if (isReducedScreenMode && is.ie) { // reducing visible height of header to 18 by moving down appletTop by 36 header8x6Offset = 36 // reducing each toolbar by 7 toobar8x6Offset = 7; this.appletToolbarHeight = 18; this.htmlHeaderHeight = 18; this.pageHtmlOrig = this.htmlHeaderHeight; } // default pageHtmlHeight is based on standard toolbar size so we must also subtract the toolbar8x6Offset this.pageHtmlHeight -= (this.appletToolbarHeight + toobar8x6Offset); // reduce content area for toolbar (432 for 10x7) // reduce appletHeight by the toolbar8x6Offset to account for smaller bottom toolbar this.appletHeight += (this.appletToolbarHeight - toobar8x6Offset); // 636 for 10x7 this.appletTop = -this.getNavAndToolbarSum() - header8x6Offset; this.pageHtmlWidth = 788; this.pageHtmlTop = this.pageHtmlHeight + this.htmlHeaderHeight; this.applet1Height = this.getNavAndToolbarSum();

this.pageHtmlContentHeight = this.pageHtmlHeight; this.pageHtmlContentWidth = this.pageHtmlWidth;

if (is.ie) { this.appletWidth -= 1; } else if (window.location.href.indexOf("/ja/") > -1 || window.location.href.indexOf("/jp/") > -1) { this.pageHtmlHeight -= 11; } if (is.nav) { // for netscape and 8x6 if (self.screen.height > 0 && document.body.clientHeight > 0 && self.screen.height < 801 && document.body.clientHeight < 560) { var htmlOffset = 20; this.applet8x6offset = 553 - document.body.clientHeight; this.pageHtmlTop -= this.applet8x6offset; this.appletTop -= this.applet8x6offset; this.pageHtmlOrig -= (this.applet8x6offset - htmlOffset); this.htmlHeaderTop = this.applet8x6offset - htmlOffset; this.pageHtmlHeight = this.pageHtmlHeight - htmlOffset; } }}

Content/scp/assets/html/js/exit.js/** * Code for handling an attempted close of the browser using the browser 'X' * button. In some cases, the player will display a warning message giving * the user the option to return to the player instead of closing the browser. * This is mainly to prevent loss of scores/progress that results when the * DOM is unloaded before the player has an opportunity to post the scores. * This can happen in SCORM mode or when the user exists during an E3 test in * any mode. * */// Is the display of this warning enabled?var exitWarningEnabled = false;var STR_NOT_INITIALIZED = "not_initialized";var exitWarnStr = STR_NOT_INITIALIZED;// Is player closing via the player 'Exit' button?var exitButtonClicked = false;

function setExitWarnStr(encodedStr) { if (exitWarnStr == STR_NOT_INITIALIZED) { exitWarnStr = decodeTitle(encodedStr); }} function exitCheck(){ if (exitWarningEnabled && !exitButtonClicked) { return exitWarnStr; }}

Content/scp/assets/html/js/FlashTag.js/*Macromedia(r) Flash(r) JavaScript Integration Kit License

Copyright (c) 2005 Macromedia, inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentation and/orother materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any, mustinclude the following acknowledgment:

"This product includes software developed by Macromedia, Inc.(http://www.macromedia.com)."

Alternately, this acknowledgment may appear in the software itself, if andwherever such third-party acknowledgments normally appear.

4. The name Macromedia must not be used to endorse or promote products derivedfrom this software without prior written permission. For written permission,please contact [email protected].

5. Products derived from this software may not be called "Macromedia" or"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in theirname.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA ORITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENTOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAYOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCHDAMAGE.

--

This code is part of the Flash / JavaScript Integration Kit:http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrellhttp://weblogs.macromedia.com/cantrell/mailto:[email protected]

Mike Chambershttp://weblogs.macromedia.com/mesh/mailto:[email protected]

Macromedia*/

/** * Generates a browser-specific Flash tag. Create a new instance, set whatever * properties you need, then call either toString() to get the tag as a string, or * call write() to write the tag out. * * The properties src, width, height and version are required when creating a new * instance of the FlashTag, but there are setters to let you change them, as well. * That way, if you want to render more than one piece of Flash content, you can do * so without creating a new instance of the tag. * * For more information on supported parameters, see: * http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12701 */

/** * Creates a new instance of the FlashTag. * src: The path to the SWF file. * width: The width of your Flash content. * height: the height of your Flash content. * version: the required version of the Flash Player for the specified content. * * These are the only 4 properites that are required. */function FlashTag(src, width, height, version, tabindex){ if (arguments.length < 4) { throw new Exception('RequiredParameterException', 'You must pass in a src, width, height, and version when creating a FlashTag.'); }

// Required this.src = src; this.width = width; this.height = height; this.version = version; this.tabindex = tabindex;

this.id = null; this.flashVars = null; this.flashVarsStr = null; this.genericParam = new Object(); this.ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;}

/** * Specifies the location (URL) of the Flash content to be loaded. */FlashTag.prototype.setSource = function(src){ this.src = src; }

/** * Specifies the width of the Flash content in either pixels or percentage of browser window. */FlashTag.prototype.setWidth = function(w){ this.width = width; }

/** * Specifies the height of the Flash content in either pixels or percentage of browser window. */FlashTag.prototype.setHeight = function(h){ this.h = height; }

/** * The required version of the Flash Player for the specified content. */FlashTag.prototype.setVersion = function(v){ this.version = v;}

/** * Identifies the Flash content to the host environment (a web browser, for example) so that * it can be referenced using a scripting language. This value will be used for both the 'id' * and 'name' attributes depending on the client platform and whether the object or the embed * tag are used. */FlashTag.prototype.setId = function(id){ this.id = id;}

/** * Specifies the background color of the Flash content. Use this attribute to override the background * color setting specified in the Flash file. This attribute does not affect the background * color of the HTML page. */FlashTag.prototype.setBgcolor = function(bgc){ if (bgc.charAt(0) != '#') { bgc = '#' + bgc; } this.genericParam['bgcolor'] = bgc;}

/** * Allows you to set multiple Flash vars at once rather than adding them one at a time. The string * you pass in should contain all your Flash vars, properly URL encoded. This function can be used in * conjunction with addFlashVar. */FlashTag.prototype.addFlashVars = function(fvs){ this.flashVarsStr = fvs;}

/** * Used to send root level variables to the Flash content. You can add as many name/value pairs as * you want. The formatting of the Flash vars (turning them into a query string) is handled automatically. */FlashTag.prototype.addFlashVar = function(n, v){ if (this.flashVars == null) { this.flashVars = new Object(); }

this.flashVars[n] = v;}

/** * Used to remove Flash vars. This is primarily useful if you want to reuse an instance of the FlashTag * but you don't want to send the same variables to more than one piece of Flash content. */FlashTag.prototype.removeFlashVar = function(n){ if (this.flashVars != null) { this.flashVars[n] = null; }}

/** * (true, false) Specifies whether the browser should start Java when loading the Flash Player for the first time. * The default value is false if this property is not set. */FlashTag.prototype.setSwliveconnect = function(swlc){ this.genericParam['swliveconnect'] = swlc;}

/** * (true, false) Specifies whether the Flash content begins playing immediately on loading in the browser. * The default value is true if this property is not set. */FlashTag.prototype.setPlay = function(p){ this.genericParam['play'] = p;}

/** * (true, false) Specifies whether the Flash content repeats indefinitely or stops when it reaches the last frame. * The default value is true if this property is not set. */FlashTag.prototype.setLoop = function(l){ this.genericParam['loop'] = l;}

/** * (true,false) Whether or not to display the full Flash menu. If false, displays a menu that contains only * the Settings and the About Flash options. */FlashTag.prototype.setMenu = function(m){ this.genericParam['menu'] = m;}

/** * (low, high, autolow, autohigh, best) Sets the quality at which the Flash content plays. */FlashTag.prototype.setQuality = function(q){ if (q != 'low' && q != 'high' && q != 'autolow' && q != 'autohigh' && q != 'best') { throw new Exception('UnsupportedValueException', 'Supported values are "low", "high", "autolow", "autohigh", and "best".'); } this.genericParam['quality'] = q;}

/** * (showall, noborder, exactfit) Determins how the Flash content scales. */FlashTag.prototype.setScale = function(sc){ if (sc != 'showall' && sc != 'noborder' && sc != 'exactfit' && sc != 'bestfit' && sc != 'noscale' ) { throw new Exception('UnsupportedValueException', 'Supported values are "showall", "noborder", and "exactfit".'); } this.genericParam['scale'] = sc;}

/** * (l, t, r, b) Align the Flash content along the corresponding edge of the browser window and crop * the remaining three sides as needed. */FlashTag.prototype.setAlign= function(a){ if (a != 'l' && a != 't' && a != 'r' && a != 'b') { throw new Exception('UnsupportedValueException', 'Supported values are "l", "t", "r" and "b".'); } this.genericParam['align'] = a;}

/** * (l, t, r, b, tl, tr, bl, br) Align the Flash content along the corresponding edge of the browser * window and crop the remaining three sides as needed. */FlashTag.prototype.setSalign= function(sa){ if (sa != 'l' && sa != 't' && sa != 'r' && sa != 'b' && sa != 'tl' && sa != 'tr' && sa != 'bl' && sa != 'br') { throw new Exception('UnsupportedValueException', 'Supported values are "l", "t", "r", "b", "tl", "tr", "bl" and "br".'); } this.genericParam['salign'] = sa;}

/** * (window, opaque, transparent) Sets the Window Mode property of the Flash content for transparency, * layering, and positioning in the browser. */FlashTag.prototype.setWmode = function(wm){ if (wm != 'window' && wm != 'opaque' && wm != 'transparent' && wm != '') { throw new Exception('UnsupportedValueException', 'Supported values are "window", "opaque", and "transparent".'); } this.genericParam['wmode'] = wm;}

/** * Specifies the base directory or URL used to resolve all relative path statements in your Flash content. */FlashTag.prototype.setBase = function(base){ this.genericParam['base'] = base;}

/** * (never, always) Controls the ability to perform outbound scripting from within Flash content. */FlashTag.prototype.setAllowScriptAccess = function(sa){ if (sa != 'never' && sa != 'always') { throw new Exception('UnsupportedValueException', 'Supported values are "never" and "always".'); } this.genericParam['allowScriptAccess'] = sa;}

/** * Get the Flash tag as a string. */FlashTag.prototype.toString = function(){ var flashTag = new String(); if (this.ie) { flashTag += ''; flashTag += '';

for (var n in this.genericParam) { if (this.genericParam[n] != null) { flashTag += ''; } }

if (this.flashVars != null) { var fv = this.getFlashVarsAsString(); if (fv.length > 0) { flashTag += ''; } } flashTag += ''; } else { flashTag += ''; flashTag += ''; } return flashTag;}

/** * Write the Flash tag out. Pass in a reference to the document to write to. */FlashTag.prototype.write = function(doc){ doc.write(this.toString());}

/** * Write the Flash tag out. Pass in a reference to the document to write to. */FlashTag.prototype.getFlashVarsAsString = function(){ var qs = new String(); for (var n in this.flashVars) { if (this.flashVars[n] != null) { qs += (escape(n)+'='+escape(this.flashVars[n])+'&'); } }

if (this.flashVarsStr != null) { return qs + this.flashVarsStr; }

return qs.substring(0, qs.length-1);}

Content/scp/assets/html/js/Exception.js/*Macromedia(r) Flash(r) JavaScript Integration Kit License

Copyright (c) 2005 Macromedia, inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentation and/orother materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any, mustinclude the following acknowledgment:

"This product includes software developed by Macromedia, Inc.(http://www.macromedia.com)."

Alternately, this acknowledgment may appear in the software itself, if andwherever such third-party acknowledgments normally appear.

4. The name Macromedia must not be used to endorse or promote products derivedfrom this software without prior written permission. For written permission,please contact [email protected].

5. Products derived from this software may not be called "Macromedia" or"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in theirname.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA ORITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENTOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAYOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCHDAMAGE.

--

This code is part of the Flash / JavaScript Integration Kit:http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrellhttp://weblogs.macromedia.com/cantrell/mailto:[email protected]

Mike Chambershttp://weblogs.macromedia.com/mesh/mailto:[email protected]

Macromedia*/

/** * Create a new Exception object. * name: The name of the exception. * message: The exception message. */function Exception(name, message){ if (name) this.name = name; if (message) this.message = message;}

/** * Set the name of the exception. */Exception.prototype.setName = function(name){ this.name = name;}

/** * Get the exception's name. */Exception.prototype.getName = function(){ return this.name;}

/** * Set a message on the exception. */Exception.prototype.setMessage = function(msg){ this.message = msg;}

/** * Get the exception message. */Exception.prototype.getMessage = function(){ return this.message;}

Content/scp/assets/html/js/FlashSerializer.js/*Macromedia(r) Flash(r) JavaScript Integration Kit License

Copyright (c) 2005 Macromedia, inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentation and/orother materials provided with the distribution.

3. The end-user documentation included with the redistribution, if any, mustinclude the following acknowledgment:

"This product includes software developed by Macromedia, Inc.(http://www.macromedia.com)."

Alternately, this acknowledgment may appear in the software itself, if andwherever such third-party acknowledgments normally appear.

4. The name Macromedia must not be used to endorse or promote products derivedfrom this software without prior written permission. For written permission,please contact [email protected].

5. Products derived from this software may not be called "Macromedia" or"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in theirname.

THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA ORITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENTOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAYOUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCHDAMAGE.

--

This code is part of the Flash / JavaScript Integration Kit:http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrellhttp://weblogs.macromedia.com/cantrell/mailto:[email protected]

Mike Chambershttp://weblogs.macromedia.com/mesh/mailto:[email protected]

Macromedia*/

/** * The FlashSerializer serializes JavaScript variables of types object, array, string, * number, date, boolean, null or undefined into XML. */

/** * Create a new instance of the FlashSerializer. * useCdata: Whether strings should be treated as character data. If false, strings are simply XML encoded. */function FlashSerializer(useCdata){ this.useCdata = useCdata;}

/** * Serialize an array into a format that can be deserialized in Flash. Supported data types are object, * array, string, number, date, boolean, null, and undefined. Returns a string of serialized data. */FlashSerializer.prototype.serialize = function(args){ var qs = new String();

for (var i = 0; i < args.length; ++i) { switch(typeof(args[i])) { case 'undefined': qs += 't'+(i)+'=undf'; break; case 'string': qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]); break; case 'number': qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]); break; case 'boolean': qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]); break; case 'object': if (args[i] == null) { qs += 't'+(i)+'=null'; } else if (args[i] instanceof Date) { qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime()); } else // array or object { try { qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i])); } catch (exception) { throw new Exception("FlashSerializationException", "The following error occurred during complex object serialization: " + exception.getMessage()); } } break; default: throw new Exception("FlashSerializationException", "You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined."); }

if (i != (args.length - 1)) { qs += '&'; } }

return qs;}

/** * Private */FlashSerializer.prototype._serializeXML = function(obj){ var doc = new Object(); doc.xml = ''; try { this._serializeNode(obj, doc, null); } catch (exception) { if (exception.message) { throw new Exception("FlashSerializationException", "Unable to serialize object because: " + exception.message); } throw exception; } doc.xml += ''; return doc.xml;}

/** * Private */FlashSerializer.prototype._serializeNode = function(obj, doc, name){ switch(typeof(obj)) { case 'undefined': doc.xml += ''; break; case 'string': doc.xml += ''+this._escapeXml(obj)+''; break; case 'number': doc.xml += ''+obj+''; break; case 'boolean': doc.xml += ''; break; case 'object': if (obj == null) { doc.xml += ''; } else if (obj instanceof Date) { doc.xml += ''+obj.getTime()+''; } else if (obj instanceof Array) { doc.xml += ''; for (var i = 0; i < obj.length; ++i) { this._serializeNode(obj[i], doc, null); } doc.xml += ''; } else { doc.xml += ''; for (var n in obj) { if (typeof(obj[n]) == 'function') continue; this._serializeNode(obj[n], doc, n); } doc.xml += ''; } break; default: throw new Exception("FlashSerializationException", "You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined"); break; }}

/** * Private */FlashSerializer.prototype._addName= function(name){ if (name != null) { return ' name="'+name+'"'; } return '';}

/** * Private */FlashSerializer.prototype._escapeXml = function(str){ if (this.useCdata) return ''; else return str.replace(/&/g,'&').replace(/ 1) { // Find the index of the LAST leading zero var idx = -1; for (i = 0; i < (inVal.length -1); i++) { if (inVal.charAt(i) == "0" && inVal.charAt(i+1) != ".") { idx = i; } else { // we found a non-zero value so we can stop break; } } // If we found leading zeros, remove them if (idx > -1) { retVal = inVal.substring(idx + 1); } else { retVal = inVal; } } } return retVal;}

/********************************************************************************** Function: setConvertObjectives()** Inputs: objectives data model element ** Return: boolean true or false depending on success or failure of the call**** Description: Special Case 2 of 3 for SetValue** setConvertObjectives accepts a valid SCORM 1.2 element and value and converts ** the call into conformant SCORM 2004 syntax. Upon making the conversion the ** SetValue call is made to the LMS and returns a boolean value upon the the ** sucess or failure of the call.********************************************************************************/function setConvertObjectives(name,value,arrayOfComponents){ var objReturnValue = ""; var objUpdatedName = getNewValue(name);

if (api == null) { api = getAPIHandle(); } if ( arrayOfComponents[3] == "status" ) { if ( (value == "passed") || (value == "failed") ) { // Reset Objectives Flag objectivesFlag = ""; _InternalErrorCode = API_CALL_PASSED_TO_LMS; objReturnValue = api.SetValue("cmi.objectives." + arrayOfComponents[2] + ".success_status", value); objectivesStatusRequestArr[arrayOfComponents[2]] = "cmi.objectives." + arrayOfComponents[2] + ".success_status"; return objReturnValue; } else if ( (value == "completed") || (value == "incomplete") || (value == "not attempted") ) { // Reset Objectives Flag objectivesFlag = ""; _InternalErrorCode = API_CALL_PASSED_TO_LMS; objReturnValue = api.SetValue("cmi.objectives." + arrayOfComponents[2]+ ".completion_status", value); objectivesStatusRequestArr[arrayOfComponents[2]] = "cmi.objectives." + arrayOfComponents[2] + ".completion_status"; return objReturnValue; } else if ( value == "browsed") { _InternalErrorCode = API_CALL_NOT_PASSED_TO_LMS; // Set objectives flag objectivesFlag = "browsed"; objReturnValue = true; return objReturnValue; } } else { // Normal set objective call // Normal setValue() Call _InternalErrorCode = API_CALL_PASSED_TO_LMS; objReturnValue = api.SetValue(objUpdatedName, value); return objReturnValue; } return objReturnValue;}

/********************************************************************************** Function: setConvertInteractions()** Inputs: interactions data model element ** Return: boolean true or false depending on success or failure of the call**** Description: Special Case 3 of 3 for SetValue** setConvertInteractions accepts a valid SCORM 1.2 element and value and ** converts the call into conformant SCORM 2004 syntax. Upon making the ** conversion the SetValue call is made to the LMS and returns a boolean value ** upon the the sucess or failure of the call.********************************************************************************/function setConvertInteractions(name,value,arrayOfComponents){ var interReturnValue = ""; var interUpdatedName = getNewValue(name);

if (api == null) { api = getAPIHandle(); } if ( arrayOfComponents[3] == "latency" ) { timeArray = new Array(4); timeArray = value.split(":"); hours = timeArray[0]; minutes = timeArray[1]; seconds = timeArray[2]; var newvalue = "PT" + hours + "H" + minutes + "M" + seconds + "S"; _InternalErrorCode = API_CALL_PASSED_TO_LMS; interReturnValue = api.SetValue(name, newvalue); return interReturnValue; } else if ( arrayOfComponents[3] == "time" ) { // Convert the time format to correct format var now = new Date(); var year = now.getYear(); var month = now.getMonth(); if ( month 0){sInternetExplorer=true;}

function findTop (frame) {

if (frame != null) {if (frame.Player != null) {return frame;}else if (frame != top) {return findTop(frame.parent);}}else {return 0;}}

function getAppletObject(){if(findTop(parent).Player != null){if (sInternetExplorer){ return findTop(parent).Player.document.PagePlayer;}else{if(navigator.userAgent.indexOf("Netscape6") > 0) return findTop(parent).Player.document.getElementById("Applet1"); else return findTop(parent).Player.document.blockDiv2.document.applets[0]; } }}sfGhost.getAppletObject = getAppletObject;

function focusNavBar(){var functionToString = "findTop(parent).Player.headerFocus();";setTimeout(functionToString,0);}

var sfNavControlFrame = new Object();sfNavControlFrame.focus = focusNavBar;

var UAEIsLoaded=false;var myPLUAENavigationPage;var sSearchForUAEDoc;var UAEHandle;

findUAEDocumentFrame();

//This hidden page needs to have link to UAE appletfunction findUAEDocumentFrame(){var xx = 0;var framename="";for (xx; xx < parent.frames.length; xx++){framename=parent.frames[xx].name;if(framename=="AssessmentApplet"){var UAEHandle=parent.frames[xx].document.UAE; //still need this for B_S playerreturn UAEHandle;}}}

Content/scp/assets/html/js/utils.js

/** we need this constant to pass empty strings through the player remoteControl method */var EMPTY_STRING = "EMPTY_STRING";var asyncRetVal = "";

// vars used by player request queuevar requestQueue = null;var requestDelay = 200;var intervalID = null;var callInProgress = false;

/** * The player uses a special encoding of non-ascii characters when passing * parameters as part of a query string. The format is: * [] * This function replaces the encoding with the actual character. */function decodeTitle (hdrStr) { var regx = /\[(\d{1,5})\]/; var newStr; for (;;) { newStr = hdrStr.match (regx); if (newStr == null) { break; } newStr = String.fromCharCode (newStr[1]); hdrStr = hdrStr.replace(regx, newStr); } return hdrStr;}

// Determine browser versionfunction Is () { var agt = navigator.userAgent.toLowerCase(); browserString = agt; this.mac = (agt.indexOf("mac")!=-1); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))); this.nav4 = this.nav && (this.major == 4) && (this.minor > 4.05); this.nav6 = this.nav && (this.major >= 5); this.ie = (agt.indexOf("msie") != -1); this.ie4up = this.ie && (this.major >= 4); this.mac = (agt.indexOf("mac")!=-1); this.safari = (agt.indexOf("safari") != -1); // For degugging purposes: this.sourceOfIs = "utils.js";}var is;is = new Is();

function checkCrs(){ if (player == null) initApp()}

function initApp(){ player = getAppletObject();}

function getAppletObject() { if(findTop(parent).Player != null){ if (is.ie){ if (findTop(parent).isCCA) { return findTop(parent).Player.document.CCAPlayer; } else{ return findTop(parent).Player.document.PagePlayer; } } else{ if(is.nav6) return findTop(parent).Player.document.getElementById("Applet1"); else return findTop(parent).Player.document.blockDiv2.document.applets[0]; } }}

// We use this function to get the contentFrame where PageHTML lives.function getContentFrame() { if(findTop(parent).Player != null) { if (is.ie) { return findTop(parent).Player.document.contentFrame; } else { return findTop(parent).Player.frames['contentFrame']; } }}

// This variable and these functions are used to evaluate JavaScript// longer than the 2048-char limit imposed by IEvar bufferedCommand = "";

function initCommand(fragment) { bufferedCommand = fragment; return true;}

function appendCommand(fragment) { bufferedCommand += fragment; return true;}

function appendAndExecute(fragment) { bufferedCommand += fragment; var cmd = bufferedCommand; bufferedCommand = ""; // Make sure the buffer is cleared even if the command chokes return eval(cmd); }

function evalInPlayerFrame(jsCommand) { doEvalInPlayerFrame(jsCommand, true);}

function doEvalInPlayerFrame(jsCommand, sendRetVal) { //alert("about to evaluate this command in Player frame: " + jsCommand); //var thePlayer = getAppletObject(); //thePlayer.log("about to evaluate this command in Player frame: " + jsCommand);

var retVal = eval(jsCommand); var params = null; if ((retVal != "undefined") && (typeof retVal != "undefined")) { //alert("evalInPlayerFrame got return val = " + retVal); params = [retVal]; }

if (sendRetVal) { // We can now set the flag which indicates that the SCORMHiddenFrame is // now available for use by other eval calls. If we don't do this we // end up wiping out concurrent calls. //callPlayerFunction("setFrameReady", false, null); callPlayerFunction("setFrameReady", false, params); }}

function findInSearchString(param, searchString){ var result = "";

// first unescape, and note that we must preserve the case in the // search string since the value we are retrieving could be // case sensitive: searchString = unescape(searchString);

var index = searchString.indexOf(param); if (index != -1) { var valStartIndex = index + param.length + 1; // Trim off everything occurring before the parameter value: result = searchString.substr(valStartIndex);

// Trim off any other parameters occurring after the value: var nextParamDelimIndex = result.indexOf("&");

if (nextParamDelimIndex != -1) { result = result.substring(0, nextParamDelimIndex); } }

return result;}

function callPlayerFunction(funcName, useTimeout, params){ // This function needs to construct a remote control call in the // following format: // player.remoteControl("?param1, param2,..."); // // Note: we assume that "params" contains only non-null values!

asyncRetVal = ""; checkCrs(); var numParams = 0; var remoteCmd = ""; var retVal = "";

if ((params != null) && (params != "undefined")) { numParams = params.length; }

remoteCmd += funcName;

if (numParams > 0) { remoteCmd += "?"; for (var i = 0; i < numParams; i++) { if (i != 0) { remoteCmd += ","; }

if (params[i] == "") { remoteCmd += EMPTY_STRING; } else { remoteCmd += params[i]; } } }

//alert("about to run remote command: " + remoteCmd + ", timeout = " + useTimeout);

if (useTimeout) { var evalCmd = "eval(\"asyncRetVal = player.remoteControl(\'" + remoteCmd + "\')\")"; //alert("evalCmd = " + evalCmd); setTimeout(evalCmd, 0); //setTimeout("alert('return = ' + asyncRetVal)");

// **************************************************************** // WARNING: When using a timeout, this method does NOT return the // value that is returned from the player.remoteControl call because // we return from this method before the call to the player is made. // This is a known issue from the existing E3 player!!! // (see E3 bug Refs 54563, 54894, fixes issues with UAE, mobile and NS 6+) // ****************************************************************

return asyncRetVal; } else { if (funcName != "setFrameReady"){ retVal = player.remoteControl(remoteCmd); } else { // any calls to setFrameReady can use the queue to avoid conflicts with // other js functions calling the remoteControl at the same time. enqueuePlayerRequest(remoteCmd); } }

return retVal;}

// Just a development utility to display the frame hierarchy.function showFrames(){ showAllFrames(this.top);}

// Just a development utility to display the frame hierarchy.function showAllFrames(win){ var parentNm = ""; if (win.parent != null) { parentNm = win.parent.name; } //alert("Current window [" + win.name + "], parent is [" + parentNm + "]"); if (win.length > 0) { for (var i=0;i= 1) {this._execute(arguments); }}

/** * "Private" function. Don't call. */FlashProxy.prototype._execute = function(args){ var ft = new FlashTag(this.proxySwfName, 1, 1, '6,0,65,0'); ft.addFlashVar('lcId', this.uid); ft.addFlashVar('functionName', args[0]); if (args.length > 1) { var justArgs = new Array(); for (var i = 1; i < args.length; ++i) { justArgs.push(args[i]); } ft.addFlashVars(this.flashSerializer.serialize(justArgs)); }

var divName = '_flash_proxy_' + this.uid; if(!document.getElementById(divName)) { var newTarget = document.createElement("div"); newTarget.id = divName; document.body.appendChild(newTarget); }var target = document.getElementById(divName); target.innerHTML = ft.toString();}

/** * This is the function that proxies function calls from Flash to JavaScript. * It is called implicitly, so you won't ever need to call it. */FlashProxy.callJS = function(command, args){ var argsArray; try { argsArray = eval(args);

var scope = FlashProxy.fpmap[argsArray.shift()].callbackScope;

if(scope && (command.indexOf('.') < 0)){var functionToCall = scope[command];functionToCall.apply(scope, argsArray);}else{ var functionToCall = eval(command);functionToCall.apply(functionToCall, argsArray);}}catch( e ){ return;}}

/** * This function gets called when a Flash function call is complete. It checks the * queue and figures out whether there is another call to make. */FlashProxy.callComplete = function(uid){var fp = FlashProxy.fpmap[uid];if (fp != null){fp.q.shift();if (fp.q.length > 0){fp._execute(fp.q[0]);}}}

FlashProxy.fpmap = new Object();

Content/scp/assets/html/js/playerAPI.js// Copyright (c) 1996-2003 SkillSoft

/** * This javascript initializes an external API object that can be used * to communicate with a SCORM LMS and a player API that the UAE and * rolled LOT/JSAPI content will use to communicate with the player. * */

/** * This object defines the INTERNAL API that the UAE and rolled LOT/JSAPI * content will use to communicate with the player. * */function playerAPI(){ //alert("playerAPI() called"); this.LMSInitialize=LMSInitialize; this.LMSGetValue=LMSGetValue; this.LMSSetValue=LMSSetValue; this.LMSCommit=LMSCommit; this.LMSGetLastError=LMSGetLastError; this.LMSGetErrorString=LMSGetErrorString; this.LMSGetDiagnostic=LMSGetDiagnostic; this.LMSFinish=LMSFinish; this.getAPIName=getAPIName; //this.name="playerAPI";}

var extAPIWrapper = null;

/** * This API is used by the player and unrolled LOT content to communicate with * an external API. The main purpose of this API is to properly format the * method args before passing to the external API. */function ExtAPIWrapper(){ this.LMSInitialize = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSInitialize(args0)); } this.LMSGetValue = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSGetValue(args0)); } this.LMSSetValue = function(){ args0=""; args0+=formatArg(arguments[0]); args1=""; args1+=formatArg(arguments[1]); return validateAiccValue(extAPI.LMSSetValue(args0, args1)); } this.LMSCommit = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSCommit(args0)); } this.LMSGetLastError = function(){ return validateAiccValue(extAPI.LMSGetLastError()); } this.LMSGetErrorString = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSGetErrorString(args0)); } this.LMSGetDiagnostic = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSGetDiagnostic(args0)); } this.LMSFinish = function(){ args0=""; args0+=formatArg(arguments[0]); return validateAiccValue(extAPI.LMSFinish(args0)); }}

function getAPIName() {return "playerAPI";}

if (navigator.userAgent.indexOf("Netscape6") > 0 || navigator.userAgent.indexOf("Netscape/7") > 0) {sBrowser = "NS6";}

// Note: we declare API var explicitly at the level of the indexXX8x6.html

// Search for an external API only if we were not passed an AICC_URL:var isAICCLaunch = (searchString.toUpperCase().indexOf("AICC_URL") != -1);if (!isAICCLaunch) { API = getAPI();}

if (API == null) { // We did NOT find an external api, therefore we will be running in // HACP mode. Set bUsingGhostAPI to true -- this value will be sent as // a param to the applet so that the applet knows to create a HACP // progress object. sfGhost.bUsingGhostAPI = true;}else { // point the external API var at the actual external API, as we need to // differentiate from the API used by the UAE and rolled LOT content to // communicate with the player. extAPI = API; // Wrap the external API in an object that will perform some error // checking and argument formatting prior to calling the external API. extAPIWrapper = new ExtAPIWrapper();}

// This is the API that UAE and rolled LOT/JSAPI content will use to communicate// with the playerAPI = new playerAPI();

// Unrolled LOT that does not use the player to rollup data must communicate// directly to the external SCORM API to avoid concurrent use of the // player and external API's which causes deadlock. This is not a problem// for rolled lot because the player caches data so we don't have a single// thread trying to talk through the player and external API's simultaneouslyif (extAPI != null) { if (parent.isCustomContentLaunch == true) { var isUnrolledLOT = (searchString.toUpperCase().indexOf("MODULE.XML") == -1); if (isUnrolledLOT) { // point the API object that the unrolled LOT content will find // at the actual external LMS API API = extAPIWrapper; } }}

function formatArg(inArg) { var retVal = ""; if(inArg != null && inArg !="undefined") { retVal = inArg; } return retVal; }

function LMSInitialize(){ // Make sure the applet is ready checkCrs(); if(!player) return "false";

var arg = formatArg(arguments[0]); return callPlayerFunction("LMSInitialize", false, [arg]);}

function LMSGetValue(el){ //alert("playerAPI - LMSGetValue"); return callPlayerFunction("LMSGetValue", false, [el]);}

function LMSSetValue(element,value){ //alert("playerAPI - LMSSetValue"); return callPlayerFunction("LMSSetValue", false, [element,value]);}

function LMSCommit(){ //alert("playerAPI - LMSCommit"); var arg = formatArg(arguments[0]); return callPlayerFunction("LMSCommit", false, [arg]);}

function LMSGetLastError(){ //alert("playerAPI - LMSGetLastError"); return callPlayerFunction("LMSGetLastError", false, null);}

function LMSGetErrorString(errorCode){ return callPlayerFunction("LMSGetErrorString", false, [errorCode]);}

function LMSGetDiagnostic(code){ return callPlayerFunction("LMSGetDiagnostic", false, [code]);}

function LMSFinish(){ //alert("playerAPI - LMSFinish"); var arg = formatArg(arguments[0]); return callPlayerFunction("LMSFinish", false, [arg]);}

// ghostAlert was formerly part of ghost.js in E3 player.// 0 for no messages, 1 for important, 2 for important and intermediate, // 3 for any old rubbishsfGhost.debugLevel=0;

function ghostAlert(level, theString){ if(level 0) { retVal = this.items[length - 1]; this.items[length - 1] = null; this.items.length = length -1; } return retVal;}

function Queue(){ // data members: this.items = new Array();

// methods: this.push = qPush; this.pop = qPop;}

Content/scp/assets/html/gotrain.htm

Content/scp/assets/html/flashaudioload.htm

Content/scp/assets/html/findPlayer.js/*Used to find the "top" frame that contains our Player.*/function findTop (frame) {

if (frame != null) {if (frame.Player != null) {return frame;}else if (frame != top) {return findTop(frame.parent);}}else {return 0;}}

function findVirtualTop () { //Find the top level of the virtual to eliminate the need for relative paths var topLevel = window.location.href; if (topLevel.indexOf ("?") != -1) {topLevel = topLevel.substring (0, topLevel.indexOf("?")); } var cbtloc = topLevel.toLowerCase().lastIndexOf("/scp/"); if (cbtloc != -1) { return topLevel.substring (0, cbtloc); } //If you're here then this is a development launch. //We don't want the query string so we'll use .pathname topLevel = window.location.pathname; cbtloc = topLevel.toLowerCase().lastIndexOf("/"); return topLevel.substring (0, cbtloc);}

Content/scp/assets/html/windowFunctions.js/*Generic Windows/Browser Utility functions*/function Is () { var agt = navigator.userAgent.toLowerCase(); this.browserString = agt; this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); //this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) //&& (agt.indexOf('compatible') == -1))); // Begin Macintosh fixed Ductran 02-20-2006 this.nav = (agt.indexOf('mozilla') != -1) && ((agt.indexOf("netscape") != -1)||(agt.indexOf("firefox") != -1)||(agt.indexOf("gecko") != -1)) && (agt.indexOf('spoofer') == -1) && (agt.indexOf('compatible') == -1); // End Macintosh fixed Ductran 02-20-2006 this.nav4 = this.nav && (this.major == 4) && (this.minor > 4.05); this.nav6 = this.nav && (this.major >= 5); this.ie = (agt.indexOf("msie") != -1); this.ie4up = this.ie && (this.major >= 4); this.ie6 = (agt.indexOf("msie 6") != -1); this.ie7 = (agt.indexOf("msie 7") != -1); this.mac = (agt.indexOf("mac")!=-1);

// Begin Macintosh fixed Ductran 02-20-2006 this.safari = (agt.indexOf("safari") != -1); // End Macintosh fixed Ductran 02-20-2006 // For degugging purposes: this.sourceOfIs = "windowFunctions.js";}var is;is = new Is();

function CourseType (searchString) {this.isE3 = (unescape(searchString).toUpperCase().indexOf("XML_URL") != -1);this.isTP = (searchString.toUpperCase().indexOf("DIRECTTEST") != -1);// Dialogue course for E3this.isE3Dialogue = (unescape(searchString).toUpperCase().indexOf("DIALOGUE=1") != -1);// Dialogue course for CCAthis.isCCADialogue = (unescape(searchString).toUpperCase().indexOf("DIALOGUE=2") != -1);// either type of Dialogue coursethis.isDialogue = (searchString.toUpperCase().indexOf("DIALOGUE=1") != -1) || (searchString.toUpperCase().indexOf("DIALOGUE=2") != -1);// We need to take special actions to properly time switch to HTML mode// if we display HTML page directly at launchvar isE3TopicLaunch = (unescape(searchString).toUpperCase().indexOf("ELO.XML") != -1) || (unescape(searchString).toUpperCase().indexOf("ELO1.XML") != -1);this.isDirectHtmlLaunch = (isE3TopicLaunch && parent.isCustomContentLaunch) || this.isTP;this.isSigned = (unescape(searchString).toUpperCase().indexOf("SIGNED_APPLET=TRUE") != -1);this.isUnsigned = (unescape(searchString).toUpperCase().indexOf("SIGNED_APPLET=FALSE") != -1);}

function setClientSize(W, H) { top.window.moveTo(0,0);

// it is important to resize the window to the // wanted values first, even if we won't get them. Don't do this // with IE 5 though if (is.ie6) { parent.window.resizeTo(W, H); }

// create the checkpoint element var cp = document.createElement("div"); cp.style.position = "absolute"; cp.style.width = "0px"; cp.style.height = "0px"; cp.style.right = "0"; cp.style.bottom = "0"; // we can only read it's position after we // insert it into the document document.body.appendChild(cp); // here we get the actual client size var current_width = cp.offsetLeft; var current_height = document.body.clientHeight;

// here we find out how much more we need // in order to get to the needed W x H size // (or in other words, we compute the size of // window decorations: border, scroll bars, title) var dw = W - current_width; var dh = H - document.body.clientHeight;

//alert("difference in width = " +dw); //alert("difference in height = "+dh); // and _finally_ we get what we need

// If the top level player frame (the one containing "Player" frame) is not // it's own parent then we know we are contained in a TPLMS frame, so handle // accordingly var playerWindow = findTop(parent); if ((playerWindow != null) && (playerWindow.parent != playerWindow)) { // When player contained within TPLMS frame we only want to increase // the size of the window to the minimum required size, do NOT reduce it. if (dw < 0) { dw = 0; } if (dh < 0) { dh = 0; }

if ((dw > 0) || (dh > 0)) { // Note that we have to resize the top level in this case top.window.resizeBy(dw, dh); } } else { parent.window.resizeBy(dw, dh); }

// we can safely delete the checkpoint now document.body.removeChild(cp);}

function setClientSizeNS(W, H){ //alert("setting client size to w: " + W + ", H: " + H); // Here is some awesome voodoo that appears to be necessary in order to get // valid current_width and current_height values below on the Mac. Apparently // these properties need to be queried at some point before we add the element // or the current_width and current_height end up as 0. Some content types // already query these properties in index.html, but do it again here to // account for all content types foo = top.window.innerWidth; foo = top.window.innerHeight; // it is important to resize the window to the // wanted values first, even if we won't get them. parent.window.resizeTo(W, H);

// Only do the rest for Netscape if (!is.safari) { // create the checkpoint element var cp = document.createElement("div"); cp.style.position = "absolute"; cp.style.width = "0px"; cp.style.height = "0px"; cp.style.right = "0"; cp.style.bottom = "0"; // we can only read it's position after we // insert it into the document document.body.appendChild(cp); // here we get the actual client size var current_width = cp.offsetLeft; var current_height = cp.offsetTop; // here we find out how much more we need // in order to get to the needed W x H size // (or in other words, we compute the size of // window decorations: border, scroll bars, title) var dw = W - current_width; var dh = H - current_height; //alert("dh = " + dh); parent.window.resizeBy(0, dh); // we can safely delete the checkpoint now document.body.removeChild(cp); }}

function resizeWindowBy(dw, dh) { // If the top level player frame (the one containing "Player" frame) is not // it's own parent then we know we are contained in a TPLMS frame, so handle // accordingly var playerWindow = findTop(parent); if ((playerWindow != null) && (playerWindow.parent != playerWindow)) { top.window.moveTo (0, 0); top.window.resizeBy(dw, dh); } else { parent.window.moveTo (0, 0); parent.window.resizeBy(dw, dh); } centerWindow ();}

function centerWindow () { var windowWidth = 0; var windowHeight = 0;if (typeof(top.window.innerWidth ) == 'number' ) { windowWidth = top.window.innerWidth;windowHeight = top.window.innerHeight;} else if (document.documentElement &&(document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {windowWidth = document.documentElement.clientWidth;windowHeight = document.documentElement.clientHeight;} else if (document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {windowWidth = document.body.clientWidth;windowHeight = document.body.clientHeight;}

if (windowHeight < (self.screen.height - 100)) { var playerWindow = findTop(parent); if ((playerWindow != null) && (playerWindow.parent != playerWindow)) { top.window.moveTo(self.screen.width/2 - windowWidth/2,(self.screen.height/2)-(windowHeight/2)); } else { parent.window.moveTo(self.screen.width/2 - windowWidth/2,(self.screen.height/2)-(windowHeight/2)); } }}

// pass in the delta values we want to resize byfunction resizeMacWindow(dw, dh) { var windowWidth = 0; var windowHeight = 0; var padHeight = 23; // height of the window decoration

if (typeof(top.window.innerWidth ) == 'number' ) { windowWidth = top.window.innerWidth; windowHeight = top.window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if (windowWidth > self.screen.width) { windowWidth = self.screen.width; } if (windowHeight > (self.screen.height - 20)) { windowHeight = self.screen.height - 20; }

windowWidth += dw; windowHeight += dh; windowHeight += padHeight; top.window.moveTo(0,0); top.window.resizeTo(windowWidth, windowHeight); centerWindow ();}

function isReducedWinHeight () { var windowHeight = 0; if (typeof(top.window.innerWidth ) == 'number' ) { windowHeight = top.window.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } if (windowHeight < 546) { return true; } return false;}

Content/scp/assets/html/exitSession.htm

Content/scp/assets/html/E3PageHtml.js

function noContext() { return false;}/** * This function captures mouse clicks and backspace keys to prevent navigation* outside of the html frame. */function getKey(e) { if(!e){e = window.event;}// if the key is f5if (!handleF5(e)) return false;

if(e.keyCode == 9) { getTabKey(e); } else { return handleShortCut(e); }

return true;}

function getTabKey(e) {

// handle shift tab first if (is.nav && e.which == 9 && (e.modifiers & Event.SHIFT_MASK)){ navFunction("back"); return false;} else if (is.nav6 && e.keyCode == 9 && e.shiftKey){ setTimeout("backward()", "500"); return false;} else if (is.ie && window.event.keyCode == 9 && (window.event.shiftKey)) { navFunction("back"); return false; }

else { // this passes through the other clicks to the window // so that the scroll bars will still work //routeEvent(e); } return true;

}

function backward() { navFunction("back");}/** * The last item to receive focus in the pageHTML must call navFunction("forward") to tell* the applet it must now receive focus.** When using shift tab, the first item to receive focus (and a shift tab key event) must call* navFunction("back") to tell the header exit button to receive focus. */

function navFunction(where){if(where=="forward"){//add code to tell jave focus is going backwards here, then remove alert from next line findTop(this).Player.headerFocus(); }else if(where=="back"){ // in 508 mode we need to let jaws control the shift tab in forms/pagehtml mode if (!findTop(this).Player.is508ModeEnabled())

//add code to tell jave focus is going forward here, then remove alert from next line findTop(this).Player.requestButtonFocus();

}}

function Is () { var agt = navigator.userAgent.toLowerCase(); this.ie = (agt.indexOf("msie") != -1); this.major = parseInt(navigator.appVersion); this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1))); this.nav6 = this.nav && (this.major >= 5); this.mac = (agt.indexOf("mac")!=-1); this.safari = (agt.indexOf("safari") != -1); // For degugging purposes: this.sourceOfIs = "E3PageHtml.js"; }var is;is = new Is();if (is.nav && !is.nav6) { // capture mouse events on the window document.captureEvents(Event.KEYPRESS); window.captureEvents(Event.MOUSEDOWN); document.onkeypress=getKey; window.onmousedown=getKey;} else if (is.ie || is.nav6) { self.onkeypress=getKey; document.onkeydown=getKey; document.onkeyup=getKey; //document.onkeydown=handleShortCut; document.oncontextmenu=noContext; parent.window.onkeydown=getKey;

}//document.onkeypress=getKey; // this works for IE preventing the right click

Content/scp/assets/html/resizeWindow.htm

Content/scp/assets/html/showCaptionArea.htm

Content/scp/assets/html/topNS6.jsfunction preload(imgObj,imgSrc) {imgSrc = imagePath + imgSrc;if (document.images) {eval(imgObj+' = new Image()')eval(imgObj+'.src = "'+imgSrc+'"')}}

preload('exit_left_out', 'exit_left.jpg');preload('exit_left_over','exit_left_over.jpg');preload('exit_left_down', 'exit_left_down.jpg');preload('exit_right_out', 'exit_right.jpg');preload('exit_right_over','exit_right_over.jpg');preload('exit_right_down','exit_right_down.jpg');preload('help_left_out', 'help_left.jpg');preload('help_left_over','help_left_over.jpg');preload('help_left_down', 'help_left_down.jpg');preload('help_right_out', 'help_right.jpg');preload('help_right_over','help_right_over.jpg');preload('help_right_down','help_right_down.jpg');

// Maximize/minimize togglepreload('max_out', 'maximize.jpg');preload('max_over', 'maximize_over.jpg');preload('max_down', 'maximize_down.jpg');preload('max_min_out', 'minimize.jpg');preload('max_min_over', 'minimize_over.jpg');preload('max_min_down', 'minimize_down.jpg');

function changeImage(imgName,imgObj) { if(!graphicHidden){ document.images[imgName + "Left"].src = eval(imgName+ "_left_" + imgObj+".src"); document.images[imgName + "Right"].src = eval(imgName+ "_right_" + imgObj+".src");

var backgrndImgName = imgName + "_bkgrnd"; if (imgObj.indexOf("out") == -1) { backgrndImgName += "_" +imgObj; } backgrndImgName = "url(" + imagePath + backgrndImgName + ".jpg)";

if (imgName == "exit") { var exitButton = document.getElementById("exitButton"); exitButton.style.backgroundImage = backgrndImgName; } else { var helpButton = document.getElementById("helpButton"); helpButton.style.backgroundImage = backgrndImgName; }

}// Change button background and the text color for new statevar isOver = ((imgObj.indexOf("over") != -1) || (imgObj.indexOf("down") != -1));if (imgName == "exit") {var exitLink = document.getElementById("exitLink");if (isOver) {exitLink.style.color = btnTextOver;}else {exitLink.style.color = btnTextNormal;}}else {var helpLink = document.getElementById("helpLink");if (isOver) {helpLink.style.color = btnTextOver;}else {helpLink.style.color = btnTextNormal;}}}

function changeToggle (imgName, imgObj) { document.images[imgName].src = eval(imgName + "_" + imgObj + ".src");}

function initButtonText() { var helpLink = document.getElementById("helpLink"); var exitLink = document.getElementById("exitLink"); helpLink.style.color = btnTextNormal; exitLink.style.color = btnTextNormal;}

function forwardFocus(e) { // if nothing has focus now forward it to the help button object = document.getElementById('exitLink'); exitFocus = true; object.focus(); e.cancelBubble=true;}

function onClickExit(e, handler) {logEvent(e);if (isUAE) {// use a delay before calling remote contorl. Sometimes if the user// selects exit button while UAE is making remoteControl calls, this// one can clash. (see mozilla defect 38475)setTimeout("remoteControl('callExit');", 500);}else {remoteControl('callExit');}}

function onClickMaxMin(e, handler) { logEvent(e); // close the captions first if they are open // they will be reopened later once the resize is done remoteControl('toggle10x7Mode'); findTop(parent).Player.resizeWindow(); findTop(parent).Player.setMaximized(!findTop(parent).Player.getMaximized()); findTop(parent).Player.displayCaption (0);}

function onMouseOverMaxMin (e, handler) { if (isMouseLeaveOrEnter(e, handler)) { logEvent(e); if (findTop(parent).Player.getMaximized ()) { document.images['max'].title = findTop(parent).