From: <Saved by Windows Internet Explorer 8>
Subject: NewFresh Fruit and Vegetable Program
Date: Fri, 10 Aug 2012 11:18:39 -0600
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0000_01CD76E9.E49A2FE0"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01CD76E9.E49A2FE0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.cde.state.co.us/media/Nutrition/FreshFruitAndVegProgram/player.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>NewFresh Fruit and Vegetable Program</TITLE><!-- =
saved from url=3D(0014)about:internet --><!-- Created using Articulate =
Presenter 6.0.1 - http://www.articulate.com  --><!-- version: 6.0.699 =
-->
<META content=3D"text/html;  charset=3DISO-8859-1" =
http-equiv=3DContent-Type>
<META content=3Dno http-equiv=3Dimagetoolbar>
<META content=3Dfalse http-equiv=3Dimagetoolbar>
<META name=3Ddescription=20
content=3D"Articulate - The leader in rapid e-learning and =
communications.">
<META name=3Dkeywords=20
content=3D"Articulate, Articulate Presenter, Convert PowerPoint to =
Flash, Rapid e-learning, SCORM, AICC, Flash">
<SCRIPT language=3DJavaScript>
<!-- Articulate Presenter Lives In Here

// Browser Detection
var IE6Above =3D false;
var IE7Above =3D false;
var strVersion =3D navigator.appVersion;
var nIndex1 =3D strVersion.indexOf("MSIE") + 5;
var nIndex2 =3D strVersion.indexOf(".", nIndex1)
if (nIndex1 >=3D 0 && nIndex2 > nIndex1) { IE6Above =3D =
(Number(strVersion.substring(nIndex1, nIndex2)) >=3D 6); }
if (nIndex1 >=3D 0 && nIndex2 > nIndex1) { IE7Above =3D =
(Number(strVersion.substring(nIndex1, nIndex2)) >=3D 7); }

var NS4 =3D (navigator.appName.indexOf("Netscape")>=3D0 && =
parseFloat(navigator.appVersion) >=3D 4 && =
parseFloat(navigator.appVersion) < 5)? true : false;
var IE4 =3D (document.all)? true : false;
var NS6plus =3D (parseFloat(navigator.appVersion) >=3D 5 && =
navigator.appName.indexOf("Netscape")>=3D0 )? true: false;
var isMac =3D (navigator.appVersion.indexOf("Mac")!=3D-1) ? true : =
false;
var IEmac =3D ((document.all) && (isMac)) ? true : false;
var IE4plus =3D (document.all) ? true : false;
var IE5 =3D ((document.all)&&(navigator.appVersion.indexOf("MSIE =
5.")!=3D-1)) ? true : false;
var IE6 =3D IE6Above;
var IE7 =3D ((document.all)&&(navigator.appVersion.indexOf("MSIE =
7.")!=3D-1)) ? true : false;
var Safari =3D (isMac &&(navigator.appVersion.indexOf("Safari")!=3D-1)) =
? true : false;
var Safari3Plus =3D =
(parseFloat(navigator.appVersion.substr(navigator.appVersion.indexOf("Saf=
ari/") + 7)) > 525);

var Opera7plus =3D ((document.all)&&(navigator.userAgent.indexOf("Opera =
7")!=3D-1)) ? true : false;
var FF =3D (navigator.userAgent.indexOf("Firefox")!=3D-1) ? true : =
false;
var FF1 =3D (navigator.userAgent.indexOf("Firefox\/1")!=3D-1) ? true : =
false;
var Opera =3D (navigator.userAgent.indexOf("Opera")!=3D-1) ? true : =
false;
var Mozilla =3D (NS6plus && (navigator.userAgent.indexOf("Netscape") < =
0));

var NS7_2Plus =3D false;
var Mozilla1_7Plus =3D false;

var isLinux =3D (navigator.userAgent.indexOf("Linux") !=3D -1);
var isWindows =3D (!isMac && !isLinux)


// Find the version of NS or Mozilla
if (NS6plus)
{
	var nPos =3D 0;
	var strUserAgent =3D navigator.userAgent;
	var nReleaseDate =3D 0;
=09
	strUserAgent =3D strUserAgent.toLowerCase();
	nPos =3D strUserAgent.indexOf("gecko/");

	if(nPos >=3D 0)
	{
		var strTemp =3D strUserAgent.substr(nPos + 6);
		nReleaseDate =3D parseFloat(strTemp);
	}

	if (strUserAgent.indexOf("netscape") >=3D 0)
	{
		if (nReleaseDate >=3D 20040804)
		{
			NS7_2Plus =3D true;
		}=20
	}
	else
	{
		if (nReleaseDate >=3D 20040616)
		{
			Mozilla1_7Plus =3D true;
		} 	=09
	}
}

//windows sp2:
var IESP2 =3D false;
if ((window.navigator.userAgent.indexOf("MSIE")) && =
window.navigator.userAgent.indexOf("SV1") > =
window.navigator.userAgent.indexOf("MSIE"))=20
{
	IESP2 =3D true;
}

// Template Vars
var g_bAOSupport =3D false;
var g_bFillScreen 	=3D false;
var g_bResizeOptimal 	=3D false;
var g_bLMS 		=3D false;
var g_bWebObject 	=3D false;
var g_bScaleSwf		=3D true;
var g_strBgColor	=3D "6c6c6c";

if (g_bFillScreen && g_bResizeOptimal)
{
	g_bOptimal =3D false;
}

if (Opera || isLinux)
{
	g_bWebObject =3D false;
}


// Init
var slidenum =3D 1;
var g_nWidth;		// was aw
var g_nHeight;		// was ah
var g_bIs800 =3D false;
var currentDisplayMode =3D "1"; //displaymode

g_nWidth=3Dscreen.availWidth;
g_nHeight=3Dscreen.availHeight;

if (g_nWidth < 820)=20
{
	g_bIs800 =3D true;
	g_bFillScreen =3D true;
	g_bScaleSwf =3D true;
}

function debug()
{
}

// Reposition the window
function reposition() {
	var x =3D 0;
	var y =3D 0;

	if (!g_bFillScreen)
	{
		g_nWidth =3D 980;
		g_nHeight =3D 640;

		x =3D (screen.availWidth - g_nWidth) / 2;
		y =3D (screen.availHeight - g_nHeight) / 2;

		if (!g_bScaleSwf)
		{
			g_nWidth +=3D 20;
			g_nHeight +=3D 5;
		}
	}

	if (x < 0)
	{
		x =3D 0;
	}
	if (y < 0)
	{
		y =3D 0;
	}

	if (g_nWidth > screen.availWidth)
	{
		g_nWidth =3D screen.availWidth;
	}
	if (g_nHeight > screen.availHeight)
	{
		g_nHeight =3D screen.availHeight;
	}



	top.window.moveTo(x, y);
	top.window.resizeTo(g_nWidth,g_nHeight);
	top.window.focus();
}

// This function is used to make sure the document height and not the=20
function reposition2()=20
{
	var nW =3D 0;
	var nH =3D 0;
	var nNewWidth =3D 0;
	var nNewHeight =3D 0;
	var x =3D 0;
	var y =3D 0;

	if (document.body.clientWidth && !isNaN(document.body.clientWidth) && =
!Mozilla)
	{
		nW =3D document.body.clientWidth;
		nH =3D document.body.clientHeight;
	}
	else
	{
		nW =3D window.innerWidth;
		nH =3D window.innerHeight;
	}
=09
	nNewWidth =3D g_nWidth + (g_nWidth - nW);
	nNewHeight =3D g_nHeight + (g_nHeight - nH);

	if (!g_bScaleSwf && NS6plus && !NS7_2Plus && !Mozilla)
	{
		nNewWidth +=3D15;
	}

	if (Mozilla)
	{
		nNewWidth +=3D 20;
	}

	if (nNewWidth > screen.availWidth)
	{
		nNewWidth =3D screen.availWidth;
	}
	if (nNewHeight > screen.availHeight)
	{
		nNewHeight =3D screen.availHeight;
	}

	x =3D (screen.availWidth - nNewWidth) / 2;
	y =3D (screen.availHeight - nNewHeight) / 2;

	if (x < 0)
	{
		x =3D 0;
	}
	if (y < 0)
	{
		y =3D 0;
	}


	if (nNewHeight - g_nHeight > 20)
	{
		g_nWidth =3D nNewWidth;
		g_nHeight =3D nNewHeight;
		top.window.moveTo(x, y);
		top.window.resizeTo(nNewWidth, nNewHeight);
	}

}

if (g_bResizeOptimal || g_bFillScreen)
{
	// Call to reposition
	reposition();
}

if (g_bResizeOptimal)
{
	// Call Reposition2
	window.onload =3D reposition2;
}

// -->
</SCRIPT>
<!-- fscommand processing -->
<SCRIPT language=3DJavaScript1.2>
<!--
	if (g_bLMS)
	{
		document.write("<SCR" + "IPT LANGUAGE=3D'JavaScript1.2' =
SRC=3D'lms/lms.js' TYPE=3D'text/javascript'><\/SCR" + "IPT>");
	}
=09
	if (g_bAOSupport)
	{
		document.write("<SCR" + "IPT LANGUAGE=3D'JavaScript1.2' =
SRC=3D'player/AOComm.js' TYPE=3D'text/javascript'><\/SCR" + "IPT>");
	}
// -->
</SCRIPT>

<SCRIPT language=3DJavaScript1.2 type=3Dtext/javascript=20
src=3D"http://www.cde.state.co.us/media/Nutrition/FreshFruitAndVegProgram=
/player/flashcommand.js"></SCRIPT>

<SCRIPT language=3DVBScript>
<!--
// Catch FS Commands in IE, and pass them to the corresponding =
JavaScript function.
Sub player_FSCommand(ByVal command, ByVal args)
    call player_DoFSCommand(command, args)
end sub
// -->
</SCRIPT>

<SCRIPT language=3DJavaScript>
<!--
function thisMovie(movieName)=20
{
	// IE and Netscape refer to the movie object differently for our =
ongoing pleasure.
	//usage: =
thisMovie('player').SetVariable('_root.mcMyNotes.vMySlideNotes',  str );

	if (navigator.appName.indexOf ("Microsoft") !=3D-1)=20
	{
		return window[movieName] =20
	}
	else=20
	{
		return document[movieName]
	}
}
//-->
</SCRIPT>

<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.19154"></HEAD>
<BODY aLink=3D#ffff00 leftMargin=3D0 link=3D#000088 topMargin=3D0 =
text=3D#999999=20
vLink=3D#000088 marginwidth=3D"0" marginheight=3D"0">
<SCRIPT language=3DJavaScript>

	// Change the BgColor
	SetBgColor(g_strBgColor);=09

	// Get the "slide=3D" value from the querystring URL of this document. =
(v3)
=09
	var _search =3D document.location.search;
	var nStartPos =3D 0;
	var nEndPos =3D 0;

	nStartPos =3D _search.indexOf("slide=3D");
	nEndPos =3D _search.indexOf("&",nStartPos);
	if (nEndPos < 0)
	{
		nEndPos =3D _search.indexOf("%",nStartPos);=20
	}
	if (nEndPos < 0)=20
	{
		nEndPos =3D _search.length;
	}

	//just get the digits part. (+6 starts right of string "slide=3D")
	if (nStartPos >=3D 0 && nEndPos >=3D 0)
	{
		var strTemp =3D _search.substring((nStartPos+6),(nEndPos-0));
	=09
		if (!isNaN(strTemp))
		{
			slidenum =3D strTemp;
		}
	}

</SCRIPT>
<!-- Playercode: -->
<SCRIPT language=3DJavaScript>

	//Formulate url to give to player for use in Forward, to pass it into =
flash. (Default is ./ in current url folder.)
	var thislink =3D GetBasePath();
=09
	// Create FlashVars
	var strFlashVars =3D "";
	strFlashVars +=3D "vBgColor=3D0x" + g_strBgColor;

	// FSCommand?
	strFlashVars +=3D "&vFSCommand=3D"
	if (Opera || isLinux || isMac)
	{
		strFlashVars +=3D "false";	=20
	}
	else
	{
		strFlashVars +=3D "true"
	}

	// LMS Info
	if (g_bLMS)
	{
		if (g_bAPIPresent && !g_bAOSupport)
		{
			RetrieveStateData();
			strFlashVars +=3D "&vResumeSlide=3D" + String(g_SlideLastViewed);
			strFlashVars +=3D "&vStateData=3D" + String(g_strResumeData);
			strFlashVars +=3D "&vLMSPresent=3D" + String(g_bLMSPresent);
		}
	}

	strFlashVars +=3D "&vAOSupport=3D" + g_bAOSupport;

	// Get the browsers width and height
	var strSwfWidth =3D "100%";
	var strSwfHeight =3D "100%";
=09
	var strScale =3D "show all";

	if (!g_bScaleSwf)
	{
		strSwfWidth =3D 992;
		strSwfHeight =3D 652;
		strScale =3D "noscale"
	}

	var strTransparent =3D "";

	if (g_bWebObject)
	{
		strTransparent =3D "wmode=3D'transparent'";
	}

	if (NS4)
	{
		strSwfWidth =3D g_nWidth;
		strSwfHeight =3D g_nHeight-30;
	}

	if (Mozilla && isLinux)
	{
		strSwfWidth =3D "980";
		strSwfHeight =3D "640";
	}

	if (g_bWebObject)
	{
		document.write("<div id=3D'flasher' style=3D'z-index:4;'>");
	}
=09
	document.write("<table width=3D'100%' HEIGHT=3D'100%' border=3D0 =
cellspacing=3D0 cellpadding=3D0>");
	document.write("<tr><td valign=3D'center' align=3D'center'>");

	strFlashVars +=3D "&rqPresentationID=3DGZVKMRcydFYKSQL";
	strFlashVars +=3D "&rqStartSlide=3D" + slidenum;
	strFlashVars +=3D "&link=3D"+ thislink;

	WriteSwfObject("player/playershell.swf", strSwfWidth, strSwfHeight, =
strFlashVars, g_bWebObject, strTransparent, strScale);=20

	document.write("</td></tr>");
	document.write("</table>");

	if (g_bWebObject)
	{
		document.write("</div>");
	}


</SCRIPT>

<SCRIPT language=3DJavaScript>
<!--
	if (g_bWebObject)
	{
		document.write("<div id=3D'eLayer1' style=3D'background-color:#ffffff; =
position:absolute; left:240; top:-600px; width:100; height:100; =
visibility:hidden; z-index:3;' >");
		document.write("<iframe frameborder=3D'0' id=3D'eIFContent' =
style=3D'width:100%; height:100%' src=3D'player/blank.html' =
frameborder=3D'10px' allowtransparency=3D'true'></iframe></div>");
	}

=09
//-->
</SCRIPT>
<!-- Email support [097] -->
<DIV=20
style=3D"POSITION: absolute; WIDTH: 10px; HEIGHT: 10px; VISIBILITY: =
hidden; TOP: 10px; LEFT: 10px"=20
id=3DdivQuiz></DIV></BODY></HTML>

------=_NextPart_000_0000_01CD76E9.E49A2FE0
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.cde.state.co.us/media/Nutrition/FreshFruitAndVegProgram/player/flashcommand.js

/*********************************************************************
--- flashcommand : fscommand handler functions ---
version 5.0.0
This is the general fscommand handler for ALL output formats
*********************************************************************/

/////////////////////////////////////////////////////////////////////////=
//
// Global Vars
/////////////////////////////////////////////////////////////////////////=
//
var g_strPlayer =3D "stealthray";
var DATA_PATH =3D "data/swf/";
var g_arrResults =3D new Array();
var FLASH_WND_WIDTH =3D 40;
var FLASH_WND_HEIGHT =3D 30;

var SWF_BASE_WIDTH		=3D 980;=09
var SWF_BASE_HEIGHT		=3D 640;
var WEBOBJ_LEFT			=3D 254;
var WEBOBJ_TOP			=3D 36;

if (FF1 || NS6plus)
{
	WEBOBJ_LEFT =3D 253;
	WEBOBJ_TOP =3D 34;
}

if (!g_bScaleSwf)
{
	WEBOBJ_LEFT -=3D 8;
	WEBOBJ_TOP -=3D 4;
	strSwfWidth =3D 992;
	strSwfHeight =3D 652;
}

var WEBOBJ_DISPLAY3_XPOS_ADJUST	=3D 150;
var WEBOBJ_DISPLAY3_YPOS_ADJUST	=3D 20;

var WEBOBJ_DISPLAY2_XPOS_ADJUST	=3D 119;

// Browser Resize
var g_ResizeTimeout;
var g_strQMPath =3D "";

/////////////////////////////////////////////////////////////////////////=
//
// Utility Functions
/////////////////////////////////////////////////////////////////////////=
//

function Click()
{
	// alert("Test");
}

function WriteSwfObject(strFileName, strSwfWidth, strSwfHeight, =
strFlashVars, bWebObject, strTransparent, strScale)
{
	var strLocProtocol =3D location.protocol;
=09
	if (strLocProtocol.indexOf("file") >=3D 0)
	{
		strLocProtocol =3D "http:";
	}


	document.write("<OBJECT =
classid=3D'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("codebase=3D'" + strLocProtocol + =
"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3D=
6,0,79,0' ");
	document.write("WIDTH=3D'" + strSwfWidth + "' HEIGHT=3D'" + =
strSwfHeight + "' ID=3D'player' ALIGN=3D''> ");
	document.write("<PARAM NAME=3Dmovie VALUE=3D'" + strFileName + "'> ");
	document.write("<PARAM NAME=3Dquality VALUE=3D'best'> ");
	if (bWebObject)
	{
		document.write("<PARAM NAME=3DWMODE VALUE=3D'transparent'> ");
	}
	document.write("<PARAM NAME=3Dscale VALUE=3D'" + strScale + "'> ");
	document.write("<PARAM NAME=3Dmenu VALUE=3D'false'>");
	document.write("<PARAM NAME=3DFlashVars VALUE=3D'" + strFlashVars + =
"'>");
	document.write("<EM"+"BED WIDTH=3D'"+ strSwfWidth +"' HEIGHT=3D'"+ =
strSwfHeight +"' src=3D'" + strFileName + "' NAME=3D'player' =
quality=3D'best' " + strTransparent + " scale=3D'" + strScale + "'  =
ALIGN=3D'' ");
	document.write("FlashVars=3D'" + strFlashVars + "'");
	document.write(" TYPE=3D'application/x-shockwave-flash' =
PLUGINSPAGE=3D'" + strLocProtocol + =
"//www.macromedia.com/go/getflashplayer' swLiveConnect=3D'true' =
menu=3D'false'></EM"+"BED>");
	document.write("</OBJECT>");
}


function CreateBookmark(args, bSlide)
{
	if (!Opera7plus && IE4plus)
	{
		var nSlideNum =3D args.substring(0,args.indexOf("|"));
		var strTitle =3D args.substring((args.indexOf("|")+1),args.length);

		var _proto 	=3D document.location.protocol;
		var _host 	=3D document.location.host;
		var _pathname	=3D document.location.pathname;
		var _search =3D document.location.search;
		var newpath  =3D "";
		var newUrl  =3D "";
		var nPos =3D 0;

		nPos =3D _pathname.lastIndexOf("/");

		if (nPos <=3D 0)=20
		{
			nPos =3D _pathname.lastIndexOf("\\");=20
		}
		if ( nPos < _pathname.length)=20
		{   =20
			// if / is not the last char grab the trailing "/"
			nPos++;
		}
	=09
		if (_search.indexOf("akpDocumentID",0) < 0)=20
		{
			newpath =3D _pathname.substr(0, nPos) + "player.html";
			newUrl =3D _proto + "//" + _host + newpath +"?slide=3D" + nSlideNum;
		}=20
		else=20
		{
			did =3D _search.substring((_search.lastIndexOf("akpDocumentID") + =
("akpDocumentID").length+1), _search.length);
			newpath =3D "/Portal/Storage/DownloadDocument.aspx?DocumentID=3D" + =
did;
			newUrl =3D _proto+"//"+ _host + newpath + "?slide=3D"+ nSlideNum;
		}

		if (bSlide)
		{
			strTitle =3D strTitle + " - Powered by Articulate ";
		}
		else
		{
			strTitle =3D strTitle + " Slide "+ nSlideNum +" - Powered by =
Articulate ";
		}

		try
		{
			window.external.AddFavorite(newUrl, strTitle);
		}
		catch (e)
		{
			var strErr =3D "Your browser does not support automatic bookmarking =
when run locally.\nTo bookmark this presentation, please create a =
bookmark \non the web page that launched this window.";
			alert(strErr);
		}
	}
	else
	{
		var strErr =3D "Your browser does not support automatic =
bookmarking.\nTo bookmark this presentation, please create a bookmark =
\non the web page that launched this window.";
		alert(strErr);
	}
}


function OpenFlashObjectWnd(args)
{
	str =3D args;
	params =3D str.split("|");

	var strContainerType =3D params[0];	// Unused
	var strFilename =3D params[1];
	var nXPos =3D parseInt(params[2]);	// Unused
	var nYPos =3D parseInt(params[3]);	// Unused
	var nWidth =3D parseInt(params[4]);
	var nHeight =3D parseInt(params[5]);
	var strBrowserOptions =3D params[6];

	var  re =3D /width=3D0/gi;
	ww =3D strBrowserOptions.search(re);
	re =3D /height=3D0/gi;
	wh =3D strBrowserOptions.search(re);

	// If the width and height are 0 set to Full screen
	if ((ww >=3D 0 && wh >=3D 0) || (nWidth =3D=3D0 && nHeight=3D=3D0))
	{
		nWidth =3D window.screen.availWidth;
		nHeight =3D window.screen.availHeight;
	}
=09
	PopFlashObj(DATA_PATH + strFilename, nWidth, nHeight)
}


/////////////////////////////////////////////////////////////////////////=
///////
// Gets the base path
/////////////////////////////////////////////////////////////////////////=
///////

function GetBasePath()
{
	var strFullPath =3D document.location.href;
=09
	var nPosHash =3D strFullPath.indexOf("#");
=09
	if (nPosHash > 0)
	{
		strFullPath =3D strFullPath.substring(0, nPosHash);
	}
=09
	var nPos1 =3D -1;
	var nPos2 =3D -1;

	nPos1 =3D strFullPath.lastIndexOf("\\");
	nPos2 =3D strFullPath.lastIndexOf("/");

	if (nPos2 > nPos1)
	{
		nPos1 =3D nPos2;
	}

	if (nPos1 >=3D 0)
	{
		strFullPath =3D strFullPath.substring(0, nPos1 + 1);
	}
=09
	strFullPath =3D escape(strFullPath);

	return(strFullPath);
}

/////////////////////////////////////////////////////////////////////////=
///////
// Zoom code
/////////////////////////////////////////////////////////////////////////=
///////

var g_oZoomInfo =3D new Object();
var g_wndZoom;

function PopFlashObj(strFileName, nWidth, nHeight)
{
	var strScroll =3D "0";

	g_oZoomInfo.strFileName =3D GetBasePath() + strFileName;
	g_oZoomInfo.nWidth =3D parseInt(nWidth);
	g_oZoomInfo.nHeight =3D parseInt(nHeight);

	if (g_oZoomInfo.nWidth > screen.availWidth)
	{
		g_oZoomInfo.nWidth =3D screen.availWidth;
		strScroll =3D "1";
	}

	if (g_oZoomInfo.nHeight > screen.availHeight)
	{
		g_oZoomInfo.nHeight =3D screen.availHeight;
		strScroll =3D "1";
	}


	var strOptions =3D "width=3D" + g_oZoomInfo.nWidth +",height=3D" + =
g_oZoomInfo.nHeight + ", status=3D0, toolbar=3D0, location=3D0, =
menubar=3D0, scrollbars=3D" + strScroll;

	if (g_wndZoom)
	{
		try
		{
			g_wndZoom.close()
		}
		catch (e)
		{
		}
	}

	g_wndZoom =3D window.open("player/zoom.html", "", strOptions);
}

/////////////////////////////////////////////////////////////////////////=
///////
// End Zoom code
/////////////////////////////////////////////////////////////////////////=
///////

function OpenWebObjectWnd(args)
{
	str =3D args;
	params =3D str.split("|");

	var strContainerType =3D params[0]; 	// Unused
	var strObjectType =3D params[1];		// Unused
	var nXPos =3D params[2];			// Unused
	var nYPos =3D params[3];			// Unused
	var nWidth =3D params[4];
	var nHeight =3D params[5];
	var strBrowserOptions =3D params[6];
	var strMode =3D params[7];  		// Unused
	var strUrl =3D params[8];
	var bDefaultControls =3D false;
=09
	if (strBrowserOptions =3D=3D "")
	{
		bDefaultControls =3D true;
	}
=09
	//Check for repository:
	if (strUrl.toLowerCase().indexOf("repository://") =3D=3D 0)=20
	{
		strUrl =3D "/Portal/Storage/Viewers/ArtPlayer/FollowLink.aspx?file=3D" =
+ strUrl;
	}

	if (nWidth =3D=3D -1 && nHeight =3D=3D -1)
	{
		nWidth =3D document.body.clientWidth;
		nHeight =3D document.body.clientHeight;
	}
=09
	// If the width and height are 0 set to Full screen
	if (nWidth =3D=3D0 && nHeight=3D=3D0)
	{
		nWidth =3D window.screen.availWidth;
		nHeight =3D window.screen.availHeight;
		strBrowserOptions +=3D =
",width=3D"+nWidth+",height=3D"+nHeight+",left=3D0,top=3D0,screenX=3D0,sc=
reenY=3D0";
	}
	else=20
	{
		strBrowserOptions +=3D ",width=3D" + nWidth + ",height=3D" +nHeight;
	}
=09
	if (FF)
	{
		var arrBrowserOptions =3D strBrowserOptions.split(",");
		var bToolbar =3D false;
		var nTBIndex =3D -1;
		var bLocation =3D false;
		var nLocIndex =3D -1;
	=09
		for (var i =3D 0; i < arrBrowserOptions.length; i++)
		{
			var arrTemp =3D arrBrowserOptions[i].split("=3D");
		=09
			switch(arrTemp[0])
			{
				case "toolbar":
					bToolbar =3D (arrTemp[1] =3D=3D "yes") ? true : false;
					nTBIndex =3D i
					break;
				case "location":
					bLocation =3D (arrTemp[1] =3D=3D "yes") ? true : false;
					nLocIndex =3D i;
					break;
			}
		}
	=09
		if (!bLocation)
		{
			arrBrowserOptions[nTBIndex] =3D "toolbar=3Dno";
		}
	=09
		strBrowserOptions =3D arrBrowserOptions.join(",");
	}
=09
	 =20
	//--Setup the Window.open Target Url to popup and populate:
	var wndWebObj;
	var bSuccess =3D true;
=09
	if (bDefaultControls)
	{
		try
		{
			wndWebObj =3D window.open(strUrl, "mediaobjectwin");

			wndWebObj.resizeTo(nWidth, nHeight);
		}
		catch (e)
		{
			if (e.number =3D=3D -2147024891)
			{
				alert("The page you are linking to is in a different security zone =
then the presentation.  If running locally, adding the mark of the web =
to the local page may address this problem.")
				bSuccess =3D false;
			}
		}
	}
	else
	{
		try
		{
			wndWebObj =3D window.open(strUrl, "mediaobjectwin", =
strBrowserOptions);
		}
		catch (e)
		{
			if (e.number =3D=3D -2147024891)
			{
				alert("The page you are linking to is in a different security zone =
then the presentation.  If running locally, adding the mark of the web =
to the local page may address this problem.")
				bSuccess =3D false;
			}
		}
	}
=09
	if (bSuccess)
	{
		wndWebObj.focus();
	}
}

function ShowWebObjectDiv(args)
{
	str =3D args;
	params =3D str.split("|");
	var strContainerType =3D params[0]; 	// Unused
	var strObjectType =3D params[1];		// Unused
	var nXPos =3D parseInt(params[2]);
	var nYPos =3D parseInt(params[3]);
	var nWidth =3D parseInt(params[4]);
	var nHeight =3D parseInt(params[5]);
	var strBrowserOptions =3D params[6];
	var strMode =3D params[7]; 		// scale modes
	var strUrl =3D params[8];

	//Check for repository:// string//
	if (strUrl.toLowerCase().indexOf("repository://") =3D=3D 0)
	{
		strUrl =3D "/Portal/Storage/Viewers/ArtPlayer/FollowLink.aspx?file=3D" =
+ strUrl;
	}

	//- (iframe) -//
	if (g_bWebObject)=20
	{
		// Set the global values
		g_bWebObjDisplay =3D true;
		g_nWebXPos =3D nXPos;
		g_nWebYPos =3D nYPos;
		g_nWebWidth =3D nWidth;
		g_nWebHeight =3D nHeight;
		g_strWebMode =3D strMode;

		// Set the URL
		var myIFrame =3D document.getElementById("eIFContent");
		myIFrame.src =3D strUrl;

		// Adjust the Size and position
		ResizeWebObject();

	}=20
	else=20
	{
		//alert("Can't find a media layer. Opening in a new window instead.");
		window.open(strUrl,   "webobjectwin",   =
"width=3D700,height=3D500,"+strBrowserOptions);
	}

}

function HideWebObjectDiv(args)
{
	//clear the iframe
	if (g_bWebObject)=20
	{
		g_bWebObjDisplay =3D false;

		// Make the WebObject Small for Firefox
		g_nWebWidth =3D 5;
		g_nWebHeight =3D 5;

		ResizeWebObject();

		// Set the layer to be invisible
		var layerWebObject =3D document.getElementById("eLayer1");
		layerWebObject.style.visibility =3D 'hidden';

		// Fill with blank page
		var myIFrame =3D document.getElementById("eIFContent");
		myIFrame.src =3D "player/blank.html";

	}
}

function SetDisplayMode(args)
{
	var params =3D args.split("|");

	currentDisplayMode =3D params[0];

	if (g_bWebObjDisplay)
	{
		ResizeWebObject();
	}
}

function ShowMediaObject(args)
{
	//rightclick insert webobject, display in new window//
	str =3D args;
	params =3D str.split("|");
	var _url =3D params[0];
	var _options =3D params[1];

	//--Launch a new window with the specifed parameters and content:
	window.open(_url,   "mediaobjectwin",   _options);
}

function SendQuiz() =20
{
	g_strQuizResults =3D g_strQuizResults.replace(/'/g,"&#39;");

	var sHTML =3D "";
	sHTML +=3D '<FORM id=3D"formQuiz" method=3D"POST" action=3D"mailto:' + =
g_strEmail + '?subject=3D' + g_strSubject + '" enctype=3D"text/plain">';
	sHTML +=3D '<INPUT TYPE=3D"hidden" NAME=3D"Quiz Results" VALUE=3D\'' + =
g_strQuizResults.replace(/\\n/g,"\n") + '\'>';
	sHTML +=3D '<br><input type=3D"submit"><br>';
	sHTML +=3D '</FORM>';
	document.getElementById("divQuiz").innerHTML =3D sHTML;
	document.getElementById("formQuiz").submit();
}

/////////////////////////////////////////////////////////////////////////=
//
// Resize Event
/////////////////////////////////////////////////////////////////////////=
//

var g_resizeTimer;
var g_nWebXPos =3D 0;
var g_nWebYPos =3D 0;
var g_nWebWidth =3D 0;
var g_nWebHeight =3D 0;
var g_bWebObjDisplay =3D false;
var g_strWebMode =3D "scaleall";

function ResizeWebObject()
{
	var layerWebObject =3D document.getElementById("eLayer1");
	var myIFrame =3D document.getElementById("eIFContent");

	var nWidth =3D g_nWebWidth;
	var nHeight =3D g_nWebHeight;
	var nXPos =3D g_nWebXPos;
	var nYPos =3D g_nWebYPos;

	// Calculate the Ratio and Offsets
	var swfMovie =3D thisMovie('player');

	if (!swfMovie.clientHeight)
	{
		swfMovie =3D document.getElementById("player");
	}

	var nSwfXPos =3D swfMovie.offsetLeft;
	var nSwfYPos =3D swfMovie.offsetTop;
	var nSwfHeight =3D swfMovie.clientHeight;
	var nSwfWidth =3D swfMovie.clientWidth;

	if (isMac && IE5)
	{
		nSwfWidth =3D swfMovie.width;
		if (swfMovie.width =3D=3D "100%")
		{
			nSwfWidth =3D document.body.clientWidth;
		=09
		}
	=09
		nSwfHeight =3D swfMovie.height;
		if (swfMovie.height =3D=3D "100%")
		{
			nSwfHeight =3D document.body.clientHeight;
		}
	}

	var nWRatio =3D nSwfWidth / SWF_BASE_WIDTH;
	var nHRatio =3D nSwfHeight / SWF_BASE_HEIGHT;
	var nRatio =3D 1;
	var nLeftOffset =3D 0;
	var nTopOffset =3D 0;

	// Adjust the Width and the height for firefox
	if (FF1 || NS6plus)
	{
		nWidth -=3D 5;
		nHeight -=3D 5;
	}

	//Handle special Mode 2 and 3 cases:
	if (currentDisplayMode =3D=3D 3)=20
	{
		nXPos -=3D WEBOBJ_DISPLAY3_XPOS_ADJUST;
		nYPos -=3D WEBOBJ_DISPLAY3_YPOS_ADJUST;
		nXPos *=3D 1.13;
		nYPos *=3D 1.13;
		nWidth *=3D 1.13;
		nHeight *=3D 1.13;
	}
	else if (currentDisplayMode =3D=3D 2)=20
	{
		nXPos -=3D WEBOBJ_DISPLAY2_XPOS_ADJUST;

	}

	if (nHRatio < nWRatio)
	{
		nRatio =3D nHRatio;
		nLeftOffset =3D (nSwfWidth - (SWF_BASE_WIDTH * nRatio)) / 2;
	}
	else
	{
		nRatio =3D nWRatio;
		nTopOffset =3D (nSwfHeight - (SWF_BASE_HEIGHT * nRatio)) / 2;
	}

	strMode =3D "scaleall";

	if ((g_strWebMode =3D=3D "") || (g_strWebMode =3D=3D "scaleall"))=20
	{
		factorSize =3D nRatio; =20
		factorPosition =3D nRatio;
	}
	if (g_strWebMode =3D=3D"scaleposition")
	{
		factorSize =3D 1; =20
		factorPosition =3D nRatio;
	}
	if (g_strWebMode =3D=3D "scalesize") =20
	{
		factorSize =3D nRatio; =20
		factorPosition =3D 1;
	}
	if (g_strWebMode =3D=3D "absolute")=20
	{
		factorSize =3D 1; =20
		factorPosition =3D 1;
	}

	=09
	iLeft =3D (WEBOBJ_LEFT + nXPos) * factorPosition + nLeftOffset;
	iTop =3D (WEBOBJ_TOP + nYPos) * factorPosition + nTopOffset;
	iWidth =3D nWidth * factorSize;
	iHeight =3D nHeight * factorSize;

	//Resize the layer
	layerWebObject.style.left =3D nSwfXPos + iLeft;
	layerWebObject.style.top =3D nSwfYPos + iTop;
	layerWebObject.style.width =3D iWidth;
	layerWebObject.style.height =3D iHeight;
	layerWebObject.style.visibility =3D 'visible';

	// Resize the IFrame
	myIFrame.style.width =3D iWidth;
	myIFrame.style.height =3D iHeight;

}

function WindowResize()
{
	// Notify the swf that we have resized.  This is for=20
	// text that does not scale properly
	if (g_bScaleSwf)
	{
		// Make sure that we don't send 100 resize messages in a row
		clearTimeout(g_ResizeTimeout);
		g_ResizeTimeout =3D setTimeout("NotifySwfResize()", 200);
	=09
	}

	// Resize the Web Object
	if (g_bWebObjDisplay)
	{
		ResizeWebObject();
	}
}

function NotifySwfResize()
{
	var swfMovie =3D thisMovie('player');
	swfMovie.SetVariable("g_Resize.Trigger", "1");
}

function SetBgColor(strColor)
{
	var strTemp =3D "";

	if (IE4 && !Opera && !isMac)
	{
		strTemp =3D "0x" + strColor;
		document.bgColor =3D parseInt(strTemp);
	}
	else
	{
		strTemp =3D "#" + strColor;
		document.bgColor =3D strTemp;
	}=09
}

window.onresize =3D WindowResize;

var g_strAttachment =3D "";

function OpenAttachment()
{
	if (IESP2 || IE7Above)
	{
		try
		{
			window.open('player/attach.html?' + unescape(GetBasePath()) + =
g_strAttachment,"attach")
		}
		catch (e)
		{
			if (e.number =3D=3D -2147024891)
			{
				alert("For viewing attachments when presentation is not playing from =
a website, view the Knowledge Base article located at =
http://kb.articulate.com/kb/000669.php")
			}
		}
	}
	else
	{
		window.open(unescape(GetBasePath()) + g_strAttachment);
	}
}

/////////////////////////////////////////////////////////////////////////=
///////
// Results Screen Code
/////////////////////////////////////////////////////////////////////////=
///////

function QuestionResult(nQuestionNum, strQuestion, strResult, =
strCorrectResponse, strStudentResponse, nPoints, strInteractionId, =
strObjectiveId, strType, strLatency)
{
	if (nPoints < 0)
	{
		nPoints =3D 0;
	}
	if (strCorrectResponse =3D=3D "")
	{
		strCorrectResponse =3D "&nbsp;";
	}

	this.nQuestionNum =3D nQuestionNum
	this.strQuestion =3D strQuestion;
	this.strCorrectResponse =3D strCorrectResponse;
	this.strStudentResponse =3D strStudentResponse;
	this.strResult =3D strResult;
	this.nPoints =3D nPoints;
	this.bFound =3D false;
	this.dtmFinished =3D new Date();
	this.strInteractionId =3D strInteractionId;
	this.strObjectiveId =3D strObjectiveId;
	this.strType =3D strType;
	this.strLatency =3D strLatency;
}

function StoreResult(args)
{
	args =3D args.replace(/\|\$s\$\|/g,";")
	var arrParams =3D args.split("|$:$|");
	var oQuestionResult =3D new QuestionResult(parseInt(arrParams[0]) + 1, =
arrParams[1], arrParams[2], arrParams[3], arrParams[4] ,arrParams[5]);
	var nIndex =3D g_arrResults.length;

	// Lets see if we have answered the question before

	for (var i =3D 0; i < g_arrResults.length; i++)
	{
		if (g_arrResults[i].nQuestionNum =3D=3D oQuestionResult.nQuestionNum)
		{
			nIndex =3D i;
			break;
		}
	}

	g_arrResults[nIndex] =3D oQuestionResult;

}

function StoreQuestionResult(nQuestionNum, strQuestion, strResult, =
strCorrectResponse, strStudentResponse, nPoints, strInteractionId, =
strObjectiveId, strType, strLatency)
{

	var oQuestionResult =3D new QuestionResult(nQuestionNum, strQuestion, =
strResult, strCorrectResponse, strStudentResponse, nPoints, =
strInteractionId, strObjectiveId, strType, strLatency);
	var nIndex =3D g_arrResults.length;

	// Lets see if we have answered the question before

	for (var i =3D 0; i < g_arrResults.length; i++)
	{
		if (g_arrResults[i].nQuestionNum =3D=3D oQuestionResult.nQuestionNum =
&& strQuestion =3D=3D g_arrResults[i].strQuestion)
		{
			nIndex =3D i;
			break;
		}
	}

	g_arrResults[nIndex] =3D oQuestionResult;

}

function StoreQuizResult(args)
{
	var arrParams =3D args.split("|$:$|");

	g_oQuizResults.dtmFinished =3D new Date();
	g_oQuizResults.strResult =3D arrParams[0];
	g_oQuizResults.strScore =3D arrParams[1];
	g_oQuizResults.strPassingScore =3D arrParams[2];
}

function ShowResult(args)
{
	var arrData =3D args.split("|$s$|");
=09
	if (!g_oQuizResults.oOptions)
	{
		g_oQuizResults.oOptions =3D new Object();
	}

	g_oQuizResults.oOptions.bShowUserScore =3D (arrData[0] =3D=3D "1");
	g_oQuizResults.oOptions.bShowPassingScore =3D (arrData[1] =3D=3D "1");
	g_oQuizResults.oOptions.bShowShowPassFail =3D (arrData[2] =3D=3D "1");
	g_oQuizResults.oOptions.bShowQuizReview =3D (arrData[3] =3D=3D "1");
	g_oQuizResults.oOptions.strResult =3D arrData[4];
	g_oQuizResults.oOptions.strName =3D arrData[5];

	window.open(GetBasePath() + g_strQMPath + "report.html", "Reports")
}

/////////////////////////////////////////////////////////////////////////=
///////
// Zoom code
/////////////////////////////////////////////////////////////////////////=
///////

var g_oZoomInfo =3D new Object();
var g_wndZoom;

function PopZoomImage(strFileName, nWidth, nHeight, strZoomPath)
{=09
	var strScroll =3D "0";
	g_oZoomInfo.strFileName =3D strFileName;
	g_oZoomInfo.nWidth =3D parseInt(nWidth);
	g_oZoomInfo.nHeight =3D parseInt(nHeight);

	if (g_oZoomInfo.nWidth > screen.availWidth)
	{
		g_oZoomInfo.nWidth =3D screen.availWidth;
		strScroll =3D "1";
	}

	if (g_oZoomInfo.nHeight > screen.availHeight)
	{
		g_oZoomInfo.nHeight =3D screen.availHeight;
		strScroll =3D "1";
	}


	var strOptions =3D "width=3D" + g_oZoomInfo.nWidth +",height=3D" + =
g_oZoomInfo.nHeight + ", status=3D0, toolbar=3D0, location=3D0, =
menubar=3D0, scrollbars=3D" + strScroll;

	if (g_wndZoom)
	{
		try
		{
			g_wndZoom.close()
		}
		catch (e)
		{
		}
	}

	var strRelPath =3D g_strQMPath;
	if (strZoomPath !=3D "" && strZoomPath !=3D undefined && strZoomPath =
!=3D null)
	{
		strRelPath =3D strZoomPath;
	}

	var strZoom =3D "zoom.html?" + "vFileName=3D" + strFileName + =
"&vWndWidth=3D" + nWidth + "&vWndHeight=3D" + nHeight;
	var strBase =3D GetBasePath().split("%20").join(" ");
=09
	if (strRelPath.indexOf(strBase) < 0)
	{
		strRelPath =3D strBase + strRelPath;
	}
=09
	g_wndZoom =3D window.open(strRelPath + strZoom, "Zoom", strOptions);
}

/////////////////////////////////////////////////////////////////////////=
///////
// Video
/////////////////////////////////////////////////////////////////////////=
///////
function PopVideo(strVidSwf, strWndWidth, strWndHeight, strVidWidth, =
strVidHeight, strDuration, strPlaybar, strAutoplay)
{
	var nWndWidth =3D parseInt(strWndWidth);
	var nWndHeight =3D parseInt(strWndHeight);
	var strSearch =3D "vVidSwf=3D" + strVidSwf +=20
					"&vWndWidth=3D" + strWndWidth +=20
					"&vWndHeight=3D" + strWndHeight +=20
					"&vVidWidth=3D" + strVidWidth +=20
					"&vVidHeight=3D" + strVidHeight +=20
					"&vDuration=3D" + strDuration +=20
					"&vPlaybar=3D" + strPlaybar +=20
					"&vAutoplay=3D" + strAutoplay;

	if (nWndWidth > screen.availWidth)
	{
		nWndWidth =3D screen.availWidth;
	}

	if (nWndHeight > screen.availHeight)
	{
		nWndHeight =3D screen.availHeight;
	}


	var strOptions =3D "width=3D" + nWndWidth +",height=3D" + nWndHeight + =
", status=3D0, toolbar=3D0, location=3D0, menubar=3D0, scrollbars=3D0";

	if (g_wndZoom)
	{
		try
		{
			g_wndZoom.close()
		}
		catch (e)
		{
		}
	}

	g_wndZoom =3D window.open(GetBasePath() + g_strContentFolder + =
"/VidLoader.html?" + strSearch, "Video", strOptions);
}


function OpenVideo(strUrl, strWndWidth, strWndHeight, strVidWidth, =
strVidHeight, strDuration, strPlaybar, strAutoPlay,
						   strStatus, strToolbar, strLocation, strMenubar, strScrollbars, =
strResizable, strPlayerPath, strContentPath)
{
	var nWndWidth =3D parseInt(strWndWidth);
	var nWndHeight =3D parseInt(strWndHeight);
=09
	var strSearch =3D "exUrl=3D" + strContentPath + strUrl +=20
					"&exWndWidth=3D" + strWndWidth +
					"&exWndHeight=3D" + strWndHeight +
					"&exWidth=3D" + strVidWidth +=20
					"&exHeight=3D" + strVidHeight +=20
					"&exDuration=3D" + strDuration +=20
					"&exPlaybar=3D" + strPlaybar +=20
					"&exAutoPlay=3D" + strAutoPlay;

	if (nWndWidth > screen.availWidth)
	{
		nWndWidth =3D screen.availWidth;
	}

	if (nWndHeight > screen.availHeight)
	{
		nWndHeight =3D screen.availHeight;
	}


	var strOptions =3D "";
	strOptions +=3D "width=3D" + nWndWidth;
	strOptions +=3D ", height=3D" + nWndHeight;
	strOptions +=3D ", status=3D" + ((strStatus.toLowerCase() =3D=3D =
"true") ? 1 : 0);
	strOptions +=3D ", toolbar=3D" + ((strToolbar.toLowerCase() =3D=3D =
"true") ? 1 : 0);
	strOptions +=3D ", location=3D" + ((strLocation.toLowerCase() =3D=3D =
"true") ? 1 : 0);
	strOptions +=3D ", menubar=3D" + ((strMenubar.toLowerCase() =3D=3D =
"true") ? 1 : 0);
	strOptions +=3D ", scrollbars=3D" + ((strScrollbars.toLowerCase() =
=3D=3D "true") ? 1 : 0);
	strOptions +=3D ", resizable=3D" + ((strResizable.toLowerCase() =3D=3D =
"true") ? 1 : 0);

	var nXPos =3D 0;
	var nYPos =3D 0;
	var nWidth =3D screen.availWidth;
	var nHeight =3D screen.availHeight;
=09
	if (window.screenX !=3D undefined)=20
	{
		nXPos =3D window.screenX;
		nYPos =3D window.screenY;
		nWidth =3D window.innerWidth;
		nHeight =3D window.innerHeight;
	}
	else if (window.screenLeft !=3D undefined)
	{
		nXPos =3D window.screenLeft;
		nYPos =3D window.screenTop;
		nWidth =3D document.body.offsetWidth;
		nHeight =3D document.body.offsetHeight;
	}
=09
	if (g_wndZoom)
	{
		try
		{
			g_wndZoom.close()
		}
		catch (e)
		{
		}
	}
=09
	strOptions +=3D ", left=3D" + (nXPos + (nWidth - nWndWidth)/2);
	strOptions +=3D ", screenX=3D" + (nXPos + (nWidth - nWndWidth)/2);
	strOptions +=3D ", top=3D" + (nYPos + (nHeight - nWndHeight)/2);
	strOptions +=3D ", screenY=3D" + (nYPos + (nHeight - nWndHeight)/2);

	g_wndZoom =3D window.open(strPlayerPath + "VideoPlayer.html?" + =
strSearch, "Video", strOptions);
}

/////////////////////////////////////////////////////////////////////////=
///////
// Get Time
/////////////////////////////////////////////////////////////////////////=
///////
function GetTime(dtmDate)
{
	var strResult =3D "";
	var nHours =3D dtmDate.getHours();
	var strAM =3D "am";
	var nMinutes =3D dtmDate.getMinutes();
	var strMinutes =3D "" + nMinutes;
	var nSeconds =3D dtmDate.getSeconds();
	var strSeconds =3D "" + nSeconds;

	if (nMinutes < 10)
	{
		strMinutes =3D "0" + nMinutes;
	}
=09
	if (nSeconds < 10)
	{
		strSeconds =3D "0" + nSeconds;
	}
=09

	strResult =3D nHours + ":" + strMinutes + ":" + strSeconds;

	return strResult;
}

function GetDate(dtmDate)
{
	var strResult =3D "";


	strResult =3D (dtmDate.getMonth() + 1) + "/" + dtmDate.getDate() + "/" =
+ dtmDate.getFullYear();

	return strResult;
}

/////////////////////////////////////////////////////////////////////////=
///////
// Email Results
/////////////////////////////////////////////////////////////////////////=
///////

function EmailResults(strAddress)
{
	var g_strSubject =3D "Quiz Results: " + g_oQuizResults.strTitle;
	var strQuizResults =3D "";
	var strMainHeader =3D " " + g_oQuizResults.strTitle + "\nStatus, Raw =
Score, Passing Score, Max Score, Min Score, Time\n";
	var strLineHeader =3D "\n\nDate, Time, Score, Interaction ID, Objective =
Id, Interaction Type, Student Response, Result, Weight, Latency\n";
	var strMainData =3D "\n";
	var strLineData =3D "\n";
	=09
	// Status
	strMainData +=3D g_oQuizResults.strResult + ",";
=09
	// Score
	// strMainData +=3D g_oQuizResults.strScore + ",";
=09
	// Raw Score
	strMainData +=3D g_oQuizResults.strPtScore + ",";
=09
	// Passing Score
	strMainData +=3D Math.round((g_oQuizResults.strPassingScore/100) * =
g_oQuizResults.strPtMax) + ",";
=09
	// Max Score
	strMainData +=3D g_oQuizResults.strPtMax + ",";
=09
	// Min Score
	strMainData +=3D 0 + ",";
=09
	// Time
	strMainData +=3D GetTime(g_oQuizResults.dtmFinished);
	=09
	for (var i =3D 0; i < g_arrResults.length; i++)
	{
		//Date
		strLineData +=3D GetDate(g_arrResults[i].dtmFinished) + ",";
	=09
		// Time
		strLineData +=3D GetTime(g_arrResults[i].dtmFinished) + ",";
	=09
		// Score
		strLineData +=3D g_arrResults[i].nPoints + ",";
	=09
		// Interaction Id
		strLineData +=3D g_arrResults[i].strInteractionId + ",";
	=09
		// Objective Id
		strLineData +=3D g_arrResults[i].strObjectiveId + ",";

		// Interaction Type
		strLineData +=3D g_arrResults[i].strType + ",";

		// Student Response
		var strResponse =3D g_arrResults[i].strStudentResponse;
		strResponse =3D ReplaceAll(strResponse, "'", "%27");
		strLineData +=3D strResponse + ",";	=09
	=09
	=09
		// Result
		strLineData +=3D g_arrResults[i].strResult + ",";
	=09
		// Weight
		strLineData +=3D "1,";
	=09
		// Latency
		strLineData +=3D g_arrResults[i].strLatency;
	=09
		strLineData +=3D "\n";
	}
=09
	strQuizResults =3D strMainHeader + strMainData + strLineHeader + =
strLineData;

	var sHTML =3D "";
	sHTML +=3D '<FORM id=3D"formQuiz" method=3D"POST" action=3D"mailto:' + =
strAddress + '?subject=3D' + g_strSubject + '" enctype=3D"text/plain">';
	sHTML +=3D '<INPUT TYPE=3D"hidden" NAME=3D"Quiz Results" VALUE=3D\'' + =
strQuizResults + '\'>';
	sHTML +=3D '<br><input type=3D"submit"><br>';
	sHTML +=3D '</FORM>';
	document.getElementById("divQuiz").innerHTML =3D sHTML;
	document.getElementById("formQuiz").submit();

}

/////////////////////////////////////////////////////////////////////////=
//
// Flash Command Handler
/////////////////////////////////////////////////////////////////////////=
//
var g_strDelim =3D "|~|";
var g_strInteractionDelim =3D "|#|";

function player_DoJSCommand(command, args)
{
	var strCommand =3D command;
	var strArgs =3D ReplaceAll(args, "|$|", "%");
=09
	player_DoFSCommand(strCommand, strArgs)=20
}

function ReplaceAll(strTarget, strChar, strNew)
{
	var arrRemoved =3D strTarget.split(strChar);
=09
	return arrRemoved.join(strNew);
}

function player_DoFSCommand(command, args)=20
{
	if (command.substr(0, 3) =3D=3D "CC_")
	{
		player_DoChicoCommand(command, args);
	}

	args =3D String(args);

	args =3D args.replace(/%_q_%/g,"\"")
	args =3D args.replace(/;/g,"|$s$|")
	args =3D args.replace(/%_s_%/g,";")

	switch (command)
	{
		case "current_slide_index":
			g_nCurrentSlideIndex =3D Number(args);
			break;
		case "bookmark_presentation":
			CreateBookmark(args, false);
			break;

		case "bookmark_slide":
			CreateBookmark(args, true);
			break;

		case "hyper_flashobject":
			OpenFlashObjectWnd(args);
			break;

		case "hyper_webobject_newwindow":
			OpenWebObjectWnd(args);
			break;

		case "hyper_webobject_inplayer":
			ShowWebObjectDiv(args);
			break;

		case "hyper_webobject_inplayer_hide":
			HideWebObjectDiv(args);
			break;

		case "ART_displaymode":
			SetDisplayMode(args);
			break;

		case "hyper_mediaobject":
			ShowMediaObject(args);
			break;

		case "ART_CloseAndExit":
			if (!g_bLMS || g_bAOSupport)
			{
				top.window.close();
	 		}
			break;
		case "ART_SetBgBolor":
				SetBgColor(args);
			break;

		case "ART_Attachment":
			g_strAttachment =3D args;
			if (IESP2)
			{
				OpenAttachment()
			}
			else
			{
				setTimeout("OpenAttachment()", 100)
			}
			break;
	=09
		case "RR_PopVideo":
			var arrArgs =3D args.split("|~|");
			OpenVideo(arrArgs[0], Number(arrArgs[1]) + 5, Number(arrArgs[2]) + =
12, arrArgs[3], arrArgs[4], arrArgs[5], arrArgs[6], arrArgs[7],
					  "false", "false", "false", "false", "false", "false", "player/", =
"");
			break;
		case "AP_OpenVideo":
			var arrArgs =3D args.split("|");
			OpenVideo(arrArgs[0], arrArgs[1], arrArgs[2], arrArgs[3], arrArgs[4], =
arrArgs[5], arrArgs[6], arrArgs[7],=20
					  arrArgs[8], arrArgs[9], arrArgs[10], arrArgs[11], arrArgs[12], =
arrArgs[13], "player/", "../data/swf/");
			break;

		// Email Handlers
		case "emailEmail":
			g_strEmail =3D args;
			break;

		case "QuizResults":
		case "Quiz Results":
			var strTemp =3D args.replace(/\|\$s\$\|/g,";");
			g_strQuizResults =3D strTemp;
			break;

		case "emailSubject":
			g_strSubject =3D args;
			break;

		case "emailSubmit":
			SendQuiz();
			break;

		// QM Handlers
		case "SetQMPath":
			g_strQMPath =3D args;
			break;

		case "StoreQuestionResult":
			StoreResult(args);
			break;

		case "StoreQuizResult":
			StoreQuizResult(args);
			break;

		case "DisplayPrintScreen":
			ShowResult(args);
			break;

		case "ART_QMAttachment":
			g_strAttachment =3D g_strQMPath + args;

			if (IESP2)
			{
				OpenAttachment()
			}
			else
			{
				setTimeout("OpenAttachment()", 100)
			}

			break;

		case "QM_ZoomImage":
			var arrData =3D args.split("|~|");
			PopZoomImage(arrData[0], arrData[1], arrData[2], arrData[3]);
			break;

	}

	if (g_bLMS)
	{
		customFScommandHandler(command, args);   //found in Lms.js
	}
=09
	if (g_bAOSupport)
	{
		AO_DoFSCommand(command, args);
	}
}

function CloseWindow()
{
	top.window.close();
}

function player_DoChicoCommand(command, args)
{
	args =3D String(args);
	command =3D String(command);

	var arrArgs =3D args.split(g_strDelim);

	switch (command)
	{
		case "CC_SetInteractionDelim":
			g_strInteractionDelim =3D args;
			break;
		=09
		case "CC_SetDelim":
			ResetPrintData();
			g_strDelim =3D args;
			break;
		=09
		case "CC_ZoomImage":
			PopZoomImage(arrArgs[0], arrArgs[1], arrArgs[2], arrArgs[9]);
			break;
		=09
		case "CC_OpenVideo":
			OpenVideo(arrArgs[0], arrArgs[1], arrArgs[2], arrArgs[3], arrArgs[4], =
arrArgs[5], arrArgs[6], arrArgs[7],=20
					  arrArgs[8], arrArgs[9], arrArgs[10], arrArgs[11], arrArgs[12], =
arrArgs[13], arrArgs[14], "");
			break;
		=09
		case "CC_StoreQuestionResult":	=09
			StoreQuestionResult(parseFloat(arrArgs[0]), arrArgs[1], arrArgs[2], =
arrArgs[3], arrArgs[4] ,arrArgs[5], arrArgs[6], arrArgs[7], arrArgs[8], =
arrArgs[9]);
			break;
		=09
		case "CC_StoreQuizResult":	=09
			g_oQuizResults.dtmFinished =3D new Date();
			g_oQuizResults.strResult =3D arrArgs[0];
			g_oQuizResults.strScore =3D arrArgs[1];
			g_oQuizResults.strPassingScore =3D arrArgs[2];
			g_oQuizResults.strMinScore =3D arrArgs[3];
			g_oQuizResults.strMaxScore =3D arrArgs[4];
			g_oQuizResults.strPtScore =3D arrArgs[5];
			g_oQuizResults.strPtMax =3D arrArgs[6];
			g_oQuizResults.strTitle =3D arrArgs[7];
			break;
		=09
		case "CC_PrintResults":
			g_oQuizResults.oOptions.bShowUserScore =3D (arrArgs[0] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowPassingScore =3D (arrArgs[1] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowShowPassFail =3D (arrArgs[2] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowQuizReview =3D (arrArgs[3] =3D=3D =
"true");
			g_oQuizResults.oOptions.strResult =3D arrArgs[4];
			g_oQuizResults.oOptions.strName =3D arrArgs[5];
			window.open(arrArgs[6] + "report.html", "Reports")
			break;
		=09
		case "CC_EmailResults":
			g_oQuizResults.oOptions.bShowUserScore =3D (arrArgs[0] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowPassingScore =3D (arrArgs[1] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowShowPassFail =3D (arrArgs[2] =3D=3D =
"true");
			g_oQuizResults.oOptions.bShowQuizReview =3D (arrArgs[3] =3D=3D =
"true");
			g_oQuizResults.oOptions.strResult =3D arrArgs[4];
			g_oQuizResults.oOptions.strName =3D arrArgs[5];

			EmailResults(arrArgs[6]);
			break;
		=09
		case "CC_OpenUrl":
			OpenUrl(arrArgs[0], arrArgs[1], arrArgs[2], arrArgs[3], arrArgs[4], =
arrArgs[5], arrArgs[6], arrArgs[7],=20
					  arrArgs[8], arrArgs[9], arrArgs[10], arrArgs[11], arrArgs[12], =
arrArgs[13]);
			break;
		=09
		case "CC_ClosePlayer":
			if (!g_bLMS || g_bAOSupport)
			{
				if (FF)
				{
					setTimeout("CloseWindow()", 100);
				}
				else
				{
					CloseWindow();
				}
			}
			break;
		default:
			break;
	}
=09
	if (g_bLMS)
	{
		lms_DoFSCommand(command, args);
	}
}

function ResetPrintData()
{
	g_arrResults =3D new Array();
	g_oQuizResults =3D new Object();
	g_oQuizResults.oOptions =3D new Object();
}

/////////////////////////////////////////////////////////////////////////=
///////
// Open Url
/////////////////////////////////////////////////////////////////////////=
///////
function OpenUrl(strUrl, strWindow, strWindowSize, strWidth, strHeight, =
strUseDefaultControls, strStatus, strToolbar, strLocation, strMenubar, =
strScrollbars, strResizable)
{

	var nWndWidth =3D parseInt(strWidth);
	var nWndHeight =3D parseInt(strHeight);
	var bUseDefaultSize =3D (strWindowSize.toLowerCase() =3D=3D "default");
	var bUseDefaultControls =3D (strUseDefaultControls.toLowerCase() =3D=3D =
"true");
	var bFullScreen =3D (strWindowSize.toLowerCase() =3D=3D "fullscreen");

	if (bFullScreen)
	{
		nWndWidth =3D screen.availWidth;
		nWndHeight =3D screen.availHeight;
	}
	else
	{
		if (nWndWidth > screen.availWidth)
		{
			nWndWidth =3D screen.availWidth;
		}

		if (nWndHeight > screen.availHeight)
		{
			nWndHeight =3D screen.availHeight;
		}
	}


	var strOptions =3D "";
	if (!bUseDefaultControls)
	{
		if (!bUseDefaultSize)
		{
			strOptions +=3D "width=3D" + nWndWidth + ", ";
			strOptions +=3D "height=3D" + nWndHeight + ", ";
		}

		strOptions +=3D "status=3D" + ((strStatus.toLowerCase() =3D=3D "true") =
? 1 : 0);
		strOptions +=3D ", toolbar=3D" + ((strToolbar.toLowerCase() =3D=3D =
"true") ? 1 : 0);
		strOptions +=3D ", location=3D" + ((strLocation.toLowerCase() =3D=3D =
"true") ? 1 : 0);
		strOptions +=3D ", menubar=3D" + ((strMenubar.toLowerCase() =3D=3D =
"true") ? 1 : 0);
		strOptions +=3D ", scrollbars=3D" + ((strScrollbars.toLowerCase() =
=3D=3D "true") ? 1 : 0);
		strOptions +=3D ", resizable=3D" + ((strResizable.toLowerCase() =3D=3D =
"true") ? 1 : 0);
	}


	var oNewWnd;
=09
	if (bUseDefaultSize && bUseDefaultControls)
	{
		window.open(strUrl, strWindow);
	}
	else if (bUseDefaultControls)
	{
		if (IE)
		{
			oNewWnd =3D window.open("player/blank.html", strWindow);
		=09
			if (bFullScreen)
			{
				oNewWnd.moveTo(0, 0);
			}
		=09
			oNewWnd.resizeTo(nWndWidth, nWndHeight);
			oNewWnd.document.location =3D strUrl;
		}
		else
		{
			oNewWnd =3D window.open(strUrl, strWindow);
			oNewWnd.resizeTo(nWndWidth, nWndHeight);
		}
	}
	else
	{
		oNewWnd =3D window.open(strUrl, strWindow, strOptions);
	}
=09
	if (bFullScreen && !(bUseDefaultControls && IE))
	{
		oNewWnd.moveTo(0, 0);
	}
=09
}

------=_NextPart_000_0000_01CD76E9.E49A2FE0--
