From: <Saved by Windows Internet Explorer 8>
Subject: Graham Mallard Dept of Economics. A Boundedly-rational general equilibrium analysis of environmental transport policy in the UK. - Panopto Viewer
Date: Mon, 13 Dec 2010 12:20:07 -0000
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0027_01CB9AC0.148993B0"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3664

This is a multi-part message in MIME format.

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Pages/Viewer/Default.aspx?id=10b064b1-5348-4775-9d42-a520503a4f4a

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" =
"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns=3D"http://www.w3.org/1999/xhtml"><HEAD><TITLE>Graham Mallard =
Dept of Economics. A Boundedly-rational general equilibrium analysis of =
environmental transport policy in the UK. - Panopto Viewer</TITLE>
<META content=3D"text/html; charset=3Dutf-8" =
http-equiv=3DContent-Type><LINK=20
id=3DViewerStyleSheetLink rel=3Dstylesheet type=3Dtext/css=20
href=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9b=
fe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Viewer.css"><!-- =
External libraries -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/MicrosoftAjax.js"></S=
CRIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Silverlight.js"></SCR=
IPT>
<!-- Internal libraries -->
<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Viewer.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/TabViewer.js"></SCRIP=
T>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/EventsViewer.js"></SC=
RIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/BasePlayer.js"></SCRI=
PT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/player.js"></SCRIPT>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/WMPVideo.js"></SCRIPT=
>

<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/SLVideo.js"></SCRIPT>=


<SCRIPT type=3Dtext/javascript=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/DetectAcrobat.js"></S=
CRIPT>

<SCRIPT type=3Dtext/javascript>
        var jsonViewerParams =3D =
{"AllowPublicNotes":false,"ApplicationPath":"\/Panopto","Broadcast":false=
,"Contributors":[],"DeliveryID":1041,"ErrorMessage":null,"InvocationID":"=
cd9f0a4e-b306-e011-b929-842b2b193e75","LoginURL":"http:\/\/coursecast\/Pa=
nopto\/Pages\/Auth\/Login.aspx?ReturnUrl=3D%2fPanopto%2fPages%2fViewer%2f=
Default.aspx%3fid%3d10b064b1-5348-4775-9d42-a520503a4f4a","PublicNotesStr=
eams":[],"StartTime":null,"UseWMP":false,"UserName":null,"Version":"3.0.4=
225"};

        // Hide viewer and show message, or vice-versa for argument =
evaluating to false.
        function showMessage(text)
        {
            var message =3D document.getElementById("message");
            var viewer =3D document.getElementById("viewer");

            message.innerHTML =3D text;
            message.style.display =3D (text ? "block" : "none");
            viewer.style.display =3D (text ? "none" : "block");
        }

        function initViewer(viewerParams)
        {
            if(viewerParams.ErrorMessage)
            {
                showMessage(viewerParams.ErrorMessage);
                return;
            }

            // check our silverlight settings
            g_bUsingSilverlight =3D Silverlight.isInstalled( =
g_sSilverlightVersion ) ? true : false;
            if(viewerParams.UseWMP)
            {
                g_bUsingSilverlight =3D false;
            }
           =20
            if( !g_bUsingSilverlight && !g_bIsIE )
            {
                showMessage("Silverlight is required to use the Panopto =
viewer. Please install and restart your browser.");
               =20
                var silverEl =3D CreateChildElement( =
document.getElementById("message"), "div" );
                silverEl.style.marginTop =3D "10px";
                =
Silverlight.createObject('/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9=
bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/player.xaml', =
silverEl, "myPlugin", {inplaceInstallPrompt:true, =
minRuntimeVersion:g_sSilverlightVersion},
                    {onError:null,onLoad:null}, null, null);=20
            }
            else
            {
                // create the app
                g_pViewer =3D new =
PanoptoViewer(document.getElementById("viewer"), viewerParams);
                g_pViewer.Initialize();
                g_pViewer.OpenDelivery();

                // show the viewer
                document.getElementById("viewer").style.display =3D =
"block";
            }
        }
    </SCRIPT>

<META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18702"></HEAD>
<BODY onload=3DinitViewer(jsonViewerParams)>
<FORM id=3Dctl01 method=3Dpost=20
action=3DDefault.aspx?id=3D10b064b1-5348-4775-9d42-a520503a4f4a>
<DIV class=3DaspNetHidden><INPUT id=3D__EVENTTARGET type=3Dhidden =
name=3D__EVENTTARGET>=20
<INPUT id=3D__EVENTARGUMENT type=3Dhidden name=3D__EVENTARGUMENT> <INPUT =

id=3D__VIEWSTATE=20
value=3D/wEPDwUKLTE2NTE2MTUyMA9kFgQCAQ9kFgQCAQ8WAh4EaHJlZgVvL1Bhbm9wdG8vQ=
2FjaGUvZTdlNzhlNmUtMTg0Zi00NWQxLTg1MTctZjg4ZTBkZDliZmU0NGZjNzUwOTUtMWExNi=
05ZTY4LWY2YTQtZmI5ODFiZjA1YmY2L1BhZ2VzL1ZpZXdlci9WaWV3ZXIuY3NzZAICDxUBcC9=
QYW5vcHRvL0NhY2hlL2U3ZTc4ZTZlLTE4NGYtNDVkMS04NTE3LWY4OGUwZGQ5YmZlNDRmYzc1=
MDk1LTFhMTYtOWU2OC1mNmE0LWZiOTgxYmYwNWJmNi9QYWdlcy9WaWV3ZXIvcGxheWVyLnhhb=
WxkAgMPZBYIZg8WAh4Dc3JjBXMvUGFub3B0by9DYWNoZS9lN2U3OGU2ZS0xODRmLTQ1ZDEtOD=
UxNy1mODhlMGRkOWJmZTQ0ZmM3NTA5NS0xYTE2LTllNjgtZjZhNC1mYjk4MWJmMDViZjYvSW1=
hZ2VzL3NpdGVfbG9nb18xMjB4MzQuZ2lmZAICD2QWAmYPDxYEHgxGb3JtYXRTdHJpbmdkHgdU=
b29sVGlwZGRkAgMPFgIfAAUUfi9QYWdlcy9EZWZhdWx0LmFzcHhkAgQPDxYCHgtOYXZpZ2F0Z=
VVybAU4aHR0cDovL3N1cHBvcnQucGFub3B0by5jb20vRG9jdW1lbnRhdGlvbi9QYW5vcHRvMz=
AvTm90ZXNkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgURTG9naW5TdGF=
0dXMkY3RsMDEFEUxvZ2luU3RhdHVzJGN0bDAzmwCA7+V5g8EdTZ5e8DE2fIZvNCzYwbb9/Bbq=
AF2JshU=3D=20
type=3Dhidden name=3D__VIEWSTATE> </DIV>
<SCRIPT type=3Dtext/javascript>
//<![CDATA[
var theForm =3D document.forms['ctl01'];
if (!theForm) {
    theForm =3D document.ctl01;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() !=3D false)) {
        theForm.__EVENTTARGET.value =3D eventTarget;
        theForm.__EVENTARGUMENT.value =3D eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>

<DIV class=3DaspNetHidden><INPUT id=3D__EVENTVALIDATION=20
value=3D/wEWAgLe8rmfCgKnqs+GBrBUzGbZAJpPYTJSERQd1lxzwiXTRn0kd8i0H2zPYbOK =

type=3Dhidden name=3D__EVENTVALIDATION> </DIV>
<DIV id=3Dheader><IMG id=3DsiteLogoImg=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/site_logo_120x34.gif">=20

<DIV id=3DloginStatusDiv>
<DIV id=3DlogoutLink>=C2=BB <A id=3DLoginStatus=20
href=3D"javascript:__doPostBack('LoginStatus$ctl02','')">login</A> =
</DIV>
<DIV id=3DuserDiv class=3Dellipsis></DIV></DIV>
<DIV id=3DcourseTitle>
<DIV id=3DcourseTag class=3Dellipsis></DIV>
<DIV style=3D"DISPLAY: none" id=3DnameDivider>:</DIV>
<DIV id=3DsessionName class=3Dellipsis></DIV></DIV>
<DIV id=3DlogoDivider></DIV><A id=3DpanoptoLink=20
href=3D"http://coursecast/Panopto/Pages/Default.aspx"><IMG =
id=3DpanoptoLogo=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/panopto_logo_20px.png">=20
</A></DIV>
<DIV id=3Dmessage></DIV>
<DIV style=3D"DISPLAY: none" id=3Dviewer>
<DIV id=3Dviewers>
<DIV id=3DleftPane>
<DIV id=3DvideoPlayerDiv></DIV>
<DIV id=3DeventViewerDiv>
<DIV id=3DeventViewerBar class=3DtabBar></DIV>
<DIV id=3DtocDiv class=3DeventTabViewerPane>
<DIV id=3DtocSearchChrome class=3DsearchChrome><INPUT id=3DtocSearchBox=20
class=3DsearchQuery><BUTTON id=3DtocSearchButton=20
class=3DsearchSubmitButton>Search</BUTTON> </DIV></DIV>
<DIV id=3DtransDiv class=3DeventTabViewerPane>
<DIV id=3DtransSearchChrome class=3DsearchChrome><INPUT =
id=3DtransSearchBox=20
class=3DsearchQuery><BUTTON id=3DtransSearchButton=20
class=3DsearchSubmitButton>Search</BUTTON> </DIV></DIV>
<DIV id=3DnotesDiv class=3DeventTabViewerPane>
<DIV id=3DnotesHeaderDiv>
<DIV class=3DsearchChrome><INPUT id=3DnotesSearchBox =
class=3DsearchQuery><BUTTON=20
id=3DnotesSearchButton class=3DsearchSubmitButton>Search</BUTTON> </DIV>
<DIV id=3DnotesUserDiv><SPAN id=3DnotesUserLabelDiv>Channel: =
</SPAN><SELECT=20
id=3DnotesUserSelect> <OPTION disabled selected>-- Select a channel =
--</OPTION>=20
  <OPTGROUP id=3DmyNotesOptionGroup label=3D"My Notes"></OPTGROUP> =
<OPTGROUP=20
  id=3DpublicNotesOptionGroup label=3D"Other Users' Notes"></OPTGROUP> =
<OPTGROUP=20
  id=3DcustomNotesOptionGroup label=3DChannel> <OPTION =
value=3D#custom>Enter a=20
    channel...</OPTION> </OPTGROUP></SELECT> <A id=3DpublicNotesToggle =
title=3Dlocked=20
href=3D"http://coursecast/Panopto/Pages/Viewer/Default.aspx?id=3D10b064b1=
-5348-4775-9d42-a520503a4f4a#"><IMG=20
id=3DpublicNotesIcon title=3D"Your notes are private. Click to make them =
public."=20
border=3D0 alt=3D"Your notes are private. Click to make them public."=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/locked.png"=20
width=3D18 height=3D18> </A></DIV>
<DIV id=3DchannelDiv><SPAN id=3DchannelLabelDiv>Channel: </SPAN><INPUT=20
id=3DchannelInput> <INPUT id=3DchangeChannelButton value=3DApply =
type=3Dbutton> </DIV>
<DIV id=3DnotesHelpLink><A id=3DNotesHelpLink=20
href=3D"http://support.panopto.com/Documentation/Panopto30/Notes"=20
target=3D_blank>Help</A> </DIV></DIV>
<DIV id=3DnotesDivDisplay></DIV>
<DIV id=3DnotesInputDiv>
<DIV id=3DnotesInstructionsArea><SPAN id=3DcancelEditLinkSpan>Editing =
note [<A=20
id=3DcancelEditLink=20
href=3D"http://coursecast/Panopto/Pages/Viewer/Default.aspx?id=3D10b064b1=
-5348-4775-9d42-a520503a4f4a#">cancel</A>]=20
</SPAN><SPAN id=3DnotesInputMessage>Type notes below. Hit [Enter] to=20
submit.</SPAN> </DIV><TEXTAREA id=3DinputTextArea rows=3D3></TEXTAREA> =
</DIV></DIV>
<DIV id=3DsearchDiv class=3DeventTabViewerPane>
<DIV id=3DsearchSearchChrome class=3DsearchChrome>
<DIV id=3DsearchBoxControls><INPUT id=3DsearchBox =
class=3DsearchQuery><BUTTON=20
id=3DsearchButton class=3DsearchSubmitButton>Search</BUTTON> </DIV>
<DIV id=3DsearchOptionControls><SPAN id=3DsearchSortLabel>Sort:</SPAN> =
<SELECT=20
id=3DsearchSortBox> <OPTION selected =
value=3Drelevance>Relevance</OPTION> <OPTION=20
  value=3Dtime>Time</OPTION></SELECT> <SPAN =
id=3DsearchTypeLabel>Show:</SPAN> <SELECT=20
id=3DsearchTypeBox> <OPTION selected value=3Dall>All</OPTION> <OPTION=20
  value=3Dnotes>Notes</OPTION> <OPTION value=3Dppt>Slides</OPTION> =
<OPTION=20
  id=3DsearchTranscript value=3Dtranscript>Transcript</OPTION></SELECT> =
</DIV>
<DIV id=3DsearchContext></DIV></DIV>
<DIV id=3DsearchResults></DIV></DIV>
<DIV id=3DinfoDiv class=3DeventTabViewerPane>
<DIV id=3DinfoContents>
<TABLE class=3Dinfo>
  <TBODY>
  <TR>
    <TD class=3Dlabel>Session:</TD>
    <TD id=3DinfoSessionName></TD></TR></TBODY></TABLE>
<DIV id=3DsessionAbstract class=3DcontentText></DIV>
<DIV id=3DspeakerBios></DIV>
<HR>

<TABLE class=3Dinfo>
  <TBODY>
  <TR>
    <TD class=3Dlabel>Folder:</TD>
    <TD><SPAN id=3DinfoSessionGroupName></SPAN><SPAN =
class=3DlinkDecoration>[<A=20
      id=3DinfoSessionGroupLink target=3D_blank>sessions</A>]=20
</SPAN></TD></TR></TBODY></TABLE>
<DIV id=3DsessionGroupAbstract =
class=3DcontentText></DIV></DIV></DIV></DIV></DIV>
<DIV id=3DrightPane>
<DIV id=3DtabViewer>
<DIV id=3DtabViewerBar class=3DtabBar>
<DIV id=3DobjectToggle class=3D"tabDiv tabImageSelected_small"><IMG=20
id=3DobjectZoomOutButton title=3D"Zoom Out"=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/minus.gif">=20
<IMG id=3DobjectZoomOutDisabledButton title=3D"Zoom Out"=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/minus_disabled.gif">=20
<IMG id=3DobjectZoomInButton title=3D"Zoom In"=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/plus.gif">=20
<IMG id=3DobjectZoomInDisabledButton title=3D"Zoom In"=20
src=3D"http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bf=
e44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/plus_disabled.gif">=20
</DIV></DIV>
<DIV id=3DtabContent></DIV></DIV>
<DIV id=3Dthumbnails></DIV>
<DIV id=3Dquestions>
<DIV id=3DquestionsTabBar class=3DtabBar></DIV>
<DIV id=3DquestionsPane>
<DIV id=3DquestionsAsked></DIV>
<DIV id=3DquestionEntryBar><SPAN id=3DquestionHeader>Ask a =
question:</SPAN> <INPUT=20
id=3DquestionTextEntry> <SPAN id=3DquestionTextEntryInstructions>Type =
your question=20
here. Press [Enter] to submit.=20
</SPAN></DIV></DIV></DIV></DIV></DIV></DIV></FORM></BODY></HTML>

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/site_logo_120x34.gif

R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/panopto_logo_20px.png

iVBORw0KGgoAAAANSUhEUgAAAG8AAAAUCAYAAACDIGNiAAAACXBIWXMAAJnKAACZygHjkaQiAAAK
T2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AU
kSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXX
Pues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgAB
eNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAt
AGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3
AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dX
Lh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+
5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk
5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd
0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA
4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzA
BhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/ph
CJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5
h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+
Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhM
WE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQ
AkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+Io
UspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdp
r+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZ
D5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61Mb
U2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY
/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllir
SKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79u
p+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6Vh
lWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1
mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lO
k06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7Ry
FDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3I
veRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+B
Z7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/
0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5p
DoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5q
PNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIs
OpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5
hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQ
rAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9
rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1d
T1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aX
Dm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7
vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3S
PVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKa
RptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO
32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21
e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfV
P1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i
/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8
IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACA
gwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAApcSURBVHjazJp5bBzVHcc/M7O7M7vrPWzH
x/qIDYnjJI0TQkJIREIC5SiFSkUCStNSjoqWI0CltKpa9ZJQK66KikuFVlCqNqVqKKVQVIFQAyUJ
lLSmMUmITXAOO77vvXdmXv/gOZk81sEutsRPGnnfNW9+9/f3njUhBB9Hq1ev5tNGrusSCoVoaWlB
13VwfLiuo7vh0RUiNrxcC2YSji307LA5aKTj+0JiXquh+dKuZmMYOocOHaKnpwfDMD51vO3Zs2da
83zTfJ8JRIEYEJbrbGAY6APyU6wLA6VK3xgwofRpQJXyPX1AQZlXDgTl77wQol9DR3N8ZGKHrzWX
v3d7rD65prTUCgTNEMLVSKfy9BzZL460am3h0eYny+3mxzWMrDRaHxCRfEWAAOAC43L/pLJ/FeCf
psxs+Q6hyLEFaJDtw0DbaeQ3K8p7AzgTCMkP0CSTaaALeBn4OXBUWfcz4Eal7zngeqUvCLwK1Hv6
HgG+r8x7DLgMQAjRFouWnqfrWvyof8ej0aWHN69cO59y6zM4qSDRUAXRUBxXK5BtHNZ2BluX/7v1
jV8kRzuvrE9feHPYinRA76+Ay6WRmcCkG2aAAWA38CDwluT5OWDZNGV2DFgDpGT7VmALsFSZ1yZl
9/RMladPc94SoAywJBOTa0uAxcCdwE7gLM8aA7hYWrT3ucDjPV7PiynzbpGW7qUSICKEiPh9AbOq
qjJ+LPLKdqe2fXOpOY9QroYy/2LSwzEOHRjBcheSCJ2Lnmwk6JZzRqIes3Zg45HSF1+KVliNQTNc
K4SokEZpKMY0H/gS8BrwZelB0SL8TPXEpPf5gN9Lw1taRLYtwG+Ah+dKeTlvugG65eOlOvkRk4pZ
BCws8q66KazXVtqlwG1KnyO9jqAZFqPlrQ+5FV2frauoprqiEj/V6PkaFtWvJhIJYxAhoCWoiCyl
qqyBM+cvoDJWSbgqtTDTtPspKxSICPeUnD8go0dBCXVPSH7EDGRrSrn9FNisjA0USR1bgDvmQnle
Og6skt54GTDoGVshPQtggyc/dMn8OOll66e51zeL5Ew04SNr9S3LlndcVx6Jk0iUsersNZRHGqmJ
riBsRlhUv5aQWUY2lyYaTrCkcT3za5oJh0IsbKwjUDmyKRnuPEdzT2QOAVwpvWM1sEfx+OtlGL9F
Pnd6eEKGx62e8Tskn1s9cwTwHSm7FuCPCms/BirnUnk2MCot5+/AL5Xxs+XfCzx9fwP+62mfP829
qoCbP9IrwGjos2Jxi2gkhG6Y9PWNkcmm2Le7i53PdtFUvpHqSCMhK046O4IVKCGfyxEKh/H7/ERD
EcKLRgxhON43j0sl7AW+p+y6EngBeFw+D0vwNUlZ4CHP+DPS+Lzh+LfAA8AQcAS4SYIWLyC7ei6V
pylA55AyPultaz19rwOt3upDgoSp6LASTiInFaeBlSeUyBMMWFRWllMSKWFoZBAocPjIAR65Zxtb
v343rTs7KPUnKCtJkC/kKLg5GhsWkqhOsHJlPTWLfWjRFDi6N097AYerhEEVSeuKXKKedkzmfK/X
PaG8Iw1sU/oumUvlCSUnbCwi+CYPHEZastfzamWInYpe8OTUeuCGyfIAV0MLZfGHBAGfn1y+QMFx
CIdjNNdvIFZSgRX0sfedd9l66w+5+7sPMXZUo66iiXikkobaZTQ01pGeEDiOQyiRw3UmMdgpfK1X
5NMzQzk1K4CrH9hXZN5Opb14tksFdU2NtNJrgK8qYOZV4AseVDoIvK9YriZz4q4p9ugEnvcAli3A
o8CEEGCYNhU1Jn6/ge24JKrOpHZeM5YVIWSVIRAEgxZCCF56/mV2vfY2513azLqrqznW007PYDsD
fYM4BQ3bsdFO6I5qGQrPB+5RvumVGcqptghWGC8yr1vKbdJQyuZSeTXAO1IZljL2tERrn/P07Zf5
oEOirAoPoLl3ij0smTdu8yDXS4Be4YJZAi1r44RzVVhmNYnKOoRwyTGBLXJo0m4mT48MQ6Oq4gwK
7hhDyS6SyQz5vI2ua2o6+IsHoKBEju0zlFNEaWenQKs5iaL1IqF71sOmLuO5qri/AnfJjz6nSFgY
B9719K9ScoR6krJXFsmT9A0gr+lQmDDo7swQjZuUloZw3AKucCiIHI4ogIBMOosmdK689nIefuYn
XHHbcobtI9iOgxACIcC2Xdyc72SM+FBpquL2yXovNUM55abpKKaisNxcep4rc4OQqHOv9Lg/yL4L
lVh/DbBJ/l7g6a+WRf3rRfaYrBXvB/4sf18IOJouyA9b9HYOkV+cw59P4vclCfhCCBzyhSzZTIH1
F61m861X0LSqklG7h9bON5nIjWLbBQqFPIWCTS7t4IxZaNoJh8hLHlIyUmwHfi35nCn1F0HOIQlS
vFSpONHwXCrvOHCFPPcbKsKYCmAWKEpDKRmKKc/wAJd3pJJjwCXoQmh5Uxs/rjGRGycejmM7o/iN
CLlCjmilybfvu4FNX1xOxhiic7wVoTlk7SSOY5NJp8mksmRyWZIDOmIihGa4k0DsKuAgMCJD/Ceh
96WiQp4cuEjyg4K8OQ16n1Xl2TKU2FOMb5zBuzZ4EOxUe90vj5eYDLNCCFL7q7IHD/VYw0ehaaEg
UBokmQmwYF0C0zTpzbSTdzKAQNcMLNMkNZ4iNZGkKhHEDY2RfrHUwTEMfK5XcO2zdDnQBfzHcyBh
AF9RlKfJkOylHXOpPE3G6WLKS3iKdGToudFTL1XK8Br0FL4RmcynomeBH8hTCSkGB/or3x1+K7D/
cMmBr/V0jdO0aIwlSwo4JCFvnYhEAgfHzhKLQmNDKbYboBAeond3+T+CY9XWhDa6TjsZtQKzeLMj
gKeU06QtwJsyFVjAj5SSKTkTYORjdukcBWX9s0gdc8Cj4AoJXHZ8TOJ/0FvgappGOpt0zc4Vd/lr
0zU9xtGLCvsdBgfHOOvsJkrjZbiuD9cRCGxckUW4aeLzBD2pQTr25jpyOzfclM9/8Kh2KuKcbdom
bxNWe1D0dnlgEZZh1EvFbmY+MdrUpvit0gVKu1gd93qRvPdx790ma78TyrOdgtnf3zdan7z4Kt/x
5t/1DA5z6Gg3u3btpa2tje7jHWTz3eTtXtL5XvrTx9jfs48Db2g73B0Xf36oK3M4m08FtZNFnvZ/
RqHTrc8C1xVRyMoiivuTPMRmtj3PPM0xkfdY7FKlr9iV8GvAt5TjoHs59ZJTvfBMyXPDB09Yna4H
Bob6tapE1Vid2HTd6PGGF0dK2m5vHxlY0/FBjxmJ+1mxrgwjoDExlhcT3dbe3MFlT/q6Fj1RKBSy
vQNd6Loe+ISlkyqXYgp8Txr1A/LwwlckNz4G3Dd5azJty5nmv0F4bwiyfHg56RRR3jrPx9myTlNv
w0PAuR5Gs1LJqzy5sFuiPrV8WOtZN2Hb9tsNDQ3Mnz8fYesIXD2rj7ZktOEV/nimJhgTupuxBrTx
+D5torRVF/6MYQr6+3tpb+/AMIyVyq3Fv/jo7flUZEg+LM/R2ptF+PXScplaEjIdHOTDi+5TyoPp
/hvE/wYAi7+aOD8tZ6cAAAAASUVORK5CYII=

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/locked.png

iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A
/wD/oL2nkwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9oGCBcfOie6Kn8AAAM4SURBVDjL
fdRNaF1FFMDx/5l75yZ5L2lqE4j9kFSqtqAIYhaS1khSKlj8woAgFbSLStFNEEFQ7MKPjWiWWjei
YF2IgkIsFjQI0o2E1FDBqpDYGGjry3fey73v3Zk5LozBF/PebGZxZn6cM2dmhCbj8/Pf8t2Fb06U
K9VTIcqIAmMnnj39zmNZD9nAHogFROr2SCPs3dHRg7FtuVIotBPFCSFWKktLlKb/IKqUX0hHXnvv
7UM9IFETUBVE+PTcJ3gftKqWy1OT06urq2d3dnaqjeL79vf2Dq+VruO93PPKG2d+AuD1GThzKwBx
Pf+Pv7S0+uHuW/bx48WJH/oP3z/w1PCjm0teevnV0wcO3Pb+4o3rk4DpG73KxIu9m3GzXbk379l7
spp7VpYXRv7FvvhyDICHHrj37PTs3Eqxo12+vjxThzUEbSyUSvNZtKM4CTDx868MP/4wAEePP8F6
ZX2lo3MnY+c+unPr3m1BAdI008EjhwHou+sgAOPj4wCUFha+QmBf102PNAf1440ZarWab8trdeGh
oaGN3gWXZhkikm8F65oy9MElut98i/VKCkars7NznHp+hKAB7zyK4p0neMfa6hpeNTTNcODarv29
C2sX+vqPMDR4tCtL2i+qTSacmqkQ26nMhUsa2+9NYk9eK83z59zsc8effKZxhi5p7fvtxtUHTVsH
XV2euLXQ7xBSMRiXkwdlaXkdV5nnl99nMOoODR47Fp//DLctGETKEgkqQsg9AQUEcZvrabFgC0Wc
bYW0wuJiyTUs2do4GKm/60HBWvu/xyWAGsFsOcY6MA5O8yjBUiaPPC0ocVAkN6goQsBQw0lMSwZO
i+xoKzcGTagK3uFDGxBRlTVCnFGzKygxgRiPRVA0UYw68mXTpCleiTQnEGEV0E7wbZBHGHKEgACR
OlIjiE2pufZmLyVRUQEDGkBQggFw235QJhdc0TYGu7ql6KKEiIxgAhYwARJaYOMMhZwgMUkVvBSo
NgMXlkMtDwYRoRYlIBUwKWpTclpwYgnEODGYkOGqhhDSxuDdvXf8tavbUC5luMo6uA4k7yDPCsSa
ExEQEeLgEZNx+94enh7enfzX+BvyuHHzRgq66AAAAABJRU5ErkJggg==

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/minus.gif

R0lGODlhFAAUANUAAAAAAP///ysrLWZmaI+PkYKChDs8PaytrXN2dEBEQE1OTURFRFpbWsvRyjM7
MV9rXHiFdIKTfNbtzuDy2ur25peali44Ks7qw/H57rjhpl9yV8bmuJ64k2NzXLHcnG6JYSw3J05h
Rb/jrjI6Lt7g3anZkFluTvLy8uXl5Z+fn////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAUABQAAAatQJVw
SCwaiY0UonJAHYsNhgFBVSRST+Fh2phMKJiDovBELSCXtETybRgOR4JiQ6df2JSK4riIiDIigRt3
EyQCDUYCHBkhIBaPIw5sAnBFih4fJpomGh0XE5RGBhElpSUeHhmDDYdGCAmmp6kiGxECRygCELGz
HgIETym6pagiHAK/JE8HyA8QEAkCBQoLDMpHJykDDAwFiMzV11lFWwnW464CZ+iuDCfsRu/wWUEA
Ow==

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/minus_disabled.gif

R0lGODlhFAAUANUAAAAAAP///7u7vLW1tqenqImJipGSkq2vrtnc2ZSWlL/Bv5qbmqOpouju542R
jLC2rqOtn9/q26WtorW9souQieTs4dDkx9Ply9fn0MjgvMziwsPQvaCrm9vo1Y2Ri+zw6qu4pJuk
loqPh+Pk4uzs7Obm5srKysPDw6GhoZaWlv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAUABQAAAatQJVw
SCwaiYjTQWEqHYsIlOFAXSROT6FpiqhUGh/TYvAspR6ddCTyRRhMR8ECQ6d32A3F4piaXCwXgRh3
FSMFCEYFGxYhIhSPHg5sBXBFihogHJocEBIdFZRGBhMZpRkaGhaDCIdGBwmmp6kXGBMFRyUFD7Gz
GgUCTye6pagXGwW/I08myAwPDwkFAwspKMpHJCcEKCgDiMzV11lFWwnW464FZ+iuKCTsRu/wWUEA
Ow==

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/plus.gif

R0lGODlhFAAUANUAAAAAAP///ysrLWZmaI+PkYKChDs8PaytrXN2dEBEQE1OTURFRFpbWsvRyiMr
ITM7MV9rXHiFdIKTfGt3Z9btzrvPtODy2ur25peali44Ks7qw/H57kVVPrjhpl9yV8bmuJ64k2Nz
XJSsipuvkn6jbLHcnKbOkoWldW6JYSw3J05hRb/jrjI6Lt7g3anZkFluTvLy8uXl5Z+fn////wAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADMALAAAAAAUABQAAAa1wJlw
SCwaiQ0ZAnOIHYsNhgFBVSRkT+Fh2rBYLpuDovCMLSKa9KTybRgOR4LiQ/8ARpQvRnFcSFYdKysA
Ihp5LQINRgIgHSopGQAOLA95AnBFjCUoLy8AHB4hGhaXRgYSLqkuACcdHxoNiUYICaqrrSsfEgJH
MQIRqiQmgSUCBE8yv6klJSsgAsYtTwfQEBERCQIFCgsM0kcwMgMMDAWK1N3fWUVbCd7rswJn8LMM
MPRG9/hZQQA7

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Images/plus_disabled.gif

R0lGODlhFAAUANUAAAAAAP///7q6u7S0taWlpoeHiI+QkJKUkr7AvuLj4qytrJ+gn5iZmIOHgouP
iuzw6+Pt4K61rNrp1ZSdkd7q2qKooKiuptnc2MDKvNHbzYmOh8/kxqm3o9bmz73JuKKrnsfgu8vh
wbHEqMbavLXFrdPlysLPvJmjlKSsoLS8sIuPienv5p+pmYiNhe3t7ebm5snJycLCwpSUlHFxcf//
/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADQALAAAAAAUABQAAAa1QJpw
SCwaiZeYAgF7HYuXhUFBZRxiTyFseoFAVg8YY/B8ySKStCXzvRhgRwGjQ+/MMJQvgnGUpUobJSUz
HhJ5CQUXRgUmGyctGjMNKg55BXBFjCEcLCwzEx8oEhCXRgYpIKkgMyQbHRIXiUYKB6qrrSUdKQVH
LwURqiIjgSEFAk8xv6khISUmBcYJTzDQFRERBwUDDDIL0kcuMQQLCwOK1N3fWUVbB97rswVn8LML
LvRG9/hZQQA7

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: text/css;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Viewer.css

* {
	FONT-FAMILY: Verdana
}
A {
	COLOR: #004400
}
.linkStyle {
	COLOR: #004400
}
.linkStyle {
	TEXT-DECORATION: underline
}
.error {
	COLOR: red
}
.ellipsis {
	TEXT-OVERFLOW: ellipsis; WHITE-SPACE: nowrap; OVERFLOW: hidden
}
BODY {
	MARGIN: 0px; BACKGROUND: =
url(../../styles/ocupop/images/viewer_body_bg.gif) #ececec repeat-x 0px =
35px
}
FORM {
	MARGIN: 0px
}
#header {
	POSITION: relative; MIN-WIDTH: 800px; BORDER-LEFT: #b1b1b1 1px solid; =
PADDING-RIGHT: 128px; WHITE-SPACE: nowrap; MARGIN-BOTTOM: 10px; =
BACKGROUND: url(../../styles/ocupop/images/viewer_header_bg.gif) =
repeat-x 0px 1px; HEIGHT: 35px; BORDER-RIGHT: #b1b1b1 1px solid
}
#courseTitle {
	PADDING-LEFT: 4px; HEIGHT: 19px; MARGIN-LEFT: 5px; FONT-SIZE: 0.9em; =
PADDING-TOP: 8px
}
#courseTag {
	MAX-WIDTH: 25%; FLOAT: left; FONT-WEIGHT: bold
}
#nameDivider {
	FLOAT: left; MARGIN-RIGHT: 5px
}
#loginStatusDiv {
	MARGIN-LEFT: 30px; FONT-SIZE: 0.8em; MARGIN-RIGHT: 15px
}
#logoutLink {
	POSITION: relative; FLOAT: right; TOP: 9px; MARGIN-RIGHT: 15px
}
#userDiv {
	POSITION: relative; MAX-WIDTH: 200px; FLOAT: right; MARGIN-LEFT: 30px; =
TOP: 9px; MARGIN-RIGHT: 5px
}
#siteLogoImg {
	BORDER-RIGHT-WIDTH: 0px; MAX-WIDTH: 120px; FLOAT: right; =
BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MAX-HEIGHT: 34px; =
BORDER-LEFT-WIDTH: 0px; TOP: 0px
}
#logoDivider {
	POSITION: absolute; WIDTH: 1px; HEIGHT: 34px; TOP: 0px; RIGHT: 129px
}
#panoptoLink {
	POSITION: absolute; TOP: 6px; RIGHT: 7px
}
#panoptoLogo {
	BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: =
0px; BORDER-LEFT-WIDTH: 0px
}
#message {
	BORDER-BOTTOM: #b1b1b1 1px solid; BORDER-LEFT: #b1b1b1 1px solid; =
PADDING-BOTTOM: 10px; BACKGROUND-COLOR: white; MARGIN: 50px auto; =
PADDING-LEFT: 10px; PADDING-RIGHT: 10px; DISPLAY: none; MAX-WIDTH: =
450px; FONT-SIZE: 0.9em; BORDER-TOP: #b1b1b1 1px solid; BORDER-RIGHT: =
#b1b1b1 1px solid; PADDING-TOP: 10px; border-radius: 5px; =
-moz-border-radius: 5px; -webkit-border-radius: 5px
}
#viewer {
	MIN-WIDTH: 930px; MARGIN: 0px auto; WIDTH: 100%
}
#viewers {
	POSITION: relative
}
#leftPane {
	POSITION: relative; WIDTH: 37%; OVERFLOW: hidden; TOP: 0px; LEFT: 0px
}
#rightPane {
	POSITION: absolute; WIDTH: 63%; OVERFLOW: hidden; TOP: 0px; LEFT: 37%
}
.wmpVideoPlayerContent {
	OVERFLOW: hidden
}
#videoPlayerDiv {
	MARGIN: 0px 10px
}
#eventViewerDiv {
	POSITION: relative; PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; =
PADDING-RIGHT: 10px; TOP: 0px; RIGHT: 0px; PADDING-TOP: 10px
}
.eventTabViewerPane {
	BORDER-BOTTOM: #b1b1b1 1px solid; BORDER-LEFT: #b1b1b1 1px solid; =
BACKGROUND-COLOR: white; MARGIN-TOP: 3px; BORDER-TOP: #b1b1b1 1px solid; =
BORDER-RIGHT: #b1b1b1 1px solid; _margin-top: -1px
}
#infoContents {
	POSITION: relative; OVERFLOW-X: hidden; OVERFLOW-Y: scroll
}
.tocContents {
	POSITION: relative; OVERFLOW-X: hidden; OVERFLOW-Y: scroll
}
#notesDivDisplay {
	POSITION: relative; OVERFLOW-X: hidden; OVERFLOW-Y: scroll
}
#searchResults {
	POSITION: relative; OVERFLOW-X: hidden; OVERFLOW-Y: scroll
}
#questionsAsked {
	POSITION: relative; OVERFLOW-X: hidden; OVERFLOW-Y: scroll
}
#tocSearchChrome {
	BACKGROUND: url(../../styles/ocupop/images/viewer_subheader_bg.gif) =
white repeat-x 0px 10px
}
#transSearchChrome {
	BACKGROUND: url(../../styles/ocupop/images/viewer_subheader_bg.gif) =
white repeat-x 0px 10px
}
#infoContents {
	POSITION: relative; FONT-SIZE: 0.9em
}
TABLE.info {
	MARGIN-TOP: 5px; BORDER-COLLAPSE: collapse; MARGIN-LEFT: 5px
}
TABLE.info .label {
	TEXT-ALIGN: right; PADDING-RIGHT: 5px; VERTICAL-ALIGN: top; =
FONT-WEIGHT: bold
}
.contentText {
	MARGIN-TOP: 5px; MARGIN-BOTTOM: 10px; MARGIN-LEFT: 5px; FONT-SIZE: =
0.9em
}
#infoContents HR {
	HEIGHT: 1px; COLOR: #ccc
}
.linkDecoration {
	MARGIN-LEFT: 5px; FONT-SIZE: 0.8em
}
.eventVisualGroup {
	PADDING-BOTTOM: 2px; PADDING-LEFT: 4px; PADDING-RIGHT: 2px; =
FONT-FAMILY: Arial; WORD-WRAP: break-word; FONT-SIZE: 0.8em; CURSOR: =
pointer; PADDING-TOP: 2px
}
.eventVisualGroupHover {
	PADDING-BOTTOM: 2px; PADDING-LEFT: 4px; PADDING-RIGHT: 2px; =
FONT-FAMILY: Arial; WORD-WRAP: break-word; FONT-SIZE: 0.8em; CURSOR: =
pointer; PADDING-TOP: 2px
}
.eventVisualGroupSelected {
	PADDING-BOTTOM: 2px; PADDING-LEFT: 4px; PADDING-RIGHT: 2px; =
FONT-FAMILY: Arial; WORD-WRAP: break-word; FONT-SIZE: 0.8em; CURSOR: =
pointer; PADDING-TOP: 2px
}
.eventVisualContainer {
	WIDTH: 100%; DISPLAY: block
}
.eventVisualGroupTime {
	DISPLAY: inline
}
.eventVisual {
	WIDTH: 100%
}
.eventVisualSelected {
	WIDTH: 100%
}
.eventVisualHover {
	WIDTH: 100%
}
.eventVisualEditing {
	WIDTH: 100%
}
.eventInfoDiv {
	DISPLAY: inline; MARGIN-LEFT: 10px
}
.eventVisualElement {
	DISPLAY: inline; MARGIN-RIGHT: 4px
}
.eventVisualUser {
	DISPLAY: inline; MARGIN-RIGHT: 4px
}
.eventVisualType {
	DISPLAY: inline; MARGIN-RIGHT: 4px
}
.eventVisualElement {
	MARGIN-LEFT: 4px
}
.eventVisualUser {
	FONT-SIZE: 0.9em
}
.eventVisualType {
	FONT-SIZE: 0.9em
}
.eventVisualGroupTime {
	WHITE-SPACE: nowrap; FONT-WEIGHT: bold
}
.eventVisualEditing {
	BORDER-BOTTOM: #b1b1b1 1px dashed; BORDER-LEFT: #b1b1b1 1px dashed; =
PADDING-BOTTOM: 3px; BACKGROUND-COLOR: #88ee88; PADDING-LEFT: 3px; =
PADDING-RIGHT: 3px; BORDER-TOP: #b1b1b1 1px dashed; BORDER-RIGHT: =
#b1b1b1 1px dashed; PADDING-TOP: 3px
}
.eventVisualGroupSelected {
	BACKGROUND-COLOR: #8ef277
}
.eventVisualSelected {
	BACKGROUND-COLOR: #8ef277
}
.eventVisualGroupHover {
	BACKGROUND-COLOR: #bbffbb
}
.eventVisualHover {
	BACKGROUND-COLOR: #bbffbb
}
.match {
	FONT-WEIGHT: bold
}
#notesDivDisplay {
	BORDER-BOTTOM: #ccc 1px solid
}
#notesHeaderDiv {
	BACKGROUND: url(../../styles/ocupop/images/viewer_header_bg.gif) white =
repeat-x 0px 21px
}
#notesHelpLink {
	POSITION: absolute; MARGIN-TOP: 7px; FONT-SIZE: 0.8em; TOP: 30px; =
RIGHT: 10px; MARGIN-RIGHT: 8px
}
#notesUserDiv {
	POSITION: relative; PADDING-BOTTOM: 3px; PADDING-LEFT: 10px; DISPLAY: =
inline; FONT-SIZE: 0.8em; OVERFLOW: hidden
}
#channelDiv {
	POSITION: relative; PADDING-BOTTOM: 3px; PADDING-LEFT: 10px; DISPLAY: =
inline; FONT-SIZE: 0.8em; OVERFLOW: hidden
}
#notesUserDiv {
	DISPLAY: inline
}
#notesUserLabelDiv {
	DISPLAY: inline
}
#notesUserSelect {
	DISPLAY: inline
}
publicNotesToggleLabel {
	DISPLAY: inline
}
#notesUserSelect {
	WIDTH: 195px
}
#publicNotesToggleDiv {
	DISPLAY: inline; WHITE-SPACE: nowrap
}
.public#publicNotesToggleLabel {
	FONT-WEIGHT: bold
}
#channelDiv {
	DISPLAY: inline-block
}
#channelLabelDiv {
	DISPLAY: inline-block
}
#channelInput {
	DISPLAY: inline-block
}
#channelInput {
	WIDTH: 150px
}
#channelName {
	DISPLAY: none; FONT-WEIGHT: bold
}
#changeChannelButton {
	FONT-SIZE: 0.8em
}
.noteActionPanel {
	Z-INDEX: 1; BORDER-BOTTOM: #66cc66 1px solid; POSITION: absolute; =
BORDER-LEFT: #66cc66 1px solid; BACKGROUND-COLOR: #eeffee; WIDTH: 80px; =
HEIGHT: 18px; VISIBILITY: hidden; BORDER-TOP: #66cc66 1px solid; TOP: =
-2px; RIGHT: -2px; BORDER-RIGHT: #66cc66 1px solid
}
.editLink {
	POSITION: absolute; TOP: 0px; LEFT: 3px
}
.cancelEditLink {
	POSITION: absolute; TOP: 0px; LEFT: 3px
}
.cancelEditLink {
	DISPLAY: none
}
.deleteLink {
	POSITION: absolute; TOP: 0px; RIGHT: 3px
}
#publicNotesToggle {
	POSITION: absolute; MARGIN-LEFT: 10px
}
#notesInstructionsArea {
	TEXT-ALIGN: center; MARGIN: 0px 5px 5px; FONT-SIZE: 0.7em
}
#cancelEditLinkSpan {
	DISPLAY: none; FONT-WEIGHT: bold
}
#inputTextArea {
	BORDER-BOTTOM: #b1b1b1 1px solid; BORDER-LEFT: #b1b1b1 1px solid; =
MARGIN: 0px auto; WIDTH: 95%; DISPLAY: block; FONT-SIZE: 0.8em; =
BORDER-TOP: #b1b1b1 1px solid; BORDER-RIGHT: #b1b1b1 1px solid
}
.editing#inputTextArea {
	BORDER-BOTTOM: #b1b1b1 1px dashed; BORDER-LEFT: #b1b1b1 1px dashed; =
BACKGROUND-COLOR: #bbffbb; BORDER-TOP: #b1b1b1 1px dashed; BORDER-RIGHT: =
#b1b1b1 1px dashed
}
#notesInputDiv {
	PADDING-BOTTOM: 10px; BACKGROUND-COLOR: #ececec; PADDING-LEFT: 0px; =
PADDING-RIGHT: 0px; BORDER-TOP: darkgray 1px solid; PADDING-TOP: 5px
}
.searchQuery {
	MARGIN: 5px; WIDTH: 190px; DISPLAY: inline
}
.searchSubmitButton {
	DISPLAY: inline; FONT-SIZE: 0.8em; VERTICAL-ALIGN: text-bottom
}
#searchOptionControls {
	MARGIN-LEFT: 10px
}
#searchDiv {
	BACKGROUND: url(../../styles/ocupop/images/viewer_header_bg.gif) white =
repeat-x 0px 23px; FONT-SIZE: 0.8em
}
#searchContext {
	PADDING-BOTTOM: 2px; MARGIN-TOP: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: =
2px; DISPLAY: none; WHITE-SPACE: nowrap; PADDING-TOP: 2px
}
#searchResults {
	FONT-SIZE: 1.3em
}
#searchButton {
	FONT-SIZE: 1em
}
#tabViewer {
	PADDING-RIGHT: 10px; OVERFLOW: hidden
}
.thumbImage {
	BORDER-BOTTOM: white 4px solid; BORDER-LEFT: white 4px solid; =
PADDING-BOTTOM: 1px; MARGIN: 3px 0px 0px; PADDING-LEFT: 1px; WIDTH: =
240px; PADDING-RIGHT: 1px; BACKGROUND: darkgray; HEIGHT: 180px; =
BORDER-TOP: white 4px solid; CURSOR: pointer; BORDER-RIGHT: white 4px =
solid; PADDING-TOP: 1px
}
.thumbImageSelected {
	BORDER-BOTTOM: white 4px solid; BORDER-LEFT: white 4px solid; =
PADDING-BOTTOM: 1px; MARGIN: 3px 0px 0px; PADDING-LEFT: 1px; WIDTH: =
240px; PADDING-RIGHT: 1px; BACKGROUND: darkgray; HEIGHT: 180px; =
BORDER-TOP: white 4px solid; CURSOR: pointer; BORDER-RIGHT: white 4px =
solid; PADDING-TOP: 1px
}
.thumbImageHover {
	BORDER-BOTTOM: white 4px solid; BORDER-LEFT: white 4px solid; =
PADDING-BOTTOM: 1px; MARGIN: 3px 0px 0px; PADDING-LEFT: 1px; WIDTH: =
240px; PADDING-RIGHT: 1px; BACKGROUND: darkgray; HEIGHT: 180px; =
BORDER-TOP: white 4px solid; CURSOR: pointer; BORDER-RIGHT: white 4px =
solid; PADDING-TOP: 1px
}
.thumbImageSelected {
	BORDER-BOTTOM: #8ef277 4px solid; BORDER-LEFT: #8ef277 4px solid; =
BORDER-TOP: #8ef277 4px solid; BORDER-RIGHT: #8ef277 4px solid
}
.thumbImageHover {
	BORDER-BOTTOM: #bbffbb 4px solid; BORDER-LEFT: #bbffbb 4px solid; =
BORDER-TOP: #bbffbb 4px solid; BORDER-RIGHT: #bbffbb 4px solid
}
#thumbnails {
	BORDER-BOTTOM: #b1b1b1 1px solid; BORDER-LEFT: #b1b1b1 1px solid; =
OVERFLOW-X: scroll; BACKGROUND-COLOR: white; HEIGHT: 216px; OVERFLOW: =
hidden; MARGIN-RIGHT: 10px; BORDER-RIGHT: #b1b1b1 1px solid
}
.tabBar {
	HEIGHT: 20px; OVERFLOW: visible
}
#tabViewerBar {
	FLOAT: left
}
.tabDiv {
	TEXT-ALIGN: center; BORDER-LEFT: #b1b1b1 1px solid; PADDING-BOTTOM: =
4px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; BACKGROUND: =
url(../../styles/ocupop/images/tabs_viewer_bg.gif) repeat-x 0px 0px; =
FLOAT: left; FONT-SIZE: 0.8em; BORDER-TOP: #b1b1b1 1px solid; CURSOR: =
pointer; MARGIN-RIGHT: 1px; BORDER-RIGHT: #b1b1b1 1px solid; =
PADDING-TOP: 3px; border-top-left-radius: 5px; =
-moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; =
border-top-right-radius: 5px; -moz-border-radius-topright: 5px; =
-webkit-border-top-right-radius: 5px; text-shadow: 0 1px 1px #FFFFFF; =
-moz-user-select: none; -khtml-user-select: none; user-select: none
}
.tabDivSelected {
	TEXT-ALIGN: center; BORDER-LEFT: #b1b1b1 1px solid; PADDING-BOTTOM: =
4px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; BACKGROUND: =
url(../../styles/ocupop/images/tabs_viewer_bg.gif) repeat-x 0px 0px; =
FLOAT: left; FONT-SIZE: 0.8em; BORDER-TOP: #b1b1b1 1px solid; CURSOR: =
pointer; MARGIN-RIGHT: 1px; BORDER-RIGHT: #b1b1b1 1px solid; =
PADDING-TOP: 3px; border-top-left-radius: 5px; =
-moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; =
border-top-right-radius: 5px; -moz-border-radius-topright: 5px; =
-webkit-border-top-right-radius: 5px; text-shadow: 0 1px 1px #FFFFFF; =
-moz-user-select: none; -khtml-user-select: none; user-select: none
}
.tabDivDisabled {
	TEXT-ALIGN: center; BORDER-LEFT: #b1b1b1 1px solid; PADDING-BOTTOM: =
4px; PADDING-LEFT: 12px; PADDING-RIGHT: 12px; BACKGROUND: =
url(../../styles/ocupop/images/tabs_viewer_bg.gif) repeat-x 0px 0px; =
FLOAT: left; FONT-SIZE: 0.8em; BORDER-TOP: #b1b1b1 1px solid; CURSOR: =
pointer; MARGIN-RIGHT: 1px; BORDER-RIGHT: #b1b1b1 1px solid; =
PADDING-TOP: 3px; border-top-left-radius: 5px; =
-moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; =
border-top-right-radius: 5px; -moz-border-radius-topright: 5px; =
-webkit-border-top-right-radius: 5px; text-shadow: 0 1px 1px #FFFFFF; =
-moz-user-select: none; -khtml-user-select: none; user-select: none
}
.tabDivSelected {
	BACKGROUND: #ffffff 0px 0px; CURSOR: default
}
.tabDivDisabled {
	COLOR: gray; CURSOR: default
}
#objectToggle {
	POSITION: absolute; TEXT-ALIGN: center; WIDTH: 50px; HEIGHT: 16px; TOP: =
0px; CURSOR: default; RIGHT: 10px; MARGIN-RIGHT: 0px
}
#objectZoomInButton {
	CURSOR: pointer
}
#objectZoomOutButton {
	CURSOR: pointer
}
#objectZoomInButton {
	POSITION: absolute; TOP: 2px; RIGHT: 12px
}
#objectZoomInDisabledButton {
	POSITION: absolute; TOP: 2px; RIGHT: 12px
}
#objectZoomOutButton {
	POSITION: absolute; TOP: 2px; LEFT: 14px
}
#objectZoomOutDisabledButton {
	POSITION: absolute; TOP: 2px; LEFT: 14px
}
#objectZoomOutButton {
	DISPLAY: none
}
#objectZoomInDisabledButton {
	DISPLAY: none
}
#tabContent {
	BORDER-LEFT: #b1b1b1 1px solid; MARGIN-TOP: 3px !important; BACKGROUND: =
white; CLEAR: both; OVERFLOW: hidden; BORDER-TOP: #b1b1b1 1px solid; =
BORDER-RIGHT: #b1b1b1 1px solid; _margin-top: -1px
}
.contentArea {
	PADDING-BOTTOM: 10px; MARGIN: 0px auto; PADDING-LEFT: 10px; =
PADDING-RIGHT: 10px; OVERFLOW: hidden; PADDING-TOP: 10px
}
.imageViewerImage {
	BORDER-BOTTOM: darkgray 1px solid; BORDER-LEFT: darkgray 1px solid; =
-MS-INTERPOLATION-MODE: bicubic; BORDER-TOP: darkgray 1px solid; =
BORDER-RIGHT: darkgray 1px solid
}
#adobeReaderDownloadDiv {
	MARGIN: 33px; CURSOR: pointer
}
#adobeReaderDownloadTextDiv {
	MARGIN: 33px
}
#questions {
	MARGIN-TOP: 10px; DISPLAY: none
}
#questionsPane {
	BORDER-BOTTOM: #b1b1b1 1px solid; BORDER-LEFT: #b1b1b1 1px solid; =
MARGIN-TOP: 3px; BACKGROUND: white; BORDER-TOP: #b1b1b1 1px solid; =
BORDER-RIGHT: #b1b1b1 1px solid
}
#questionHeader {
	POSITION: absolute; MARGIN-LEFT: 5px; FONT-SIZE: 0.8em; TOP: 7px; LEFT: =
0px
}
#questionEntryBar {
	POSITION: relative; PADDING-LEFT: 110px; PADDING-RIGHT: 10px; HEIGHT: =
30px; BORDER-TOP: #ccc 1px solid
}
#questionTextEntry {
	MARGIN-TOP: 3px; WIDTH: 100%
}
#questionTextEntryInstructions {
	Z-INDEX: 1; POSITION: absolute; FONT-STYLE: italic; COLOR: gray; =
FONT-SIZE: 0.8em; TOP: 7px; LEFT: 115px
}

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/MicrosoftAjax.js

=EF=BB=BF//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js
Function.__typeName=3D"Function";Function.__class=3Dtrue;Function.createC=
allback=3Dfunction(b,a){return function(){var =
e=3Darguments.length;if(e>0){var d=3D[];for(var =
c=3D0;c<e;c++)d[c]=3Darguments[c];d[e]=3Da;return b.apply(this,d)}return =
b.call(this,a)}};Function.createDelegate=3Dfunction(a,b){return =
function(){return =
b.apply(a,arguments)}};Function.emptyFunction=3DFunction.emptyMethod=3Dfu=
nction(){};Function._validateParams=3Dfunction(e,c){var =
a;a=3DFunction._validateParameterCount(e,c);if(a){a.popStackFrame();retur=
n a}for(var b=3D0;b<e.length;b++){var =
d=3Dc[Math.min(b,c.length-1)],f=3Dd.name;if(d.parameterArray)f+=3D"["+(b-=
c.length+1)+"]";a=3DFunction._validateParameter(e[b],d,f);if(a){a.popStac=
kFrame();return a}}return =
null};Function._validateParameterCount=3Dfunction(e,a){var =
c=3Da.length,d=3D0;for(var =
b=3D0;b<a.length;b++)if(a[b].parameterArray)c=3DNumber.MAX_VALUE;else =
if(!a[b].optional)d++;if(e.length<d||e.length>c){var =
f=3DError.parameterCount();f.popStackFrame();return f}return =
null};Function._validateParameter=3Dfunction(c,a,h){var =
b,g=3Da.type,l=3D!!a.integer,k=3D!!a.domElement,m=3D!!a.mayBeNull;b=3DFun=
ction._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return =
b}var =
e=3Da.elementType,f=3D!!a.elementMayBeNull;if(g=3D=3D=3DArray&&typeof =
c!=3D=3D"undefined"&&c!=3D=3Dnull&&(e||!f)){var =
j=3D!!a.elementInteger,i=3D!!a.elementDomElement;for(var =
d=3D0;d<c.length;d++){var =
n=3Dc[d];b=3DFunction._validateParameterType(n,e,j,i,f,h+"["+d+"]");if(b)=
{b.popStackFrame();return b}}}return =
null};Function._validateParameterType=3Dfunction(b,c,k,j,h,d){var =
a;if(typeof b=3D=3D=3D"undefined")if(h)return =
null;else{a=3DError.argumentUndefined(d);a.popStackFrame();return =
a}if(b=3D=3D=3Dnull)if(h)return =
null;else{a=3DError.argumentNull(d);a.popStackFrame();return =
a}if(c&&c.__enum){if(typeof =
b!=3D=3D"number"){a=3DError.argumentType(d,Object.getType(b),c);a.popStac=
kFrame();return a}if(b%1=3D=3D=3D0){var =
e=3Dc.prototype;if(!c.__flags||b=3D=3D=3D0){for(var g in =
e)if(e[g]=3D=3D=3Db)return null}else{var i=3Db;for(var g in e){var =
f=3De[g];if(f=3D=3D=3D0)continue;if((f&b)=3D=3D=3Df)i-=3Df;if(i=3D=3D=3D0=
)return =
null}}}a=3DError.argumentOutOfRange(d,b,String.format(Sys.Res.enumInvalid=
Value,b,c.getName()));a.popStackFrame();return =
a}if(j&&b!=3D=3Dwindow&&b!=3D=3Ddocument&&!(window.HTMLElement&&b =
instanceof HTMLElement)&&typeof =
b.nodeName!=3D=3D"string"){a=3DError.argument(d,Sys.Res.argumentDomElemen=
t);a.popStackFrame();return =
a}if(c&&!c.isInstanceOfType(b)){a=3DError.argumentType(d,Object.getType(b=
),c);a.popStackFrame();return =
a}if(c=3D=3D=3DNumber&&k)if(b%1!=3D=3D0){a=3DError.argumentOutOfRange(d,b=
,Sys.Res.argumentInteger);a.popStackFrame();return a}return =
null};Error.__typeName=3D"Error";Error.__class=3Dtrue;Error.create=3Dfunc=
tion(d,b){var a=3Dnew Error(d);a.message=3Dd;if(b)for(var c in =
b)a[c]=3Db[c];a.popStackFrame();return =
a};Error.argument=3Dfunction(a,c){var b=3D"Sys.ArgumentException: =
"+(c?c:Sys.Res.argument);if(a)b+=3D"\n"+String.format(Sys.Res.paramName,a=
);var =
d=3DError.create(b,{name:"Sys.ArgumentException",paramName:a});d.popStack=
Frame();return d};Error.argumentNull=3Dfunction(a,c){var =
b=3D"Sys.ArgumentNullException: =
"+(c?c:Sys.Res.argumentNull);if(a)b+=3D"\n"+String.format(Sys.Res.paramNa=
me,a);var =
d=3DError.create(b,{name:"Sys.ArgumentNullException",paramName:a});d.popS=
tackFrame();return d};Error.argumentOutOfRange=3Dfunction(c,a,d){var =
b=3D"Sys.ArgumentOutOfRangeException: =
"+(d?d:Sys.Res.argumentOutOfRange);if(c)b+=3D"\n"+String.format(Sys.Res.p=
aramName,c);if(typeof =
a!=3D=3D"undefined"&&a!=3D=3Dnull)b+=3D"\n"+String.format(Sys.Res.actualV=
alue,a);var =
e=3DError.create(b,{name:"Sys.ArgumentOutOfRangeException",paramName:c,ac=
tualValue:a});e.popStackFrame();return =
e};Error.argumentType=3Dfunction(d,c,b,e){var =
a=3D"Sys.ArgumentTypeException: ";if(e)a+=3De;else =
if(c&&b)a+=3DString.format(Sys.Res.argumentTypeWithTypes,c.getName(),b.ge=
tName());else =
a+=3DSys.Res.argumentType;if(d)a+=3D"\n"+String.format(Sys.Res.paramName,=
d);var =
f=3DError.create(a,{name:"Sys.ArgumentTypeException",paramName:d,actualTy=
pe:c,expectedType:b});f.popStackFrame();return =
f};Error.argumentUndefined=3Dfunction(a,c){var =
b=3D"Sys.ArgumentUndefinedException: =
"+(c?c:Sys.Res.argumentUndefined);if(a)b+=3D"\n"+String.format(Sys.Res.pa=
ramName,a);var =
d=3DError.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});d=
.popStackFrame();return d};Error.format=3Dfunction(a){var =
c=3D"Sys.FormatException: =
"+(a?a:Sys.Res.format),b=3DError.create(c,{name:"Sys.FormatException"});b=
.popStackFrame();return b};Error.invalidOperation=3Dfunction(a){var =
c=3D"Sys.InvalidOperationException: =
"+(a?a:Sys.Res.invalidOperation),b=3DError.create(c,{name:"Sys.InvalidOpe=
rationException"});b.popStackFrame();return =
b};Error.notImplemented=3Dfunction(a){var =
c=3D"Sys.NotImplementedException: =
"+(a?a:Sys.Res.notImplemented),b=3DError.create(c,{name:"Sys.NotImplement=
edException"});b.popStackFrame();return =
b};Error.parameterCount=3Dfunction(a){var =
c=3D"Sys.ParameterCountException: =
"+(a?a:Sys.Res.parameterCount),b=3DError.create(c,{name:"Sys.ParameterCou=
ntException"});b.popStackFrame();return =
b};Error.prototype.popStackFrame=3Dfunction(){if(typeof =
this.stack=3D=3D=3D"undefined"||this.stack=3D=3D=3Dnull||typeof =
this.fileName=3D=3D=3D"undefined"||this.fileName=3D=3D=3Dnull||typeof =
this.lineNumber=3D=3D=3D"undefined"||this.lineNumber=3D=3D=3Dnull)return;=
var =
a=3Dthis.stack.split("\n"),c=3Da[0],e=3Dthis.fileName+":"+this.lineNumber=
;while(typeof =
c!=3D=3D"undefined"&&c!=3D=3Dnull&&c.indexOf(e)=3D=3D=3D-1){a.shift();c=3D=
a[0]}var d=3Da[1];if(typeof =
d=3D=3D=3D"undefined"||d=3D=3D=3Dnull)return;var =
b=3Dd.match(/@(.*):(\d+)$/);if(typeof =
b=3D=3D=3D"undefined"||b=3D=3D=3Dnull)return;this.fileName=3Db[1];this.li=
neNumber=3DparseInt(b[2]);a.shift();this.stack=3Da.join("\n")};if(!window=
)this.window=3Dthis;window.Type=3DFunction;window.__rootNamespaces=3D[];w=
indow.__registeredTypes=3D{};Type.prototype.callBaseMethod=3Dfunction(a,d=
,b){var c=3Dthis.getBaseMethod(a,d);if(!b)return c.apply(a);else return =
c.apply(a,b)};Type.prototype.getBaseMethod=3Dfunction(d,c){var =
b=3Dthis.getBaseType();if(b){var a=3Db.prototype[c];return a instanceof =
Function?a:null}return =
null};Type.prototype.getBaseType=3Dfunction(){return typeof =
this.__baseType=3D=3D=3D"undefined"?null:this.__baseType};Type.prototype.=
getInterfaces=3Dfunction(){var a=3D[],b=3Dthis;while(b){var =
c=3Db.__interfaces;if(c)for(var d=3D0,f=3Dc.length;d<f;d++){var =
e=3Dc[d];if(!Array.contains(a,e))a[a.length]=3De}b=3Db.__baseType}return =
a};Type.prototype.getName=3Dfunction(){return typeof =
this.__typeName=3D=3D=3D"undefined"?"":this.__typeName};Type.prototype.im=
plementsInterface=3Dfunction(d){this.resolveInheritance();var =
c=3Dd.getName(),a=3Dthis.__interfaceCache;if(a){var e=3Da[c];if(typeof =
e!=3D=3D"undefined")return e}else a=3Dthis.__interfaceCache=3D{};var =
b=3Dthis;while(b){var =
f=3Db.__interfaces;if(f)if(Array.indexOf(f,d)!=3D=3D-1)return =
a[c]=3Dtrue;b=3Db.__baseType}return =
a[c]=3Dfalse};Type.prototype.inheritsFrom=3Dfunction(b){this.resolveInher=
itance();var a=3Dthis.__baseType;while(a){if(a=3D=3D=3Db)return =
true;a=3Da.__baseType}return =
false};Type.prototype.initializeBase=3Dfunction(a,b){this.resolveInherita=
nce();if(this.__baseType)if(!b)this.__baseType.apply(a);else =
this.__baseType.apply(a,b);return =
a};Type.prototype.isImplementedBy=3Dfunction(a){if(typeof =
a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;var =
b=3DObject.getType(a);return =
!!(b.implementsInterface&&b.implementsInterface(this))};Type.prototype.is=
InstanceOfType=3Dfunction(b){if(typeof =
b=3D=3D=3D"undefined"||b=3D=3D=3Dnull)return false;if(b instanceof =
this)return true;var a=3DObject.getType(b);return =
!!(a=3D=3D=3Dthis)||a.inheritsFrom&&a.inheritsFrom(this)||a.implementsInt=
erface&&a.implementsInterface(this)};Type.prototype.registerClass=3Dfunct=
ion(c,b,d){this.prototype.constructor=3Dthis;this.__typeName=3Dc;this.__c=
lass=3Dtrue;if(b){this.__baseType=3Db;this.__basePrototypePending=3Dtrue}=
if(!window.__classes)window.__classes=3D{};window.__classes[c.toUpperCase=
()]=3Dthis;if(d){this.__interfaces=3D[];for(var =
a=3D2;a<arguments.length;a++){var =
e=3Darguments[a];this.__interfaces.push(e)}}return =
this};Type.prototype.registerInterface=3Dfunction(a){this.prototype.const=
ructor=3Dthis;this.__typeName=3Da;this.__interface=3Dtrue;return =
this};Type.prototype.resolveInheritance=3Dfunction(){if(this.__baseProtot=
ypePending){var b=3Dthis.__baseType;b.resolveInheritance();for(var a in =
b.prototype){var =
c=3Db.prototype[a];if(!this.prototype[a])this.prototype[a]=3Dc}delete =
this.__basePrototypePending}};Type.getRootNamespaces=3Dfunction(){return =
Array.clone(window.__rootNamespaces)};Type.isClass=3Dfunction(a){if(typeo=
f a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;return =
!!a.__class};Type.isInterface=3Dfunction(a){if(typeof =
a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;return =
!!a.__interface};Type.isNamespace=3Dfunction(a){if(typeof =
a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;return =
!!a.__namespace};Type.parse=3Dfunction(typeName,ns){var =
fn;if(ns){if(!window.__classes)return =
null;fn=3Dwindow.__classes[ns.getName().toUpperCase()+"."+typeName.toUppe=
rCase()];return fn||null}if(!typeName)return =
null;if(!Type.__htClasses)Type.__htClasses=3D{};fn=3DType.__htClasses[typ=
eName];if(!fn){fn=3Deval(typeName);Type.__htClasses[typeName]=3Dfn}return=
 fn};Type.registerNamespace=3Dfunction(f){var =
d=3Dwindow,c=3Df.split(".");for(var b=3D0;b<c.length;b++){var =
e=3Dc[b],a=3Dd[e];if(!a){a=3Dd[e]=3D{};if(b=3D=3D=3D0)window.__rootNamesp=
aces[window.__rootNamespaces.length]=3Da;a.__namespace=3Dtrue;a.__typeNam=
e=3Dc.slice(0,b+1).join(".");a.getName=3Dfunction(){return =
this.__typeName}}d=3Da}};Object.__typeName=3D"Object";Object.__class=3Dtr=
ue;Object.getType=3Dfunction(b){var a=3Db.constructor;if(!a||typeof =
a!=3D=3D"function"||!a.__typeName||a.__typeName=3D=3D=3D"Object")return =
Object;return a};Object.getTypeName=3Dfunction(a){return =
Object.getType(a).getName()};Boolean.__typeName=3D"Boolean";Boolean.__cla=
ss=3Dtrue;Boolean.parse=3Dfunction(b){var =
a=3Db.trim().toLowerCase();if(a=3D=3D=3D"false")return =
false;if(a=3D=3D=3D"true")return =
true};Date.__typeName=3D"Date";Date.__class=3Dtrue;Date._appendPreOrPostM=
atch=3Dfunction(e,b){var d=3D0,a=3Dfalse;for(var =
c=3D0,g=3De.length;c<g;c++){var f=3De.charAt(c);switch(f){case =
"'":if(a)b.append("'");else d++;a=3Dfalse;break;case =
"\\":if(a)b.append("\\");a=3D!a;break;default:b.append(f);a=3Dfalse;break=
}}return =
d};Date._expandFormat=3Dfunction(a,b){if(!b)b=3D"F";if(b.length=3D=3D=3D1=
)switch(b){case "d":return a.ShortDatePattern;case "D":return =
a.LongDatePattern;case "t":return a.ShortTimePattern;case "T":return =
a.LongTimePattern;case "F":return a.FullDateTimePattern;case "M":case =
"m":return a.MonthDayPattern;case "s":return =
a.SortableDateTimePattern;case "Y":case "y":return =
a.YearMonthPattern;default:throw =
Error.format(Sys.Res.formatInvalidString)}return =
b};Date._expandYear=3Dfunction(c,a){if(a<100){var b=3D(new =
Date).getFullYear();a+=3Db-b%100;if(a>c.Calendar.TwoDigitYearMax)return =
a-100}return =
a};Date._getParseRegExp=3Dfunction(b,e){if(!b._parseRegExp)b._parseRegExp=
=3D{};else if(b._parseRegExp[e])return b._parseRegExp[e];var =
c=3DDate._expandFormat(b,e);c=3Dc.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])=
/g,"\\\\$1");var a=3Dnew =
Sys.StringBuilder("^"),j=3D[],f=3D0,i=3D0,h=3DDate._getTokenRegExp(),d;wh=
ile((d=3Dh.exec(c))!=3D=3Dnull){var =
l=3Dc.slice(f,d.index);f=3Dh.lastIndex;i+=3DDate._appendPreOrPostMatch(l,=
a);if(i%2=3D=3D=3D1){a.append(d[0]);continue}switch(d[0]){case =
"dddd":case "ddd":case "MMMM":case "MMM":a.append("(\\D+)");break;case =
"tt":case "t":a.append("(\\D*)");break;case =
"yyyy":a.append("(\\d{4})");break;case =
"fff":a.append("(\\d{3})");break;case =
"ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case =
"dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case =
"H":case "hh":case "h":case "mm":case "m":case "ss":case =
"s":a.append("(\\d\\d?)");break;case =
"zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case =
"z":a.append("([+-]?\\d\\d?)");break}Array.add(j,d[0])}Date._appendPreOrP=
ostMatch(c.slice(f),a);a.append("$");var =
k=3Da.toString().replace(/\s+/g,"\\s+"),g=3D{"regExp":k,"groups":j};b._pa=
rseRegExp[e]=3Dg;return g};Date._getTokenRegExp=3Dfunction(){return =
/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|=
zzz|zz|z/g};Date.parseLocale=3Dfunction(a){return =
Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvari=
ant=3Dfunction(a){return =
Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=3D=
function(g,c,h){var e=3Dfalse;for(var a=3D1,i=3Dh.length;a<i;a++){var =
f=3Dh[a];if(f){e=3Dtrue;var b=3DDate._parseExact(g,f,c);if(b)return =
b}}if(!e){var d=3Dc._getDateTimeFormats();for(var =
a=3D0,i=3Dd.length;a<i;a++){var =
b=3DDate._parseExact(g,d[a],c);if(b)return b}}return =
null};Date._parseExact=3Dfunction(s,y,j){s=3Ds.trim();var =
m=3Dj.dateTimeFormat,v=3DDate._getParseRegExp(m,y),x=3D(new =
RegExp(v.regExp)).exec(s);if(x!=3D=3Dnull){var =
w=3Dv.groups,f=3Dnull,c=3Dnull,h=3Dnull,g=3Dnull,d=3D0,n=3D0,o=3D0,e=3D0,=
k=3Dnull,r=3Dfalse;for(var p=3D0,z=3Dw.length;p<z;p++){var =
a=3Dx[p+1];if(a)switch(w[p]){case "dd":case =
"d":h=3DDate._parseInt(a);if(h<1||h>31)return null;break;case =
"MMMM":c=3Dj._getMonthIndex(a);if(c<0||c>11)return null;break;case =
"MMM":c=3Dj._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case =
"M":case "MM":var c=3DDate._parseInt(a)-1;if(c<0||c>11)return =
null;break;case "y":case =
"yy":f=3DDate._expandYear(m,Date._parseInt(a));if(f<0||f>9999)return =
null;break;case "yyyy":f=3DDate._parseInt(a);if(f<0||f>9999)return =
null;break;case "h":case =
"hh":d=3DDate._parseInt(a);if(d=3D=3D=3D12)d=3D0;if(d<0||d>11)return =
null;break;case "H":case "HH":d=3DDate._parseInt(a);if(d<0||d>23)return =
null;break;case "m":case "mm":n=3DDate._parseInt(a);if(n<0||n>59)return =
null;break;case "s":case "ss":o=3DDate._parseInt(a);if(o<0||o>59)return =
null;break;case "tt":case "t":var =
u=3Da.toUpperCase();r=3Du=3D=3D=3Dm.PMDesignator.toUpperCase();if(!r&&u!=3D=
=3Dm.AMDesignator.toUpperCase())return null;break;case =
"f":e=3DDate._parseInt(a)*100;if(e<0||e>999)return null;break;case =
"ff":e=3DDate._parseInt(a)*10;if(e<0||e>999)return null;break;case =
"fff":e=3DDate._parseInt(a);if(e<0||e>999)return null;break;case =
"dddd":g=3Dj._getDayIndex(a);if(g<0||g>6)return null;break;case =
"ddd":g=3Dj._getAbbrDayIndex(a);if(g<0||g>6)return null;break;case =
"zzz":var q=3Da.split(/:/);if(q.length!=3D=3D2)return null;var =
i=3DDate._parseInt(q[0]);if(i<-12||i>13)return null;var =
l=3DDate._parseInt(q[1]);if(l<0||l>59)return =
null;k=3Di*60+(a.startsWith("-")?-l:l);break;case "z":case "zz":var =
i=3DDate._parseInt(a);if(i<-12||i>13)return null;k=3Di*60;break}}var =
b=3Dnew =
Date;if(f=3D=3D=3Dnull)f=3Db.getFullYear();if(c=3D=3D=3Dnull)c=3Db.getMon=
th();if(h=3D=3D=3Dnull)h=3Db.getDate();b.setFullYear(f,c,h);if(b.getDate(=
)!=3D=3Dh)return null;if(g!=3D=3Dnull&&b.getDay()!=3D=3Dg)return =
null;if(r&&d<12)d+=3D12;b.setHours(d,n,o,e);if(k!=3D=3Dnull){var =
t=3Db.getMinutes()-(k+b.getTimezoneOffset());b.setHours(b.getHours()+pars=
eInt(t/60),t%60)}return b}};Date._parseInt=3Dfunction(a){return =
parseInt(a.replace(/^[\s0]+(\d+)$/,"$1"))};Date.prototype.format=3Dfuncti=
on(a){return =
this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototy=
pe.localeFormat=3Dfunction(a){return =
this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype=
._toFormattedString=3Dfunction(e,h){if(!e||e.length=3D=3D=3D0||e=3D=3D=3D=
"i")if(h&&h.name.length>0)return this.toLocaleString();else return =
this.toString();var d=3Dh.dateTimeFormat;e=3DDate._expandFormat(d,e);var =
a=3Dnew Sys.StringBuilder,b;function c(a){if(a<10)return "0"+a;return =
a.toString()}function g(a){if(a<10)return "00"+a;if(a<100)return =
"0"+a;return a.toString()}var =
j=3D0,i=3DDate._getTokenRegExp();for(;true;){var =
l=3Di.lastIndex,f=3Di.exec(e),k=3De.slice(l,f?f.index:e.length);j+=3DDate=
._appendPreOrPostMatch(k,a);if(!f)break;if(j%2=3D=3D=3D1){a.append(f[0]);=
continue}switch(f[0]){case =
"dddd":a.append(d.DayNames[this.getDay()]);break;case =
"ddd":a.append(d.AbbreviatedDayNames[this.getDay()]);break;case =
"dd":a.append(c(this.getDate()));break;case =
"d":a.append(this.getDate());break;case =
"MMMM":a.append(d.MonthNames[this.getMonth()]);break;case =
"MMM":a.append(d.AbbreviatedMonthNames[this.getMonth()]);break;case =
"MM":a.append(c(this.getMonth()+1));break;case =
"M":a.append(this.getMonth()+1);break;case =
"yyyy":a.append(this.getFullYear());break;case =
"yy":a.append(c(this.getFullYear()%100));break;case =
"y":a.append(this.getFullYear()%100);break;case =
"hh":b=3Dthis.getHours()%12;if(b=3D=3D=3D0)b=3D12;a.append(c(b));break;ca=
se =
"h":b=3Dthis.getHours()%12;if(b=3D=3D=3D0)b=3D12;a.append(b);break;case =
"HH":a.append(c(this.getHours()));break;case =
"H":a.append(this.getHours());break;case =
"mm":a.append(c(this.getMinutes()));break;case =
"m":a.append(this.getMinutes());break;case =
"ss":a.append(c(this.getSeconds()));break;case =
"s":a.append(this.getSeconds());break;case =
"tt":a.append(this.getHours()<12?d.AMDesignator:d.PMDesignator);break;cas=
e =
"t":a.append((this.getHours()<12?d.AMDesignator:d.PMDesignator).charAt(0)=
);break;case =
"f":a.append(g(this.getMilliseconds()).charAt(0));break;case =
"ff":a.append(g(this.getMilliseconds()).substr(0,2));break;case =
"fff":a.append(g(this.getMilliseconds()));break;case =
"z":b=3Dthis.getTimezoneOffset()/60;a.append((b>=3D0?"+":"-")+Math.floor(=
Math.abs(b)));break;case =
"zz":b=3Dthis.getTimezoneOffset()/60;a.append((b>=3D0?"+":"-")+c(Math.flo=
or(Math.abs(b))));break;case =
"zzz":b=3Dthis.getTimezoneOffset()/60;a.append((b>=3D0?"+":"-")+c(Math.fl=
oor(Math.abs(b)))+d.TimeSeparator+c(Math.abs(this.getTimezoneOffset()%60)=
));break}}return =
a.toString()};Number.__typeName=3D"Number";Number.__class=3Dtrue;Number.p=
arseLocale=3Dfunction(a){return =
Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=3D=
function(a){return =
Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=3Dfuncti=
on(g,f){var a=3Dg.trim();if(a.match(/infinity/i)!=3D=3Dnull)return =
parseFloat(a);if(a.match(/^0x[a-f0-9]+$/i)!=3D=3Dnull)return =
parseInt(a);var =
d=3Df.numberFormat,b=3Dd.NumberDecimalSeparator,c=3Dd.NumberGroupSeparato=
r,e=3Dnew =
RegExp("^[+-]?[\\d\\"+c+"]*\\"+b+"?\\d*([eE][+-]?\\d+)?$");if(!a.match(e)=
)return Number.NaN;a=3Da.split(c).join("");a=3Da.replace(b,".");return =
parseFloat(a)};Number.prototype.format=3Dfunction(a){return =
this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.proto=
type.localeFormat=3Dfunction(a){return =
this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototy=
pe._toFormattedString=3Dfunction(d,j){if(!d||d.length=3D=3D=3D0||d=3D=3D=3D=
"i")if(j&&j.name.length>0)return this.toLocaleString();else return =
this.toString();var q=3D["n %","n%","%n"],p=3D["-n =
%","-n%","-%n"],r=3D["(n)","-n","- n","n-","n -"],o=3D["$n","n$","$ =
n","n $"],n=3D["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n =
$","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function =
i(p,k,j,l,o){var =
e=3Dj[0],g=3D1,c=3Dp.toString(),a=3D"",m=3D"",i=3Dc.split(".");if(i.lengt=
h>1){c=3Di[0];a=3Di[1];var =
h=3Da.split(/e/i);if(h.length>1){a=3Dh[0];m=3D"e"+h[1]}}if(k>0){var =
f=3Da.length-k;if(f>0)a=3Da.slice(0,k);else if(f<0)for(var =
n=3D0;n<Math.abs(f);n++)a+=3D"0";a=3Do+a}else a=3D"";a+=3Dm;var =
b=3Dc.length-1,d=3D"";while(b>=3D0){if(e=3D=3D=3D0||e>b)if(d.length>0)ret=
urn c.slice(0,b+1)+l+d+a;else return =
c.slice(0,b+1)+a;if(d.length>0)d=3Dc.slice(b-e+1,b+1)+l+d;else =
d=3Dc.slice(b-e+1,b+1);b-=3De;if(g<j.length){e=3Dj[g];g++}}return =
c.slice(0,b+1)+l+d+a}var =
a=3Dj.numberFormat,e=3DMath.abs(this);if(!d)d=3D"D";var =
b=3D-1;if(d.length>1)b=3DparseInt(d.slice(1));var =
c;switch(d.charAt(0)){case "d":case "D":c=3D"n";if(b!=3D=3D-1){var =
g=3D""+e,k=3Db-g.length;if(k>0)for(var =
m=3D0;m<k;m++)g=3D"0"+g;e=3Dg}if(this<0)e=3D-e;break;case "c":case =
"C":if(this<0)c=3Dn[a.CurrencyNegativePattern];else =
c=3Do[a.CurrencyPositivePattern];if(b=3D=3D=3D-1)b=3Da.CurrencyDecimalDig=
its;e=3Di(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,=
a.CurrencyDecimalSeparator);break;case "n":case =
"N":if(this<0)c=3Dr[a.NumberNegativePattern];else =
c=3D"n";if(b=3D=3D=3D-1)b=3Da.NumberDecimalDigits;e=3Di(Math.abs(this),b,=
a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break=
;case "p":case "P":if(this<0)c=3Dp[a.PercentNegativePattern];else =
c=3Dq[a.PercentPositivePattern];if(b=3D=3D=3D-1)b=3Da.PercentDecimalDigit=
s;e=3Di(Math.abs(this),b,a.PercentGroupSizes,a.PercentGroupSeparator,a.Pe=
rcentDecimalSeparator);break;default:throw =
Error.format(Sys.Res.formatBadFormatSpecifier)}var =
l=3D/n|\$|-|%/g,f=3D"";for(;true;){var =
s=3Dl.lastIndex,h=3Dl.exec(c);f+=3Dc.slice(s,h?h.index:c.length);if(!h)br=
eak;switch(h[0]){case "n":f+=3De;break;case =
"$":f+=3Da.CurrencySymbol;break;case "-":f+=3Da.NegativeSign;break;case =
"%":f+=3Da.PercentSymbol;break}}return =
f};RegExp.__typeName=3D"RegExp";RegExp.__class=3Dtrue;Array.__typeName=3D=
"Array";Array.__class=3Dtrue;Array.add=3DArray.enqueue=3Dfunction(a,b){a[=
a.length]=3Db};Array.addRange=3Dfunction(a,b){a.push.apply(a,b)};Array.cl=
ear=3Dfunction(a){a.length=3D0};Array.clone=3Dfunction(a){if(a.length=3D=3D=
=3D1)return [a[0]];else return =
Array.apply(null,a)};Array.contains=3Dfunction(a,b){return =
Array.indexOf(a,b)>=3D0};Array.dequeue=3Dfunction(a){return =
a.shift()};Array.forEach=3Dfunction(b,e,d){for(var =
a=3D0,f=3Db.length;a<f;a++){var c=3Db[a];if(typeof =
c!=3D=3D"undefined")e.call(d,c,a,b)}};Array.indexOf=3Dfunction(d,e,a){if(=
typeof e=3D=3D=3D"undefined")return -1;var =
c=3Dd.length;if(c!=3D=3D0){a=3Da-0;if(isNaN(a))a=3D0;else{if(isFinite(a))=
a=3Da-a%1;if(a<0)a=3DMath.max(0,c+a)}for(var b=3Da;b<c;b++)if(typeof =
d[b]!=3D=3D"undefined"&&d[b]=3D=3D=3De)return b}return =
-1};Array.insert=3Dfunction(a,b,c){a.splice(b,0,c)};Array.parse=3Dfunctio=
n(value){if(!value)return [];return =
eval(value)};Array.remove=3Dfunction(b,c){var =
a=3DArray.indexOf(b,c);if(a>=3D0)b.splice(a,1);return =
a>=3D0};Array.removeAt=3Dfunction(a,b){a.splice(b,1)};String.__typeName=3D=
"String";String.__class=3Dtrue;String.prototype.endsWith=3Dfunction(a){re=
turn =
this.substr(this.length-a.length)=3D=3D=3Da};String.prototype.startsWith=3D=
function(a){return =
this.substr(0,a.length)=3D=3D=3Da};String.prototype.trim=3Dfunction(){ret=
urn =
this.replace(/^\s+|\s+$/g,"")};String.prototype.trimEnd=3Dfunction(){retu=
rn =
this.replace(/\s+$/,"")};String.prototype.trimStart=3Dfunction(){return =
this.replace(/^\s+/,"")};String.format=3Dfunction(){return =
String._toFormattedString(false,arguments)};String.localeFormat=3Dfunctio=
n(){return =
String._toFormattedString(true,arguments)};String._toFormattedString=3Dfu=
nction(l,j){var c=3D"",e=3Dj[0];for(var a=3D0;true;){var =
f=3De.indexOf("{",a),d=3De.indexOf("}",a);if(f<0&&d<0){c+=3De.slice(a);br=
eak}if(d>0&&(d<f||f<0)){c+=3De.slice(a,d+1);a=3Dd+2;continue}c+=3De.slice=
(a,f);a=3Df+1;if(e.charAt(a)=3D=3D=3D"{"){c+=3D"{";a++;continue}if(d<0)br=
eak;var =
h=3De.substring(a,d),g=3Dh.indexOf(":"),k=3DparseInt(g<0?h:h.substring(0,=
g))+1,i=3Dg<0?"":h.substring(g+1),b=3Dj[k];if(typeof =
b=3D=3D=3D"undefined"||b=3D=3D=3Dnull)b=3D"";if(b.toFormattedString)c+=3D=
b.toFormattedString(i);else =
if(l&&b.localeFormat)c+=3Db.localeFormat(i);else =
if(b.format)c+=3Db.format(i);else c+=3Db.toString();a=3Dd+1}return =
c};Type.registerNamespace("Sys");Sys.IDisposable=3Dfunction(){};Sys.IDisp=
osable.prototype=3D{};Sys.IDisposable.registerInterface("Sys.IDisposable"=
);Sys.StringBuilder=3Dfunction(a){this._parts=3Dtypeof =
a!=3D=3D"undefined"&&a!=3D=3Dnull&&a!=3D=3D""?[a.toString()]:[];this._val=
ue=3D{};this._len=3D0};Sys.StringBuilder.prototype=3D{append:function(a){=
this._parts[this._parts.length]=3Da},appendLine:function(a){this._parts[t=
his._parts.length]=3Dtypeof =
a=3D=3D=3D"undefined"||a=3D=3D=3Dnull||a=3D=3D=3D""?"\r\n":a+"\r\n"},clea=
r:function(){this._parts=3D[];this._value=3D{};this._len=3D0},isEmpty:fun=
ction(){if(this._parts.length=3D=3D=3D0)return true;return =
this.toString()=3D=3D=3D""},toString:function(a){a=3Da||"";var =
b=3Dthis._parts;if(this._len!=3D=3Db.length){this._value=3D{};this._len=3D=
b.length}var d=3Dthis._value;if(typeof =
d[a]=3D=3D=3D"undefined"){if(a!=3D=3D"")for(var =
c=3D0;c<b.length;)if(typeof =
b[c]=3D=3D=3D"undefined"||b[c]=3D=3D=3D""||b[c]=3D=3D=3Dnull)b.splice(c,1=
);else c++;d[a]=3Dthis._parts.join(a)}return =
d[a]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XM=
LHttpRequest)window.XMLHttpRequest=3Dfunction(){var =
b=3D["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var =
a=3D0;a<b.length;a++)try{var c=3Dnew ActiveXObject(b[a]);return =
c}catch(d){}return =
null};Sys.Browser=3D{};Sys.Browser.InternetExplorer=3D{};Sys.Browser.Fire=
fox=3D{};Sys.Browser.Safari=3D{};Sys.Browser.Opera=3D{};Sys.Browser.agent=
=3Dnull;Sys.Browser.hasDebuggerStatement=3Dfalse;Sys.Browser.name=3Dnavig=
ator.appName;Sys.Browser.version=3DparseFloat(navigator.appVersion);if(na=
vigator.userAgent.indexOf(" MSIE =
")>-1){Sys.Browser.agent=3DSys.Browser.InternetExplorer;Sys.Browser.versi=
on=3DparseFloat(navigator.userAgent.match(/MSIE =
(\d+\.\d+)/)[1]);Sys.Browser.hasDebuggerStatement=3Dtrue}else =
if(navigator.userAgent.indexOf(" =
Firefox/")>-1){Sys.Browser.agent=3DSys.Browser.Firefox;Sys.Browser.versio=
n=3DparseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.B=
rowser.name=3D"Firefox";Sys.Browser.hasDebuggerStatement=3Dtrue}else =
if(navigator.userAgent.indexOf(" =
Safari/")>-1){Sys.Browser.agent=3DSys.Browser.Safari;Sys.Browser.version=3D=
parseFloat(navigator.userAgent.match(/Safari\/(\d+\.\d+)/)[1]);Sys.Browse=
r.name=3D"Safari"}else =
if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=3DSys.Brows=
er.Opera;Type.registerNamespace("Sys.UI");Sys._Debug=3Dfunction(){};Sys._=
Debug.prototype=3D{_appendConsole:function(a){if(typeof =
Debug!=3D=3D"undefined"&&Debug.writeln)Debug.writeln(a);if(window.console=
&&window.console.log)window.console.log(a);if(window.opera)window.opera.p=
ostError(a);if(window.debugService)window.debugService.trace(a)},_appendT=
race:function(b){var =
a=3Ddocument.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()=
=3D=3D=3D"TEXTAREA")a.value+=3Db+"\n"},assert:function(c,a,b){if(!c){a=3D=
b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.ass=
ert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.forma=
t(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var =
a=3Ddocument.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()=
=3D=3D=3D"TEXTAREA")a.value=3D""},fail:function(message){this._appendCons=
ole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:=
function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:functi=
on(a,b){var =
c=3Dthis._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=3Dc?c:"tr=
aceDump";b=3Db?b:"";if(a=3D=3D=3Dnull){this.trace(b+c+": =
null");return}switch(typeof a){case "undefined":this.trace(b+c+": =
Undefined");break;case "number":case "string":case =
"boolean":this.trace(b+c+": =
"+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a=
)){this.trace(b+c+": "+a.toString());break}if(!d)d=3D[];else =
if(Array.contains(d,a)){this.trace(b+c+": =
...");return}Array.add(d,a);if(a=3D=3Dwindow||a=3D=3D=3Ddocument||window.=
HTMLElement&&a instanceof HTMLElement||typeof =
a.nodeName=3D=3D=3D"string"){var =
k=3Da.tagName?a.tagName:"DomElement";if(a.id)k+=3D" - =
"+a.id;this.trace(b+c+" {"+k+"}")}else{var =
i=3DObject.getTypeName(a);this.trace(b+c+(typeof i=3D=3D=3D"string"?" =
{"+i+"}":""));if(b=3D=3D=3D""||f){b+=3D"    ";var =
e,j,l,g,h;if(Array.isInstanceOfType(a)){j=3Da.length;for(e=3D0;e<j;e++)th=
is._traceDump(a[e],"["+e+"]",f,b,d)}else for(g in =
a){h=3Da[g];if(!Function.isInstanceOfType(h))this._traceDump(h,g,f,b,d)}}=
}Array.remove(d,a)}}};Sys._Debug.registerClass("Sys._Debug");Sys.Debug=3D=
new Sys._Debug;Sys.Debug.isDebug=3Dfalse;function =
Sys$Enum$parse(c,e){var =
a,b,i;if(e){a=3Dthis.__lowerCaseValues;if(!a){this.__lowerCaseValues=3Da=3D=
{};var g=3Dthis.prototype;for(var f in g)a[f.toLowerCase()]=3Dg[f]}}else =
a=3Dthis.prototype;if(!this.__flags){i=3De?c.toLowerCase():c;b=3Da[i.trim=
()];if(typeof b!=3D=3D"number")throw =
Error.argument("value",String.format(Sys.Res.enumInvalidValue,c,this.__ty=
peName));return b}else{var =
h=3D(e?c.toLowerCase():c).split(","),j=3D0;for(var =
d=3Dh.length-1;d>=3D0;d--){var k=3Dh[d].trim();b=3Da[k];if(typeof =
b!=3D=3D"number")throw =
Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(","=
)[d].trim(),this.__typeName));j|=3Db}return j}}function =
Sys$Enum$toString(c){if(typeof =
c=3D=3D=3D"undefined"||c=3D=3D=3Dnull)return this.__string;var =
d=3Dthis.prototype,a;if(!this.__flags||c=3D=3D=3D0){for(a in =
d)if(d[a]=3D=3D=3Dc)return a}else{var =
b=3Dthis.__sortedValues;if(!b){b=3D[];for(a in =
d)b[b.length]=3D{key:a,value:d[a]};b.sort(function(a,b){return =
a.value-b.value});this.__sortedValues=3Db}var =
e=3D[],g=3Dc;for(a=3Db.length-1;a>=3D0;a--){var =
h=3Db[a],f=3Dh.value;if(f=3D=3D=3D0)continue;if((f&c)=3D=3D=3Df){e[e.leng=
th]=3Dh.key;g-=3Df;if(g=3D=3D=3D0)break}}if(e.length&&g=3D=3D=3D0)return =
e.reverse().join(", ")}return =
""}Type.prototype.registerEnum=3Dfunction(c,b){for(var a in =
this.prototype)this[a]=3Dthis.prototype[a];this.__typeName=3Dc;this.parse=
=3DSys$Enum$parse;this.__string=3Dthis.toString();this.toString=3DSys$Enu=
m$toString;this.__flags=3Db;this.__enum=3Dtrue};Type.isEnum=3Dfunction(a)=
{if(typeof a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;return =
!!a.__enum};Type.isFlags=3Dfunction(a){if(typeof =
a=3D=3D=3D"undefined"||a=3D=3D=3Dnull)return false;return =
!!a.__flags};Sys.EventHandlerList=3Dfunction(){this._list=3D{}};Sys.Event=
HandlerList.prototype=3D{addHandler:function(b,a){Array.add(this._getEven=
t(b,true),a)},removeHandler:function(c,b){var =
a=3Dthis._getEvent(c);if(!a)return;Array.remove(a,b)},getHandler:function=
(b){var a=3Dthis._getEvent(b);if(!a||a.length=3D=3D=3D0)return =
null;a=3DArray.clone(a);if(!a._handler)a._handler=3Dfunction(c,d){for(var=
 b=3D0,e=3Da.length;b<e;b++)a[b](c,d)};return =
a._handler},_getEvent:function(a,b){if(!this._list[a]){if(!b)return =
null;this._list[a]=3D[]}return =
this._list[a]}};Sys.EventHandlerList.registerClass("Sys.EventHandlerList"=
);Sys.EventArgs=3Dfunction(){};Sys.EventArgs.registerClass("Sys.EventArgs=
");Sys.EventArgs.Empty=3Dnew =
Sys.EventArgs;Sys.CancelEventArgs=3Dfunction(){Sys.CancelEventArgs.initia=
lizeBase(this);this._cancel=3Dfalse};Sys.CancelEventArgs.prototype=3D{get=
_cancel:function(){return =
this._cancel},set_cancel:function(a){this._cancel=3Da}};Sys.CancelEventAr=
gs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Sys.INotifyProperty=
Change=3Dfunction(){};Sys.INotifyPropertyChange.prototype=3D{};Sys.INotif=
yPropertyChange.registerInterface("Sys.INotifyPropertyChange");Sys.Proper=
tyChangedEventArgs=3Dfunction(a){Sys.PropertyChangedEventArgs.initializeB=
ase(this);this._propertyName=3Da};Sys.PropertyChangedEventArgs.prototype=3D=
{get_propertyName:function(){return =
this._propertyName}};Sys.PropertyChangedEventArgs.registerClass("Sys.Prop=
ertyChangedEventArgs",Sys.EventArgs);Sys.INotifyDisposing=3Dfunction(){};=
Sys.INotifyDisposing.prototype=3D{};Sys.INotifyDisposing.registerInterfac=
e("Sys.INotifyDisposing");Sys.Component=3Dfunction(){if(Sys.Application)S=
ys.Application.registerDisposableObject(this)};Sys.Component.prototype=3D=
{_id:null,_initialized:false,_updating:false,get_events:function(){if(!th=
is._events)this._events=3Dnew Sys.EventHandlerList;return =
this._events},get_id:function(){return =
this._id},set_id:function(a){this._id=3Da},get_isInitialized:function(){r=
eturn this._initialized},get_isUpdating:function(){return =
this._updating},add_disposing:function(a){this.get_events().addHandler("d=
isposing",a)},remove_disposing:function(a){this.get_events().removeHandle=
r("disposing",a)},add_propertyChanged:function(a){this.get_events().addHa=
ndler("propertyChanged",a)},remove_propertyChanged:function(a){this.get_e=
vents().removeHandler("propertyChanged",a)},beginUpdate:function(){this._=
updating=3Dtrue},dispose:function(){if(this._events){var =
a=3Dthis._events.getHandler("disposing");if(a)a(this,Sys.EventArgs.Empty)=
}delete =
this._events;Sys.Application.unregisterDisposableObject(this);Sys.Applica=
tion.removeComponent(this)},endUpdate:function(){this._updating=3Dfalse;i=
f(!this._initialized)this.initialize();this.updated()},initialize:functio=
n(){this._initialized=3Dtrue},raisePropertyChanged:function(b){if(!this._=
events)return;var =
a=3Dthis._events.getHandler("propertyChanged");if(a)a(this,new =
Sys.PropertyChangedEventArgs(b))},updated:function(){}};Sys.Component.reg=
isterClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange=
,Sys.INotifyDisposing);function Sys$Component$_setProperties(a,i){var =
d,j=3DObject.getType(a),e=3Dj=3D=3D=3DObject||j=3D=3D=3DSys.UI.DomElement=
,h=3DSys.Component.isInstanceOfType(a)&&!a.get_isUpdating();if(h)a.beginU=
pdate();for(var c in i){var b=3Di[c],f=3De?null:a["get_"+c];if(e||typeof =
f!=3D=3D"function"){var k=3Da[c];if(!b||typeof =
b!=3D=3D"object"||e&&!k)a[c]=3Db;else =
Sys$Component$_setProperties(k,b)}else{var l=3Da["set_"+c];if(typeof =
l=3D=3D=3D"function")l.apply(a,[b]);else if(b instanceof =
Array){d=3Df.apply(a);for(var =
g=3D0,m=3Dd.length,n=3Db.length;g<n;g++,m++)d[m]=3Db[g]}else if(typeof =
b=3D=3D=3D"object"&&Object.getType(b)=3D=3D=3DObject){d=3Df.apply(a);Sys$=
Component$_setProperties(d,b)}}}if(h)a.endUpdate()}function =
Sys$Component$_setReferences(c,b){for(var a in b){var =
e=3Dc["set_"+a],d=3D$find(b[a]);e.apply(c,[d])}}var =
$create=3DSys.Component.create=3Dfunction(h,f,d,c,g){var a=3Dg?new =
h(g):new =
h,b=3DSys.Application,i=3Db.get_isCreatingComponents();a.beginUpdate();if=
(f)Sys$Component$_setProperties(a,f);if(d)for(var e in =
d)a["add_"+e](d[e]);b._createdComponents[b._createdComponents.length]=3Da=
;if(a.get_id())b.addComponent(a);if(i)if(c)b._addComponentToSecondPass(a,=
c);else =
a.endUpdate();else{if(c)Sys$Component$_setReferences(a,c);a.endUpdate()}r=
eturn a};Sys.UI.MouseButton=3Dfunction(){throw =
Error.notImplemented()};Sys.UI.MouseButton.prototype=3D{leftButton:0,midd=
leButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum("Sys.UI.MouseBu=
tton");Sys.UI.Key=3Dfunction(){throw =
Error.notImplemented()};Sys.UI.Key.prototype=3D{backspace:8,tab:9,enter:1=
3,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,righ=
t:39,down:40,del:127};Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.DomEve=
nt=3Dfunction(c){var =
a=3Dc;this.rawEvent=3Da;this.altKey=3Da.altKey;if(typeof =
a.button!=3D=3D"undefined")this.button=3Dtypeof =
a.which!=3D=3D"undefined"?a.button:a.button=3D=3D=3D4?Sys.UI.MouseButton.=
middleButton:a.button=3D=3D=3D2?Sys.UI.MouseButton.rightButton:Sys.UI.Mou=
seButton.leftButton;if(a.type=3D=3D=3D"keypress")this.charCode=3Da.charCo=
de||a.keyCode;else =
if(a.keyCode&&a.keyCode=3D=3D=3D46)this.keyCode=3D127;else =
this.keyCode=3Da.keyCode;this.clientX=3Da.clientX;this.clientY=3Da.client=
Y;this.ctrlKey=3Da.ctrlKey;this.target=3Da.target?a.target:a.srcElement;i=
f(this.target){var =
b=3DSys.UI.DomElement.getLocation(this.target);this.offsetX=3Dtypeof =
a.offsetX!=3D=3D"undefined"?a.offsetX:window.pageXOffset+(a.clientX||0)-b=
.x;this.offsetY=3Dtypeof =
a.offsetY!=3D=3D"undefined"?a.offsetY:window.pageYOffset+(a.clientY||0)-b=
.y}this.screenX=3Da.screenX;this.screenY=3Da.screenY;this.shiftKey=3Da.sh=
iftKey;this.type=3Da.type};Sys.UI.DomEvent.prototype=3D{preventDefault:fu=
nction(){if(this.rawEvent.preventDefault)this.rawEvent.preventDefault();e=
lse =
if(window.event)window.event.returnValue=3Dfalse},stopPropagation:functio=
n(){if(this.rawEvent.stopPropagation)this.rawEvent.stopPropagation();else=
 =
if(window.event)window.event.cancelBubble=3Dtrue}};Sys.UI.DomEvent.regist=
erClass("Sys.UI.DomEvent");var =
$addHandler=3DSys.UI.DomEvent.addHandler=3Dfunction(a,d,e){if(!a._events)=
a._events=3D{};var c=3Da._events[d];if(!c)a._events[d]=3Dc=3D[];var =
b;if(a.addEventListener){b=3Dfunction(b){return e.call(a,new =
Sys.UI.DomEvent(b))};a.addEventListener(d,b,false)}else =
if(a.attachEvent){b=3Dfunction(){return e.call(a,new =
Sys.UI.DomEvent(window.event))};a.attachEvent("on"+d,b)}c[c.length]=3D{ha=
ndler:e,browserHandler:b}},$addHandlers=3DSys.UI.DomEvent.addHandlers=3Df=
unction(e,d,c){for(var b in d){var =
a=3Dd[b];if(c)a=3DFunction.createDelegate(c,a);$addHandler(e,b,a)}},$clea=
rHandlers=3DSys.UI.DomEvent.clearHandlers=3Dfunction(a){if(a._events){var=
 e=3Da._events;for(var b in e){var d=3De[b];for(var =
c=3Dd.length-1;c>=3D0;c--)$removeHandler(a,b,d[c].handler)}a._events=3Dnu=
ll}},$removeHandler=3DSys.UI.DomEvent.removeHandler=3Dfunction(a,e,f){var=
 d=3Dnull,c=3Da._events[e],d=3Dnull;for(var =
b=3D0,g=3Dc.length;b<g;b++)if(c[b].handler=3D=3D=3Df){d=3Dc[b].browserHan=
dler;break}if(a.removeEventListener)a.removeEventListener(e,d,false);else=
 =
if(a.detachEvent)a.detachEvent("on"+e,d);c.splice(b,1)};Sys.IContainer=3D=
function(){};Sys.IContainer.prototype=3D{};Sys.IContainer.registerInterfa=
ce("Sys.IContainer");Sys._ScriptLoader=3Dfunction(){this._scriptsToLoad=3D=
null;this._scriptLoadedDelegate=3DFunction.createDelegate(this,this._scri=
ptLoadedHandler)};Sys._ScriptLoader.prototype=3D{dispose:function(){this.=
_stopLoading();if(this._events)delete =
this._events;this._scriptLoadedDelegate=3Dnull},loadScripts:function(a,c,=
d,b){this._loading=3Dtrue;this._allScriptsLoadedCallback=3Dc;this._script=
LoadFailedCallback=3Dd;this._scriptLoadTimeoutCallback=3Db;if(a>0)this._t=
imeoutCookie=3Dwindow.setTimeout(Function.createDelegate(this,this._scrip=
tLoadTimeoutHandler),a*1000);this._loadScriptsInternal()},notifyScriptLoa=
ded:function(){if(!this._loading)return;this._currentTask._notified++;if(=
Sys.Browser.agent=3D=3D=3DSys.Browser.Safari)if(this._currentTask._notifi=
ed=3D=3D=3D1)window.setTimeout(Function.createDelegate(this,function(){th=
is._scriptLoadedHandler(this._currentTask.get_scriptElement(),true)}),0)}=
,queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsTo=
Load=3D[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){=
if(!this._scriptsToLoad)this._scriptsToLoad=3D[];Array.add(this._scriptsT=
oLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad=
)this._scriptsToLoad=3D[];Array.add(this._scriptsToLoad,{src:a})},_create=
ScriptElement:function(c){var =
a=3Ddocument.createElement("SCRIPT");a.type=3D"text/javascript";for(var =
b in c)a[b]=3Dc[b];return =
a},_loadScriptsInternal:function(){if(this._scriptsToLoad&&this._scriptsT=
oLoad.length>0){var =
b=3DArray.dequeue(this._scriptsToLoad),a=3Dthis._createScriptElement(b);i=
f(a.text&&Sys.Browser.agent=3D=3D=3DSys.Browser.Safari){a.innerHTML=3Da.t=
ext;delete a.text}if(typeof =
b.src=3D=3D=3D"string"){this._currentTask=3Dnew =
Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.exe=
cute()}else{document.getElementsByTagName("HEAD")[0].appendChild(a);Sys._=
ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{var =
c=3Dthis._allScriptsLoadedCallback;this._stopLoading();if(c)c(this)}},_ra=
iseError:function(a){var =
c=3Dthis._scriptLoadFailedCallback,b=3Dthis._currentTask.get_scriptElemen=
t();this._stopLoading();if(c)c(this,b,a);else throw =
Sys._ScriptLoader._errorScriptLoadFailed(b.src,a)},_scriptLoadedHandler:f=
unction(a,b){if(b&&this._currentTask._notified)if(this._currentTask._noti=
fied>1)this._raiseError(true);else{Array.add(Sys._ScriptLoader._getLoaded=
Scripts(),a.src);this._currentTask.dispose();this._currentTask=3Dnull;thi=
s._loadScriptsInternal()}else =
this._raiseError(false)},_scriptLoadTimeoutHandler:function(){var =
a=3Dthis._scriptLoadTimeoutCallback;this._stopLoading();if(a)a(this)},_st=
opLoading:function(){if(this._timeoutCookie){window.clearTimeout(this._ti=
meoutCookie);this._timeoutCookie=3Dnull}if(this._currentTask){this._curre=
ntTask.dispose();this._currentTask=3Dnull}this._scriptsToLoad=3Dnull;this=
._loading=3Dnull;this._allScriptsLoadedCallback=3Dnull;this._scriptLoadFa=
iledCallback=3Dnull;this._scriptLoadTimeoutCallback=3Dnull}};Sys._ScriptL=
oader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._Script=
Loader.getInstance=3Dfunction(){var =
a=3DSys._ScriptLoader._activeInstance;if(!a)a=3DSys._ScriptLoader._active=
Instance=3Dnew Sys._ScriptLoader;return =
a};Sys._ScriptLoader.isScriptLoaded=3Dfunction(b){var =
a=3Ddocument.createElement("script");a.src=3Db;return =
Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptL=
oader.readLoadedScripts=3Dfunction(){if(!Sys._ScriptLoader._referencedScr=
ipts){var =
b=3DSys._ScriptLoader._referencedScripts=3D[],c=3Ddocument.getElementsByT=
agName("SCRIPT");for(i=3Dc.length-1;i>=3D0;i--){var =
d=3Dc[i],a=3Dd.src;if(a.length)if(!Array.contains(b,a))Array.add(b,a)}}};=
Sys._ScriptLoader._clearScript=3Dfunction(a){if(!Sys.Debug.isDebug)a.pare=
ntNode.removeChild(a)};Sys._ScriptLoader._errorScriptLoadFailed=3Dfunctio=
n(b,d){var a;if(d)a=3DSys.Res.scriptLoadMultipleCallbacks;else =
a=3DSys.Res.scriptLoadFailed;var e=3D"Sys.ScriptLoadFailedException: =
"+String.format(a,b),c=3DError.create(e,{name:"Sys.ScriptLoadFailedExcept=
ion","scriptUrl":b});c.popStackFrame();return =
c};Sys._ScriptLoader._getLoadedScripts=3Dfunction(){if(!Sys._ScriptLoader=
._referencedScripts){Sys._ScriptLoader._referencedScripts=3D[];Sys._Scrip=
tLoader.readLoadedScripts()}return =
Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=3Dfunction(b,=
a){this._scriptElement=3Db;this._completedCallback=3Da;this._notified=3D0=
};Sys._ScriptLoaderTask.prototype=3D{get_scriptElement:function(){return =
this._scriptElement},dispose:function(){if(this._disposed)return;this._di=
sposed=3Dtrue;this._removeScriptElementHandlers();Sys._ScriptLoader._clea=
rScript(this._scriptElement);this._scriptElement=3Dnull},execute:function=
(){this._addScriptElementHandlers();document.getElementsByTagName("HEAD")=
[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(=
){this._scriptLoadDelegate=3DFunction.createDelegate(this,this._scriptLoa=
dHandler);if(Sys.Browser.agent!=3D=3DSys.Browser.InternetExplorer){this._=
scriptElement.readyState=3D"loaded";$addHandler(this._scriptElement,"load=
",this._scriptLoadDelegate)}else =
$addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelega=
te);this._scriptErrorDelegate=3DFunction.createDelegate(this,this._script=
ErrorHandler);$addHandler(this._scriptElement,"error",this._scriptErrorDe=
legate)},_removeScriptElementHandlers:function(){if(this._scriptLoadDeleg=
ate){var =
a=3Dthis.get_scriptElement();if(Sys.Browser.agent!=3D=3DSys.Browser.Inter=
netExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else =
$removeHandler(a,"readystatechange",this._scriptLoadDelegate);$removeHand=
ler(a,"error",this._scriptErrorDelegate);this._scriptErrorDelegate=3Dnull=
;this._scriptLoadDelegate=3Dnull}},_scriptErrorHandler:function(){if(this=
._disposed)return;this._completedCallback(this.get_scriptElement(),false)=
},_scriptLoadHandler:function(){if(this._disposed)return;var =
a=3Dthis.get_scriptElement();if(a.readyState!=3D=3D"loaded"&&a.readyState=
!=3D=3D"complete")return;var =
b=3Dthis;window.setTimeout(function(){b._completedCallback(a,true)},0)}};=
Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDis=
posable);Sys.ApplicationLoadEventArgs=3Dfunction(b,a){Sys.ApplicationLoad=
EventArgs.initializeBase(this);this._components=3Db;this._isPartialLoad=3D=
a};Sys.ApplicationLoadEventArgs.prototype=3D{get_components:function(){re=
turn this._components},get_isPartialLoad:function(){return =
this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.App=
licationLoadEventArgs",Sys.EventArgs);Sys._Application=3Dfunction(){Sys._=
Application.initializeBase(this);this._disposableObjects=3D[];this._compo=
nents=3D{};this._createdComponents=3D[];this._secondPassComponents=3D[];t=
his._unloadHandlerDelegate=3DFunction.createDelegate(this,this._unloadHan=
dler);this._loadHandlerDelegate=3DFunction.createDelegate(this,this._load=
Handler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDe=
legate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegat=
e)};Sys._Application.prototype=3D{_creatingComponents:false,_disposing:fa=
lse,get_isCreatingComponents:function(){return =
this._creatingComponents},add_load:function(a){this.get_events().addHandl=
er("load",a)},remove_load:function(a){this.get_events().removeHandler("lo=
ad",a)},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Em=
pty);else =
this.get_events().addHandler("init",a)},remove_init:function(a){this.get_=
events().removeHandler("init",a)},add_unload:function(a){this.get_events(=
).addHandler("unload",a)},remove_unload:function(a){this.get_events().rem=
oveHandler("unload",a)},addComponent:function(a){this._components[a.get_i=
d()]=3Da},beginCreateComponents:function(){this._creatingComponents=3Dtru=
e},dispose:function(){if(!this._disposing){this._disposing=3Dtrue;if(wind=
ow.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var =
c=3Dthis.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empt=
y);var b=3DArray.clone(this._disposableObjects);for(var =
a=3D0,e=3Db.length;a<e;a++)b[a].dispose();Array.clear(this._disposableObj=
ects);Sys.UI.DomEvent.removeHandler(window,"unload",this._unloadHandlerDe=
legate);if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(windo=
w,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=3Dnull}var =
d=3DSys._ScriptLoader.getInstance();if(d)d.dispose();Sys._Application.cal=
lBaseMethod(this,"dispose")}},endCreateComponents:function(){var =
b=3Dthis._secondPassComponents;for(var a=3D0,d=3Db.length;a<d;a++){var =
c=3Db[a].component;Sys$Component$_setReferences(c,b[a].references);c.endU=
pdate()}this._secondPassComponents=3D[];this._creatingComponents=3Dfalse}=
,findComponent:function(b,a){return =
a?Sys.IContainer.isInstanceOfType(a)?a.findComponent(b):a[b]||null:Sys.Ap=
plication._components[b]||null},getComponents:function(){var =
a=3D[],b=3Dthis._components;for(var c in b)a[a.length]=3Db[c];return =
a},initialize:function(){if(!this._initialized&&!this._initializing){this=
._initializing=3Dtrue;window.setTimeout(Function.createDelegate(this,this=
._doInitialize),0)}},notifyScriptLoaded:function(){var =
a=3DSys._ScriptLoader.getInstance();if(a)a.notifyScriptLoaded()},register=
DisposableObject:function(a){if(!this._disposing)this._disposableObjects[=
this._disposableObjects.length]=3Da},raiseLoad:function(){var =
b=3Dthis.get_events().getHandler("load"),a=3Dnew =
Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._=
initializing);if(b)b(this,a);if(window.pageLoad)window.pageLoad(this,a);t=
his._createdComponents=3D[]},removeComponent:function(b){var =
a=3Db.get_id();if(a)delete =
this._components[a]},unregisterDisposableObject:function(a){if(!this._dis=
posing)Array.remove(this._disposableObjects,a)},_addComponentToSecondPass=
:function(b,a){this._secondPassComponents[this._secondPassComponents.leng=
th]=3D{component:b,references:a}},_doInitialize:function(){Sys._Applicati=
on.callBaseMethod(this,"initialize");var =
a=3Dthis.get_events().getHandler("init");if(a){this.beginCreateComponents=
();a(this,Sys.EventArgs.Empty);this.endCreateComponents()}this.raiseLoad(=
);this._initializing=3Dfalse},_loadHandler:function(){if(this._loadHandle=
rDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerD=
elegate);this._loadHandlerDelegate=3Dnull}this.initialize()},_unloadHandl=
er:function(){this.dispose()}};Sys._Application.registerClass("Sys._Appli=
cation",Sys.Component,Sys.IContainer);Sys.Application=3Dnew =
Sys._Application;var =
$find=3DSys.Application.findComponent;Type.registerNamespace("Sys.Net");S=
ys.Net.WebRequestExecutor=3Dfunction(){this._webRequest=3Dnull;this._resu=
ltObject=3Dnull};Sys.Net.WebRequestExecutor.prototype=3D{get_webRequest:f=
unction(){return =
this._webRequest},_set_webRequest:function(a){this._webRequest=3Da},get_s=
tarted:function(){throw =
Error.notImplemented()},get_responseAvailable:function(){throw =
Error.notImplemented()},get_timedOut:function(){throw =
Error.notImplemented()},get_aborted:function(){throw =
Error.notImplemented()},get_responseData:function(){throw =
Error.notImplemented()},get_statusCode:function(){throw =
Error.notImplemented()},get_statusText:function(){throw =
Error.notImplemented()},get_xml:function(){throw =
Error.notImplemented()},get_object:function(){if(!this._resultObject)this=
._resultObject=3DSys.Serialization.JavaScriptSerializer.deserialize(this.=
get_responseData());return =
this._resultObject},executeRequest:function(){throw =
Error.notImplemented()},abort:function(){throw =
Error.notImplemented()},getResponseHeader:function(){throw =
Error.notImplemented()},getAllResponseHeaders:function(){throw =
Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass("Sys.Ne=
t.WebRequestExecutor");window.XMLDOM=3Dfunction(d){if(!window.DOMParser){=
var c=3D["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var =
b=3D0;b<c.length;b++)try{var a=3Dnew =
ActiveXObject(c[b]);a.async=3Dfalse;a.loadXML(d);a.setProperty("Selection=
Language","XPath");return a}catch(f){}return null}else try{var e=3Dnew =
window.DOMParser;return e.parseFromString(d,"text/xml")}catch(f){return =
null}return =
null};Sys.Net.XMLHttpExecutor=3Dfunction(){Sys.Net.XMLHttpExecutor.initia=
lizeBase(this);var =
a=3Dthis;this._xmlHttpRequest=3Dnull;this._webRequest=3Dnull;this._respon=
seAvailable=3Dfalse;this._timedOut=3Dfalse;this._timer=3Dnull;this._abort=
ed=3Dfalse;this._started=3Dfalse;this._onReadyStateChange=3Dfunction(){if=
(a._xmlHttpRequest.readyState=3D=3D=3D4){a._clearTimer();a._responseAvail=
able=3Dtrue;a._webRequest.completed(Sys.EventArgs.Empty);if(a._xmlHttpReq=
uest!=3Dnull){a._xmlHttpRequest.onreadystatechange=3DFunction.emptyMethod=
;a._xmlHttpRequest=3Dnull}}};this._clearTimer=3Dfunction(){if(a._timer!=3D=
null){window.clearTimeout(a._timer);a._timer=3Dnull}};this._onTimeout=3Df=
unction(){if(!a._responseAvailable){a._clearTimer();a._timedOut=3Dtrue;a.=
_xmlHttpRequest.onreadystatechange=3DFunction.emptyMethod;a._xmlHttpReque=
st.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=
=3Dnull}}};Sys.Net.XMLHttpExecutor.prototype=3D{get_timedOut:function(){r=
eturn this._timedOut},get_started:function(){return =
this._started},get_responseAvailable:function(){return =
this._responseAvailable},get_aborted:function(){return =
this._aborted},executeRequest:function(){this._webRequest=3Dthis.get_webR=
equest();var =
c=3Dthis._webRequest.get_body(),a=3Dthis._webRequest.get_headers();this._=
xmlHttpRequest=3Dnew =
XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=3Dthis._onReadySta=
teChange;var =
e=3Dthis._webRequest.get_httpVerb();this._xmlHttpRequest.open(e,this._web=
Request.getResolvedUrl(),true);if(a)for(var b in a){var =
f=3Da[b];if(typeof =
f!=3D=3D"function")this._xmlHttpRequest.setRequestHeader(b,f)}if(e.toLowe=
rCase()=3D=3D=3D"post"){if(a=3D=3D=3Dnull||!a["Content-Type"])this._xmlHt=
tpRequest.setRequestHeader("Content-Type","application/x-www-form-urlenco=
ded");if(!c)c=3D""}var =
d=3Dthis._webRequest.get_timeout();if(d>0)this._timer=3Dwindow.setTimeout=
(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.se=
nd(c);this._started=3Dtrue},getResponseHeader:function(b){var =
a;try{a=3Dthis._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a=3D"=
";return a},getAllResponseHeaders:function(){return =
this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function()=
{return =
this._xmlHttpRequest.responseText},get_statusCode:function(){return =
this._xmlHttpRequest.status},get_statusText:function(){return =
this._xmlHttpRequest.statusText},get_xml:function(){var =
a=3Dthis._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=3Dnew =
XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)retur=
n null}else =
if(navigator.userAgent.indexOf("MSIE")!=3D=3D-1)a.setProperty("SelectionL=
anguage","XPath");if(a.documentElement.namespaceURI=3D=3D=3D"http://www.m=
ozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName=3D=3D=
=3D"parsererror")return =
null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagNam=
e=3D=3D=3D"parsererror")return null;return =
a},abort:function(){if(this._aborted||this._responseAvailable||this._time=
dOut)return;this._aborted=3Dtrue;this._clearTimer();if(this._xmlHttpReque=
st&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=3DF=
unction.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=3Dn=
ull;var =
a=3Dthis._webRequest._get_eventHandlerList().getHandler("completed");if(a=
)a(this,Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sy=
s.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestMan=
ager=3Dfunction(){this._this=3Dthis;this._defaultTimeout=3D0;this._defaul=
tExecutorType=3D"Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.pro=
totype=3D{add_invokingRequest:function(a){this._get_eventHandlerList().ad=
dHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._g=
et_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRe=
quest:function(a){this._get_eventHandlerList().addHandler("completedReque=
st",a)},remove_completedRequest:function(a){this._get_eventHandlerList().=
removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(=
!this._events)this._events=3Dnew Sys.EventHandlerList;return =
this._events},get_defaultTimeout:function(){return =
this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=
=3Da},get_defaultExecutorType:function(){return =
this._defaultExecutorType},set_defaultExecutorType:function(a){this._defa=
ultExecutorType=3Da},executeRequest:function(webRequest){var =
executor=3DwebRequest.get_executor();if(!executor){var =
failed=3Dfalse;try{var =
executorType=3Deval(this._defaultExecutorType);executor=3Dnew =
executorType}catch(a){failed=3Dtrue}webRequest.set_executor(executor)}if(=
executor.get_aborted())return;var evArgs=3Dnew =
Sys.Net.NetworkRequestEventArgs(webRequest),handler=3Dthis._get_eventHand=
lerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);i=
f(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestMan=
ager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManage=
r=3Dnew =
Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=3Dfunction(a){=
Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=3Da=
};Sys.Net.NetworkRequestEventArgs.prototype=3D{get_webRequest:function(){=
return =
this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net=
.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=3Dfunct=
ion(){this._url=3D"";this._headers=3D{};this._body=3Dnull;this._userConte=
xt=3Dnull;this._httpVerb=3Dnull;this._executor=3Dnull;this._invokeCalled=3D=
false;this._timeout=3D0};Sys.Net.WebRequest.prototype=3D{add_completed:fu=
nction(a){this._get_eventHandlerList().addHandler("completed",a)},remove_=
completed:function(a){this._get_eventHandlerList().removeHandler("complet=
ed",a)},completed:function(b){var =
a=3DSys.Net.WebRequestManager._get_eventHandlerList().getHandler("complet=
edRequest");if(a)a(this._executor,b);a=3Dthis._get_eventHandlerList().get=
Handler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:func=
tion(){if(!this._events)this._events=3Dnew Sys.EventHandlerList;return =
this._events},get_url:function(){return =
this._url},set_url:function(a){this._url=3Da},get_headers:function(){retu=
rn =
this._headers},get_httpVerb:function(){if(this._httpVerb=3D=3D=3Dnull){if=
(this._body=3D=3D=3Dnull)return "GET";return "POST"}return =
this._httpVerb},set_httpVerb:function(a){this._httpVerb=3Da},get_body:fun=
ction(){return =
this._body},set_body:function(a){this._body=3Da},get_userContext:function=
(){return =
this._userContext},set_userContext:function(a){this._userContext=3Da},get=
_executor:function(){return =
this._executor},set_executor:function(a){this._executor=3Da;this._executo=
r._set_webRequest(this)},get_timeout:function(){if(this._timeout=3D=3D=3D=
0)return Sys.Net.WebRequestManager.get_defaultTimeout();return =
this._timeout},set_timeout:function(a){this._timeout=3Da},getResolvedUrl:=
function(){return =
Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebR=
equestManager.executeRequest(this);this._invokeCalled=3Dtrue}};Sys.Net.We=
bRequest._resolveUrl=3Dfunction(b,a){if(b&&b.indexOf("://")!=3D=3D-1)retu=
rn b;if(!a||a.length=3D=3D=3D0){var =
c=3Ddocument.getElementsByTagName("base")[0];if(c&&c.href&&c.href.length>=
0)a=3Dc.href;else a=3Ddocument.URL}var =
d=3Da.indexOf("?");if(d!=3D=3D-1)a=3Da.substr(0,d);a=3Da.substr(0,a.lastI=
ndexOf("/")+1);if(!b||b.length=3D=3D=3D0)return =
a;if(b.charAt(0)=3D=3D=3D"/"){var =
e=3Da.indexOf("://"),g=3Da.indexOf("/",e+3);return =
a.substr(0,g)+b}else{var f=3Da.lastIndexOf("/");return =
a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=3Dfunction(d,b)=
{if(!b)b=3DencodeURIComponent;var a=3Dnew =
Sys.StringBuilder,f=3D0;for(var c in d){var e=3Dd[c];if(typeof =
e=3D=3D=3D"function")continue;var =
g=3DSys.Serialization.JavaScriptSerializer.serialize(e);if(f!=3D=3D0)a.ap=
pend("&");a.append(c);a.append("=3D");a.append(b(g));f++}return =
a.toString()};Sys.Net.WebRequest._createUrl=3Dfunction(a,b){if(!b)return =
a;var d=3DSys.Net.WebRequest._createQueryString(b);if(d.length>0){var =
c=3D"?";if(a&&a.indexOf("?")!=3D=3D-1)c=3D"&";return a+c+d}else return =
a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServ=
iceProxy=3Dfunction(){};Sys.Net.WebServiceProxy.prototype=3D{set_timeout:=
function(a){this._timeout=3Da},get_timeout:function(){return =
this._timeout},set_defaultUserContext:function(a){this._userContext=3Da},=
get_defaultUserContext:function(){return =
this._userContext},set_defaultSucceededCallback:function(a){this._succeed=
ed=3Da},get_defaultSucceededCallback:function(){return =
this._succeeded},set_defaultFailedCallback:function(a){this._failed=3Da},=
get_defaultFailedCallback:function(){return =
this._failed},set_path:function(a){this._path=3Da},get_path:function(){re=
turn =
this._path},_invoke:function(d,e,g,f,c,b,a){if(c=3D=3D=3Dnull||typeof =
c=3D=3D=3D"undefined")c=3Dthis.get_defaultSucceededCallback();if(b=3D=3D=3D=
null||typeof =
b=3D=3D=3D"undefined")b=3Dthis.get_defaultFailedCallback();if(a=3D=3D=3Dn=
ull||typeof =
a=3D=3D=3D"undefined")a=3Dthis.get_defaultUserContext();return =
Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout())}};Sys.Ne=
t.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebSer=
viceProxy.invoke=3Dfunction(k,a,j,d,i,c,f,h){var b=3Dnew =
Sys.Net.WebRequest;b.get_headers()["Content-Type"]=3D"application/json; =
charset=3Dutf-8";if(!d)d=3D{};var =
g=3Dd;if(!j||!g)g=3D{};b.set_url(Sys.Net.WebRequest._createUrl(k+"/"+a,g)=
);var =
e=3Dnull;if(!j){e=3DSys.Serialization.JavaScriptSerializer.serialize(d);i=
f(e=3D=3D=3D"{}")e=3D""}b.set_body(e);b.add_completed(l);if(h&&h>0)b.set_=
timeout(h);b.invoke();function l(d){if(d.get_responseAvailable()){var =
e=3Dd.get_statusCode(),b=3Dnull;try{var =
j=3Dd.getResponseHeader("Content-Type");if(j.startsWith("application/json=
"))b=3Dd.get_object();else =
if(j.startsWith("text/xml"))b=3Dd.get_xml();else =
b=3Dd.get_responseData()}catch(m){}var =
k=3Dd.getResponseHeader("jsonerror"),g=3Dk=3D=3D=3D"true";if(g)b=3Dnew =
Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType);if(=
e<200||e>=3D300||g){if(c){if(!b||!g)b=3Dnew =
Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg=
,a),"","");b._statusCode=3De;c(b,f,a)}}else if(i)i(b,f,a)}else{var =
h;if(d.get_timedOut())h=3DString.format(Sys.Res.webServiceTimedOut,a);els=
e h=3DString.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new =
Sys.Net.WebServiceError(d.get_timedOut(),h,"",""),f,a)}}return =
b};Sys.Net.WebServiceProxy._generateTypedConstructor=3Dfunction(a){return=
 function(b){if(b)for(var c in =
b)this[c]=3Db[c];this.__type=3Da}};Sys.Net.WebServiceError=3Dfunction(c,d=
,b,a){this._timedOut=3Dc;this._message=3Dd;this._stackTrace=3Db;this._exc=
eptionType=3Da;this._statusCode=3D-1};Sys.Net.WebServiceError.prototype=3D=
{get_timedOut:function(){return =
this._timedOut},get_statusCode:function(){return =
this._statusCode},get_message:function(){return =
this._message},get_stackTrace:function(){return =
this._stackTrace},get_exceptionType:function(){return =
this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebS=
erviceError");Type.registerNamespace("Sys.Services");Sys.Services._Profil=
eService=3Dfunction(){Sys.Services._ProfileService.initializeBase(this);t=
his.properties=3D{}};Sys.Services._ProfileService.DefaultWebServicePath=3D=
"";Sys.Services._ProfileService.prototype=3D{_defaultFailedCallback:null,=
_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_pa=
th:"",_timeout:0,get_defaultFailedCallback:function(){return =
this._defaultFailedCallback},set_defaultFailedCallback:function(a){this._=
defaultFailedCallback=3Da},get_defaultLoadCompletedCallback:function(){re=
turn =
this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:func=
tion(a){this._defaultLoadCompletedCallback=3Da},get_defaultSaveCompletedC=
allback:function(){return =
this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:func=
tion(a){this._defaultSaveCompletedCallback=3Da},get_path:function(){retur=
n =
this._path},set_path:function(a){if(!a||!a.length)a=3D"";this._path=3Da},=
get_timeout:function(){return =
this._timeout},set_timeout:function(a){this._timeout=3Da},load:function(b=
,d,e,f){var =
c=3D{},a;if(!b)a=3D"GetAllPropertiesForCurrentUser";else{a=3D"GetProperti=
esForCurrentUser";c=3D{properties:this._clonePropertyNames(b)}}this._invo=
ke(this._get_path(),a,false,c,Function.createDelegate(this,this._onLoadCo=
mplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:f=
unction(d,a,c,e){var =
b=3Dthis._flattenProperties(d,this.properties);this._invoke(this._get_pat=
h(),"SetPropertiesForCurrentUser",false,{values:b},Function.createDelegat=
e(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFai=
led),[a,c,e])},_clonePropertyNames:function(e){var c=3D[],d=3D{};for(var =
b=3D0;b<e.length;b++){var =
a=3De[b];if(!d[a]){Array.add(c,a);d[a]=3Dtrue}}return =
c},_flattenProperties:function(a,h,i){var =
b=3D{},e,d;if(a&&a.length=3D=3D=3D0)return b;for(var c in =
h){e=3Dh[c];d=3Di?i+"."+c:c;if(Sys.Services.ProfileGroup.isInstanceOfType=
(e)){var g=3Dthis._flattenProperties(a,e,d);for(var f in g){var =
j=3Dg[f];b[f]=3Dj}}else =
if(!a||Array.indexOf(a,d)!=3D=3D-1)b[d]=3De}return =
b},_get_path:function(){var =
a=3Dthis.get_path();if(!a.length)a=3DSys.Services._ProfileService.Default=
WebServicePath;if(!a||!a.length)throw =
Error.invalidOperation(Sys.Res.servicePathNotSet);return =
a},_onLoadComplete:function(a,f,g){if(typeof a!=3D=3D"object")throw =
Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,=
g,"Object"));var d=3Dthis._unflattenProperties(a);for(var b in =
d)this.properties[b]=3Dd[b];var =
c=3Df[0],e=3Dc?c:this._defaultLoadCompletedCallback;if(e)e(a.length,f[2],=
"Sys.Services.ProfileService.load")},_onLoadFailed:function(d,c){var =
a=3Dc[1],b=3Da?a:this._defaultFailedCallback;if(b)b(d,c[2],"Sys.Services.=
ProfileService.load")},_onSaveComplete:function(d,c,f){if(typeof =
d!=3D=3D"number")throw =
Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,=
f,"Number"));var =
a=3Dc[0],e=3Dc[2],b=3Da?a:this._defaultSaveCompletedCallback;if(b)b(d,e,"=
Sys.Services.ProfileService.save")},_onSaveFailed:function(e,c){var =
a=3Dc[1],d=3Dc[2],b=3Da?a:this._defaultFailedCallback;if(b)b(e,d,"Sys.Ser=
vices.ProfileService.save")},_unflattenProperties:function(e){var =
c=3D{},d,f,h=3D0;for(var a in =
e){h++;f=3De[a];d=3Da.indexOf(".");if(d!=3D=3D-1){var =
g=3Da.substr(0,d);a=3Da.substr(d+1);var =
b=3Dc[g];if(!b||!Sys.Services.ProfileGroup.isInstanceOfType(b)){b=3Dnew =
Sys.Services.ProfileGroup;c[g]=3Db}b[a]=3Df}else =
c[a]=3Df}e.length=3Dh;return =
c}};Sys.Services._ProfileService.registerClass("Sys.Services._ProfileServ=
ice",Sys.Net.WebServiceProxy);Sys.Services.ProfileService=3Dnew =
Sys.Services._ProfileService;Sys.Services.ProfileGroup=3Dfunction(a){if(a=
)for(var b in =
a)this[b]=3Da[b]};Sys.Services.ProfileGroup.registerClass("Sys.Services.P=
rofileGroup");Sys.Services._AuthenticationService=3Dfunction(){Sys.Servic=
es._AuthenticationService.initializeBase(this)};Sys.Services._Authenticat=
ionService.DefaultWebServicePath=3D"";Sys.Services._AuthenticationService=
.prototype=3D{_defaultFailedCallback:null,_defaultLoginCompletedCallback:=
null,_defaultLogoutCompletedCallback:null,_path:"",_timeout:0,_authentica=
ted:false,get_defaultFailedCallback:function(){return =
this._defaultFailedCallback},set_defaultFailedCallback:function(a){this._=
defaultFailedCallback=3Da},get_defaultLoginCompletedCallback:function(){r=
eturn =
this._defaultLoginCompletedCallback},set_defaultLoginCompletedCallback:fu=
nction(a){this._defaultLoginCompletedCallback=3Da},get_defaultLogoutCompl=
etedCallback:function(){return =
this._defaultLogoutCompletedCallback},set_defaultLogoutCompletedCallback:=
function(a){this._defaultLogoutCompletedCallback=3Da},get_isLoggedIn:func=
tion(){return this._authenticated},get_path:function(){return =
this._path},set_path:function(a){if(!a||!a.length)a=3D"";this._path=3Da},=
get_timeout:function(){return =
this._timeout},set_timeout:function(a){this._timeout=3Da},login:function(=
c,b,a,h,f,d,e,g){this._invoke(this._get_path(),"Login",false,{userName:c,=
password:b,createPersistentCookie:a},Function.createDelegate(this,this._o=
nLoginComplete),Function.createDelegate(this,this._onLoginFailed),[c,b,a,=
f,d,e,g])},logout:function(c,a,b,d){this._invoke(this._get_path(),"Logout=
",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.=
createDelegate(this,this._onLogoutFailed),[c,a,b,d])},_get_path:function(=
){var =
a=3Dthis.get_path();if(!a.length)a=3DSys.Services._AuthenticationService.=
DefaultWebServicePath;if(!a||!a.length)throw =
Error.invalidOperation(Sys.Res.servicePathNotSet);return =
a},_onLoginComplete:function(f,c,g){if(typeof f!=3D=3D"boolean")throw =
Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,=
g,"Boolean"));var =
b=3Dc[3],d=3Dc[4],e=3Dc[6],a=3Dd?d:this._defaultLoginCompletedCallback;if=
(f){this._authenticated=3Dtrue;if(a)a(true,e,"Sys.Services.Authentication=
Service.login");if(typeof =
b!=3D=3D"undefined"&&b!=3D=3Dnull)window.location.href=3Db}else =
if(a)a(false,e,"Sys.Services.AuthenticationService.login")},_onLoginFaile=
d:function(d,c){var =
a=3Dc[5],b=3Da?a:this._defaultFailedCallback;if(b)b(d,c[6],"Sys.Services.=
AuthenticationService.login")},_onLogoutComplete:function(g,a,f){if(g!=3D=
=3Dnull)throw =
Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,=
f,"null"));var =
c=3Da[0],b=3Da[1],e=3Da[3],d=3Db?b:this._defaultLogoutCompletedCallback;t=
his._authenticated=3Dfalse;if(d)d(null,e,"Sys.Services.AuthenticationServ=
ice.logout");if(!c)window.location.reload();else =
window.location.href=3Dc},_onLogoutFailed:function(d,c){var =
a=3Dc[2],b=3Da?a:this._defaultFailedCallback;if(b)b(d,c[3],"Sys.Services.=
AuthenticationService.logout")},_setAuthenticated:function(a){this._authe=
nticated=3Da}};Sys.Services._AuthenticationService.registerClass("Sys.Ser=
vices._AuthenticationService",Sys.Net.WebServiceProxy);Sys.Services.Authe=
nticationService=3Dnew =
Sys.Services._AuthenticationService;Type.registerNamespace("Sys.Serializa=
tion");Sys.Serialization.JavaScriptSerializer=3Dfunction(){};Sys.Serializ=
ation.JavaScriptSerializer.registerClass("Sys.Serialization.JavaScriptSer=
ializer");Sys.Serialization.JavaScriptSerializer._stringRegEx=3Dnew =
RegExp('["\b\f\n\r\t\\\\\x00-\x1F]',"i");Sys.Serialization.JavaScriptSeri=
alizer._serializeWithBuilder=3Dfunction(b,a,h){var c;switch(typeof =
b){case =
"object":if(b)if(Array.isInstanceOfType(b)){a.append("[");for(c=3D0;c<b.l=
ength;++c){if(c>0)a.append(",");Sys.Serialization.JavaScriptSerializer._s=
erializeWithBuilder(b[c],a)}a.append("]")}else{if(Date.isInstanceOfType(b=
)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}va=
r e=3D[],i=3D0;for(var g in =
b){if(g.startsWith("$"))continue;e[i++]=3Dg}if(h)e.sort();a.append("{");v=
ar j=3Dfalse;for(c=3D0;c<i;c++){var f=3Db[e[c]];if(typeof =
f!=3D=3D"undefined"&&typeof f!=3D=3D"function"){if(j)a.append(",");else =
j=3Dtrue;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(e[c=
],a,h);a.append(":");Sys.Serialization.JavaScriptSerializer._serializeWit=
hBuilder(f,a,h)}}a.append("}")}else a.append("null");break;case =
"number":if(isFinite(b))a.append(String(b));else throw =
Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers);break;cas=
e =
"string":a.append('"');if(Sys.Browser.agent=3D=3D=3DSys.Browser.Safari||S=
ys.Serialization.JavaScriptSerializer._stringRegEx.test(b)){var =
k=3Db.length;for(c=3D0;c<k;++c){var d=3Db.charAt(c);if(d>=3D" =
"){if(d=3D=3D=3D"\\"||d=3D=3D=3D'"')a.append("\\");a.append(d)}else =
switch(d){case "\b":a.append("\\b");break;case =
"\f":a.append("\\f");break;case "\n":a.append("\\n");break;case =
"\r":a.append("\\r");break;case =
"\t":a.append("\\t");break;default:a.append("\\u00");if(d.charCodeAt()<16=
)a.append("0");a.append(d.charCodeAt().toString(16))}}}else =
a.append(b);a.append('"');break;case =
"boolean":a.append(b.toString());break;default:a.append("null");break}};S=
ys.Serialization.JavaScriptSerializer.serialize=3Dfunction(b){var =
a=3Dnew =
Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBu=
ilder(b,a,false);return =
a.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=3Dfuncti=
on(data){if(data.length=3D=3D=3D0)throw =
Error.argument("data",Sys.Res.cannotDeserializeEmptyString);try{var =
exp=3Ddata.replace(new =
RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)\\)\\\\/\\"',"g"),"$1new =
Date($2)");return eval("("+exp+")")}catch(a){throw =
Error.argument("data",Sys.Res.cannotDeserializeInvalidJson)}};Sys.Culture=
Info=3Dfunction(c,b,a){this.name=3Dc;this.numberFormat=3Db;this.dateTimeF=
ormat=3Da};Sys.CultureInfo.prototype=3D{_getDateTimeFormats:function(){if=
(!this._dateTimeFormats){var =
a=3Dthis.dateTimeFormat;this._dateTimeFormats=3D[a.MonthDayPattern,a.Year=
MonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.Lo=
ngTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePa=
ttern,a.UniversalSortableDateTimePattern]}return =
this._dateTimeFormats},_getMonthIndex:function(a){if(!this._upperMonths)t=
his._upperMonths=3Dthis._toUpperArray(this.dateTimeFormat.MonthNames);ret=
urn =
Array.indexOf(this._upperMonths,this._toUpper(a))},_getAbbrMonthIndex:fun=
ction(a){if(!this._upperAbbrMonths)this._upperAbbrMonths=3Dthis._toUpperA=
rray(this.dateTimeFormat.AbbreviatedMonthNames);return =
Array.indexOf(this._upperMonths,this._toUpper(a))},_getDayIndex:function(=
a){if(!this._upperDays)this._upperDays=3Dthis._toUpperArray(this.dateTime=
Format.DayNames);return =
Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:functio=
n(a){if(!this._upperAbbrDays)this._upperAbbrDays=3Dthis._toUpperArray(thi=
s.dateTimeFormat.AbbreviatedDayNames);return =
Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:functi=
on(c){var b=3D[];for(var =
a=3D0,d=3Dc.length;a<d;a++)b[a]=3Dthis._toUpper(c[a]);return =
b},_toUpper:function(a){return a.split("\u00A0").join(" =
").toUpperCase()}};Sys.CultureInfo._parse=3Dfunction(b){var =
a=3DSys.Serialization.JavaScriptSerializer.deserialize(b);return new =
Sys.CultureInfo(a.name,a.numberFormat,a.dateTimeFormat)};Sys.CultureInfo.=
registerClass("Sys.CultureInfo");Sys.CultureInfo.InvariantCulture=3DSys.C=
ultureInfo._parse('{"name":"","numberFormat":{"CurrencyDecimalDigits":2,"=
CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],=
"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":"=
,","CurrencySymbol":"\u00A4","NaNSymbol":"NaN","CurrencyNegativePattern":=
0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePa=
ttern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberD=
ecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","=
CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveS=
ign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentG=
roupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeD=
igits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"=
dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"=
@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmT=
ype":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":tr=
ue},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDate=
TimePattern":"dddd, dd MMMM yyyy HH:mm:ss","LongDatePattern":"dddd, dd =
MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"MMMM =
dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy =
HH\':\'mm\':\'ss =
\'GMT\'","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"HH:mm","Sort=
ableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSepar=
ator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd =
HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"yyyy =
MMMM","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"=
ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunda=
y","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"Abbrev=
iatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","=
Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","=
May","June","July","August","September","October","November","December","=
"],"IsReadOnly":true,"NativeCalendarName":"Gregorian =
Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May",=
"Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["Janu=
ary","February","March","April","May","June","July","August","September",=
"October","November","December",""]}}');if(typeof =
__cultureInfo=3D=3D=3D"undefined")var =
__cultureInfo=3D'{"name":"en-US","numberFormat":{"CurrencyDecimalDigits":=
2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":=
[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparato=
r":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0=
,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePat=
tern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDe=
cimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","C=
urrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSi=
gn":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGr=
oupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDi=
gits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"d=
ateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@=
-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmTy=
pe":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":fal=
se},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDate=
TimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, =
MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM =
dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy =
HH\':\'mm\':\'ss =
\'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm =
tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","=
TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd=
 HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, =
yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"=
ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunda=
y","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"Abbrev=
iatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","=
Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","=
May","June","July","August","September","October","November","December","=
"],"IsReadOnly":false,"NativeCalendarName":"Gregorian =
Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May",=
"Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["Janu=
ary","February","March","April","May","June","July","August","September",=
"October","November","December",""]}}';Sys.CultureInfo.CurrentCulture=3DS=
ys.CultureInfo._parse(__cultureInfo);delete =
__cultureInfo;Sys.UI.Point=3Dfunction(a,b){this.x=3Da;this.y=3Db};Sys.UI.=
Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=3Dfunction(c,d,b,a){thi=
s.x=3Dc;this.y=3Dd;this.height=3Da;this.width=3Db};Sys.UI.Bounds.register=
Class("Sys.UI.Bounds");Sys.UI.DomElement=3Dfunction(){};Sys.UI.DomElement=
.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=3Dfunct=
ion(a,b){if(!Sys.UI.DomElement.containsCssClass(a,b))if(a.className=3D=3D=
=3D"")a.className=3Db;else a.className+=3D" =
"+b};Sys.UI.DomElement.containsCssClass=3Dfunction(b,a){return =
Array.contains(b.className.split(" =
"),a)};Sys.UI.DomElement.getBounds=3Dfunction(a){var =
b=3DSys.UI.DomElement.getLocation(a);return new =
Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0)};var =
$get=3DSys.UI.DomElement.getElementById=3Dfunction(f,e){if(!e)return =
document.getElementById(f);if(e.getElementById)return =
e.getElementById(f);var c=3D[],d=3De.childNodes;for(var =
b=3D0;b<d.length;b++){var =
a=3Dd[b];if(a.nodeType=3D=3D1)c[c.length]=3Da}while(c.length){a=3Dc.shift=
();if(a.id=3D=3Df)return =
a;d=3Da.childNodes;for(b=3D0;b<d.length;b++){a=3Dd[b];if(a.nodeType=3D=3D=
1)c[c.length]=3Da}}return null};switch(Sys.Browser.agent){case =
Sys.Browser.InternetExplorer:Sys.UI.DomElement.getLocation=3Dfunction =
Sys$UI$DomElement$getLocation(a){if(a.self||a.nodeType=3D=3D=3D9)return =
new Sys.UI.Point(0,0);var d=3Da.getClientRects();if(!d||!d.length)return =
new Sys.UI.Point(0,0);var =
e=3Da.ownerDocument.parentWindow,g=3De.screenLeft-top.screenLeft-top.docu=
ment.documentElement.scrollLeft+2,h=3De.screenTop-top.screenTop-top.docum=
ent.documentElement.scrollTop+2,c=3De.frameElement||null;if(c){var =
b=3Dc.currentStyle;g+=3D(c.frameBorder||1)*2+(parseInt(b.paddingLeft)||0)=
+(parseInt(b.borderLeftWidth)||0)-a.ownerDocument.documentElement.scrollL=
eft;h+=3D(c.frameBorder||1)*2+(parseInt(b.paddingTop)||0)+(parseInt(b.bor=
derTopWidth)||0)-a.ownerDocument.documentElement.scrollTop}var =
f=3Dd[0];return new Sys.UI.Point(f.left-g,f.top-h)};break;case =
Sys.Browser.Safari:Sys.UI.DomElement.getLocation=3Dfunction(c){if(c.windo=
w&&c.window=3D=3D=3Dc||c.nodeType=3D=3D=3D9)return new =
Sys.UI.Point(0,0);var g=3D0,h=3D0,j=3Dnull,f=3Dnull,b;for(var =
a=3Dc;a;j=3Da,(f=3Db,a=3Da.offsetParent)){b=3DSys.UI.DomElement._getCurre=
ntStyle(a);var =
e=3Da.tagName;if((a.offsetLeft||a.offsetTop)&&(e!=3D=3D"BODY"||(!f||f.pos=
ition!=3D=3D"absolute"))){g+=3Da.offsetLeft;h+=3Da.offsetTop}}b=3DSys.UI.=
DomElement._getCurrentStyle(c);var =
d=3Db?b.position:null,k=3Dd&&d!=3D=3D"static";if(!d||d!=3D=3D"absolute")f=
or(var =
a=3Dc.parentNode;a;a=3Da.parentNode){e=3Da.tagName;if(e!=3D=3D"BODY"&&e!=3D=
=3D"HTML"&&(a.scrollLeft||a.scrollTop)){g-=3Da.scrollLeft||0;h-=3Da.scrol=
lTop||0}b=3DSys.UI.DomElement._getCurrentStyle(a);var =
i=3Db?b.position:null;if(i&&i=3D=3D=3D"absolute")break}return new =
Sys.UI.Point(g,h)};break;case =
Sys.Browser.Opera:Sys.UI.DomElement.getLocation=3Dfunction(b){if(b.window=
&&b.window=3D=3D=3Db||b.nodeType=3D=3D=3D9)return new =
Sys.UI.Point(0,0);var d=3D0,e=3D0,i=3Dnull;for(var =
a=3Db;a;i=3Da,a=3Da.offsetParent){var =
f=3Da.tagName;d+=3Da.offsetLeft||0;e+=3Da.offsetTop||0}var =
g=3Db.style.position,c=3Dg&&g!=3D=3D"static";for(var =
a=3Db.parentNode;a;a=3Da.parentNode){f=3Da.tagName;if(f!=3D=3D"BODY"&&f!=3D=
=3D"HTML"&&(a.scrollLeft||a.scrollTop)&&(c&&(a.style.overflow=3D=3D=3D"sc=
roll"||a.style.overflow=3D=3D=3D"auto"))){d-=3Da.scrollLeft||0;e-=3Da.scr=
ollTop||0}var =
h=3Da&&a.style?a.style.position:null;c=3Dc||h&&h!=3D=3D"static"}return =
new =
Sys.UI.Point(d,e)};break;default:Sys.UI.DomElement.getLocation=3Dfunction=
(d){if(d.window&&d.window=3D=3D=3Dd||d.nodeType=3D=3D=3D9)return new =
Sys.UI.Point(0,0);var e=3D0,f=3D0,i=3Dnull,h=3Dnull,b=3Dnull;for(var =
a=3Dd;a;i=3Da,(h=3Db,a=3Da.offsetParent)){var =
c=3Da.tagName;b=3DSys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft|=
|a.offsetTop)&&!(c=3D=3D=3D"BODY"&&(!h||h.position!=3D=3D"absolute"))){e+=
=3Da.offsetLeft;f+=3Da.offsetTop}if(i!=3D=3Dnull&&b){if(c!=3D=3D"TABLE"&&=
c!=3D=3D"TD"&&c!=3D=3D"HTML"){e+=3DparseInt(b.borderLeftWidth)||0;f+=3Dpa=
rseInt(b.borderTopWidth)||0}if(c=3D=3D=3D"TABLE"&&(b.position=3D=3D=3D"re=
lative"||b.position=3D=3D=3D"absolute")){e+=3DparseInt(b.marginLeft)||0;f=
+=3DparseInt(b.marginTop)||0}}}b=3DSys.UI.DomElement._getCurrentStyle(d);=
var =
g=3Db?b.position:null,j=3Dg&&g!=3D=3D"static";if(!g||g!=3D=3D"absolute")f=
or(var =
a=3Dd.parentNode;a;a=3Da.parentNode){c=3Da.tagName;if(c!=3D=3D"BODY"&&c!=3D=
=3D"HTML"&&(a.scrollLeft||a.scrollTop)){e-=3Da.scrollLeft||0;f-=3Da.scrol=
lTop||0;b=3DSys.UI.DomElement._getCurrentStyle(a);e+=3DparseInt(b.borderL=
eftWidth)||0;f+=3DparseInt(b.borderTopWidth)||0}}return new =
Sys.UI.Point(e,f)};break}Sys.UI.DomElement.removeCssClass=3Dfunction(d,c)=
{var a=3D" "+d.className+" ",b=3Da.indexOf(" "+c+" =
");if(b>=3D0)d.className=3D(a.substr(0,b)+" =
"+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.setLocati=
on=3Dfunction(b,c,d){var =
a=3Db.style;a.position=3D"absolute";a.left=3Dc+"px";a.top=3Dd+"px"};Sys.U=
I.DomElement.toggleCssClass=3Dfunction(b,a){if(Sys.UI.DomElement.contains=
CssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else =
Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement._getCurrentStyle=3D=
function(a){var =
b=3D(a.ownerDocument?a.ownerDocument:a.documentElement).defaultView;retur=
n =
b&&a!=3D=3Db&&b.getComputedStyle?b.getComputedStyle(a,null):a.style};Sys.=
UI.Behavior=3Dfunction(b){Sys.UI.Behavior.initializeBase(this);this._elem=
ent=3Db;var a=3Db._behaviors;if(!a)b._behaviors=3D[this];else =
a[a.length]=3Dthis};Sys.UI.Behavior.prototype=3D{_name:null,get_element:f=
unction(){return this._element},get_id:function(){var =
a=3DSys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return =
a;if(!this._element||!this._element.id)return "";return =
this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)r=
eturn this._name;var =
a=3DObject.getTypeName(this),b=3Da.lastIndexOf(".");if(b!=3D-1)a=3Da.subs=
tr(b+1);if(!this.get_isInitialized())this._name=3Da;return =
a},set_name:function(a){this._name=3Da},initialize:function(){Sys.UI.Beha=
vior.callBaseMethod(this,"initialize");var =
a=3Dthis.get_name();if(a)this._element[a]=3Dthis},dispose:function(){Sys.=
UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var =
a=3Dthis.get_name();if(a)this._element[a]=3Dnull;Array.remove(this._eleme=
nt._behaviors,this);delete =
this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Comp=
onent);Sys.UI.Behavior.getBehaviorByName=3Dfunction(b,c){var =
a=3Db[c];return =
a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehavio=
rs=3Dfunction(a){if(!a._behaviors)return [];return =
Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=3Dfunction(=
d,e){var a=3Dd._behaviors,c=3D[];if(a)for(var =
b=3D0,f=3Da.length;b<f;b++)if(e.isInstanceOfType(a[b]))c[c.length]=3Da[b]=
;return c};Sys.UI.VisibilityMode=3Dfunction(){throw =
Error.notImplemented()};Sys.UI.VisibilityMode.prototype=3D{hide:0,collaps=
e:1};Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode");Sys.UI.C=
ontrol=3Dfunction(a){Sys.UI.Control.initializeBase(this);this._element=3D=
a;a.control=3Dthis;this._oldDisplayMode=3Dthis._element.style.display;if(=
!this._oldDisplayMode||this._oldDisplayMode=3D=3D"none")this._oldDisplayM=
ode=3D""};Sys.UI.Control.prototype=3D{_parent:null,_visibilityMode:Sys.UI=
.VisibilityMode.hide,get_element:function(){return =
this._element},get_id:function(){if(!this._element)return "";return =
this._element.id},set_id:function(){throw =
Error.invalidOperation(Sys.Res.cantSetId)},get_parent:function(){if(this.=
_parent)return this._parent;else{var =
a=3Dthis._element.parentNode;while(a){if(a.control)return =
a.control;a=3Da.parentNode}return =
null}},set_parent:function(a){this._parent=3Da},get_visibilityMode:functi=
on(){return =
this._visibilityMode},set_visibilityMode:function(a){if(this._visibilityM=
ode!=3D=3Da){this._visibilityMode=3Da;if(this.get_visible()=3D=3D=3Dfalse=
)if(this._visibilityMode=3D=3D=3DSys.UI.VisibilityMode.hide)this._element=
.style.display=3Dthis._oldDisplayMode;else =
this._element.style.display=3D"none"}this._visibilityMode=3Da},get_visibl=
e:function(){return =
this._element.style.visibility!=3D"hidden"},set_visible:function(a){if(a!=
=3Dthis.get_visible()){this._element.style.visibility=3Da?"visible":"hidd=
en";if(a||this._visibilityMode=3D=3D=3DSys.UI.VisibilityMode.hide)this._e=
lement.style.display=3Dthis._oldDisplayMode;else =
this._element.style.display=3D"none"}},addCssClass:function(a){Sys.UI.Dom=
Element.addCssClass(this._element,a)},dispose:function(){Sys.UI.Control.c=
allBaseMethod(this,"dispose");if(this._element){this._element.control=3Du=
ndefined;delete =
this._element}},initialize:function(){Sys.UI.Control.callBaseMethod(this,=
"initialize");var a=3Dthis._element},onBubbleEvent:function(){return =
false},raiseBubbleEvent:function(b,c){var =
a=3Dthis.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=3Da.get_p=
arent()}},removeCssClass:function(a){Sys.UI.DomElement.removeCssClass(thi=
s._element,a)},toggleCssClass:function(a){Sys.UI.DomElement.toggleCssClas=
s(this._element,a)}};Sys.UI.Control.registerClass("Sys.UI.Control",Sys.Co=
mponent)
Sys.Res=3D{'argumentInteger':'Value must be an =
integer.','scriptLoadMultipleCallbacks':'The script \'{0}\' contains =
multiple calls to Sys.Application.notifyScriptLoaded(). Only one is =
allowed.','invokeCalledTwice':'Cannot call invoke more than =
once.','webServiceFailed':'The server method \'{0}\' failed with the =
following error: {1}','argumentType':'Object cannot be converted to the =
required type.','argumentNull':'Value cannot be =
null.','controlCantSetId':'The id property can\'t be set on a =
control.','formatBadFormatSpecifier':'Format specifier was =
invalid.','webServiceFailedNoMsg':'The server method \'{0}\' =
failed.','argumentDomElement':'Value must be a DOM =
element.','invalidExecutorType':'Could not create a valid =
Sys.Net.WebRequestExecutor from: =
{0}.','cannotCallBeforeResponse':'Cannot call {0} when responseAvailable =
is false.','actualValue':'Actual value was =
{0}.','enumInvalidValue':'\'{0}\' is not a valid value for enum =
{1}.','scriptLoadFailed':'The script \'{0}\' could not be =
loaded.','parameterCount':'Parameter count =
mismatch.','cannotDeserializeEmptyString':'Cannot deserialize empty =
string.','formatInvalidString':'Input string was not in a correct =
format.','invalidTimeout':'Value must be greater than or equal to =
zero.','cannotAbortBeforeStart':'Cannot abort when executor has not =
started.','argument':'Value does not fall within the expected =
range.','cannotDeserializeInvalidJson':'Cannot deserialize. The data =
does not correspond to valid JSON.','invalidHttpVerb':'httpVerb cannot =
be set to an empty or null string.','nullWebRequest':'Cannot call =
executeRequest with a null webRequest.','eventHandlerInvalid':'Handler =
was not added through the Sys.UI.DomEvent.addHandler =
method.','cannotSerializeNonFiniteNumbers':'Cannot serialize non finite =
numbers.','argumentUndefined':'Value cannot be =
undefined.','webServiceInvalidReturnType':'The server method \'{0}\' =
returned an invalid type. Expected type: {1}','servicePathNotSet':'The =
path to the web service has not been =
set.','argumentTypeWithTypes':'Object of type \'{0}\' cannot be =
converted to type \'{1}\'.','cannotCallOnceStarted':'Cannot call {0} =
once started.','badBaseUrl1':'Base URL does not contain =
://.','badBaseUrl2':'Base URL does not contain another =
/.','badBaseUrl3':'Cannot find last / in base =
URL.','setExecutorAfterActive':'Cannot set executor after it has become =
active.','paramName':'Parameter name: =
{0}','cannotCallOutsideHandler':'Cannot call {0} outside of a completed =
event handler.','format':'One of the identified items was in an invalid =
format.','assertFailedCaller':'Assertion Failed: {0}\r\nat =
{1}','argumentOutOfRange':'Specified argument was out of the range of =
valid values.','webServiceTimedOut':'The server method \'{0}\' timed =
out.','notImplemented':'The method or operation is not =
implemented.','assertFailed':'Assertion Failed: =
{0}','invalidOperation':'Operation is not valid due to the current state =
of the object.','breakIntoDebugger':'{0}\r\n\r\nBreak into debugger?'};
if(typeof(Sys)!=3D=3D'undefined')Sys.Application.notifyScriptLoaded();

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Silverlight.js

=EF=BB=BFif (!window.Silverlight)
{
    window.Silverlight =3D { };
}

// Silverlight control instance counter for memory mgt
Silverlight._silverlightCount =3D 0;
Silverlight.fwlinkRoot=3D'http://go2.microsoft.com/fwlink/?LinkID=3D'; =20
Silverlight.onGetSilverlight =3D null;
Silverlight.onSilverlightInstalled =3D function () =
{window.location.reload(false);};

//////////////////////////////////////////////////////////////////
// isInstalled, checks to see if the correct version is installed
//////////////////////////////////////////////////////////////////
Silverlight.isInstalled =3D function(version)
{
    var isVersionSupported=3Dfalse;
    var container =3D null;
   =20
    try=20
    {
        var control =3D null;
       =20
        try
        {
            control =3D new ActiveXObject('AgControl.AgControl');
            if ( version =3D=3D null )
            {
                isVersionSupported =3D true;
            }
            else if ( control.IsVersionSupported(version) )
            {
                isVersionSupported =3D true;
            }
            control =3D null;
        }
        catch (e)
        {
            var plugin =3D navigator.plugins["Silverlight Plug-In"] ;
            if ( plugin )
            {
                if ( version =3D=3D=3D null )
                {
                    isVersionSupported =3D true;
                }
                else
                {
                    var actualVer =3D plugin.description;
                    if ( actualVer =3D=3D=3D "1.0.30226.2")
                        actualVer =3D "2.0.30226.2";
                    var actualVerArray =3DactualVer.split(".");
                    while ( actualVerArray.length > 3)
                    {
                        actualVerArray.pop();
                    }
                    while ( actualVerArray.length < 4)
                    {
                        actualVerArray.push(0);
                    }
                    var reqVerArray =3D version.split(".");
                    while ( reqVerArray.length > 4)
                    {
                        reqVerArray.pop();
                    }
                   =20
                    var requiredVersionPart ;
                    var actualVersionPart
                    var index =3D 0;
                   =20
                   =20
                    do
                    {
                        requiredVersionPart =3D =
parseInt(reqVerArray[index]);
                        actualVersionPart =3D =
parseInt(actualVerArray[index]);
                        index++;
                    }
                    while (index < reqVerArray.length && =
requiredVersionPart =3D=3D=3D actualVersionPart);
                   =20
                    if ( requiredVersionPart <=3D actualVersionPart && =
!isNaN(requiredVersionPart) )
                    {
                        isVersionSupported =3D true;
                    }
                }
            }
        }
    }
    catch (e)=20
    {
        isVersionSupported =3D false;
    }
    if (container)=20
    {
        document.body.removeChild(container);
    }
   =20
    return isVersionSupported;
}
Silverlight.WaitForInstallCompletion =3D function()
{
    if ( ! Silverlight.isBrowserRestartRequired && =
Silverlight.onSilverlightInstalled )
    {
        try
        {
            navigator.plugins.refresh();
        }
        catch(e)
        {
        }
        if ( Silverlight.isInstalled(null) )
        {
            Silverlight.onSilverlightInstalled();
        }
        else
        {
              setTimeout(Silverlight.WaitForInstallCompletion, 3000);
        }   =20
    }
}
Silverlight.__startup =3D function()
{
    Silverlight.isBrowserRestartRequired =3D =
Silverlight.isInstalled(null);//(!window.ActiveXObject || =
Silverlight.isInstalled(null));
    if ( !Silverlight.isBrowserRestartRequired)
    {
        Silverlight.WaitForInstallCompletion();
    }
    if (window.removeEventListener) {=20
       window.removeEventListener('load', Silverlight.__startup , =
false);
    }
    else {=20
        window.detachEvent('onload', Silverlight.__startup );
    }
}

if (window.addEventListener)=20
{
    window.addEventListener('load', Silverlight.__startup , false);
}
else=20
{
    window.attachEvent('onload', Silverlight.__startup );
}

/////////////////////////////////////////////////////////////////////////=
//////
// createObject();  Params:
// parentElement of type Element, the parent element of the Silverlight =
Control
// source of type String
// id of type string
// properties of type String, object literal notation { name:value, =
name:value, name:value},
//     current properties are: width, height, background, framerate, =
isWindowless, enableHtmlAccess, inplaceInstallPrompt:  all are of type =
string
// events of type String, object literal notation { name:value, =
name:value, name:value},
//     current events are onLoad onError, both are type string
// initParams of type Object or object literal notation { name:value, =
name:value, name:value}
// userContext of type Object
/////////////////////////////////////////////////////////////////////////=
////////

Silverlight.createObject =3D function(source, parentElement, id, =
properties, events, initParams, userContext)
{
    var slPluginHelper =3D new Object();
    var slProperties =3D properties;
    var slEvents =3D events;
   =20
    slPluginHelper.version =3D slProperties.version;
    slProperties.source =3D source;   =20
    slPluginHelper.alt =3D slProperties.alt;
   =20
    //rename properties to their tag property names
    if ( initParams )
        slProperties.initParams =3D initParams;
    if ( slProperties.isWindowless && !slProperties.windowless)
        slProperties.windowless =3D slProperties.isWindowless;
    if ( slProperties.framerate && !slProperties.maxFramerate)
        slProperties.maxFramerate =3D slProperties.framerate;
    if ( id && !slProperties.id)
        slProperties.id =3D id;
   =20
    // remove elements which are not to be added to the instantiation =
tag
    delete slProperties.ignoreBrowserVer;
    delete slProperties.inplaceInstallPrompt;
    delete slProperties.version;
    delete slProperties.isWindowless;
    delete slProperties.framerate;
    delete slProperties.data;
    delete slProperties.src;
    delete slProperties.alt;


    // detect that the correct version of Silverlight is installed, else =
display install

    if (Silverlight.isInstalled(slPluginHelper.version))
    {
        //move unknown events to the slProperties array
        for (var name in slEvents)
        {
            if ( slEvents[name])
            {
                if ( name =3D=3D "onLoad" && typeof slEvents[name] =
=3D=3D "function" && slEvents[name].length !=3D 1 )
                {
                    var onLoadHandler =3D slEvents[name];
                    slEvents[name]=3Dfunction (sender){ return =
onLoadHandler(document.getElementById(id), userContext, sender)};
                }
                var handlerName =3D =
Silverlight.__getHandlerName(slEvents[name]);
                if ( handlerName !=3D null )
                {
                    slProperties[name] =3D handlerName;
                    slEvents[name] =3D null;
                }
                else
                {
                    throw "typeof events."+name+" must be 'function' or =
'string'";
                }
            }
        }
        slPluginHTML =3D Silverlight.buildHTML(slProperties);
    }
    //The control could not be instantiated. Show the installation =
prompt
    else=20
    {
        slPluginHTML =3D Silverlight.buildPromptHTML(slPluginHelper);
    }

    // insert or return the HTML
    if(parentElement)
    {
        parentElement.innerHTML =3D slPluginHTML;
    }
    else
    {
        return slPluginHTML;
    }

}

/////////////////////////////////////////////////////////////////////////=
//////
//
//  create HTML that instantiates the control
//
/////////////////////////////////////////////////////////////////////////=
//////
Silverlight.buildHTML =3D function( slProperties)
{
    var htmlBuilder =3D [];

    htmlBuilder.push('<object type=3D\"application/x-silverlight\" =
data=3D"data:application/x-silverlight,"');
    if ( slProperties.id !=3D null )
    {
        htmlBuilder.push(' id=3D"' + slProperties.id + '"');
    }
    if ( slProperties.width !=3D null )
    {
        htmlBuilder.push(' width=3D"' + slProperties.width+ '"');
    }
    if ( slProperties.height !=3D null )
    {
        htmlBuilder.push(' height=3D"' + slProperties.height + '"');
    }
    htmlBuilder.push(' >');
   =20
    delete slProperties.id;
    delete slProperties.width;
    delete slProperties.height;
   =20
    for (var name in slProperties)
    {
        if (slProperties[name])
        {
            htmlBuilder.push('<param =
name=3D"'+Silverlight.HtmlAttributeEncode(name)+'" =
value=3D"'+Silverlight.HtmlAttributeEncode(slProperties[name])+'" />');
        }
    }
    htmlBuilder.push('<\/object>');
    return htmlBuilder.join('');
}




// createObjectEx, takes a single parameter of all createObject =
parameters enclosed in {}
Silverlight.createObjectEx =3D function(params)
{
    var parameters =3D params;
    var html =3D Silverlight.createObject(parameters.source, =
parameters.parentElement, parameters.id, parameters.properties, =
parameters.events, parameters.initParams, parameters.context);
    if (parameters.parentElement =3D=3D null)
    {
        return html;
    }
}

/////////////////////////////////////////////////////////////////////////=
//////////////////////
// Builds the HTML to prompt the user to download and install =
Silverlight
/////////////////////////////////////////////////////////////////////////=
//////////////////////
Silverlight.buildPromptHTML =3D function(slPluginHelper)
{
    var slPluginHTML =3D "";
    var urlRoot =3D Silverlight.fwlinkRoot;
    var shortVer =3D slPluginHelper.version ;
    if ( slPluginHelper.alt )
    {
        slPluginHTML =3D slPluginHelper.alt;
    }
    else
    {
        if (! shortVer )
        {
            shortVer=3D"";
        }
        slPluginHTML =3D "<a =
href=3D'javascript:Silverlight.getSilverlight(\"{1}\");' =
style=3D'text-decoration: none;'><img src=3D'{2}' alt=3D'Get Microsoft =
Silverlight' style=3D'border-style: none'/></a>";
        slPluginHTML =3D slPluginHTML.replace('{1}', shortVer );
        slPluginHTML =3D slPluginHTML.replace('{2}', urlRoot + =
'108181');
    }
   =20
    return slPluginHTML;
}


Silverlight.getSilverlight =3D function(version)
{
    if (Silverlight.onGetSilverlight )
    {
        Silverlight.onGetSilverlight();
    }
   =20
    var shortVer =3D "";
    var reqVerArray =3D String(version).split(".");
    if (reqVerArray.length > 1)
    {
        var majorNum =3D parseInt(reqVerArray[0] );
        if ( isNaN(majorNum) || majorNum < 2 )
        {
            shortVer =3D "1.0";
        }
        else
        {
            shortVer =3D reqVerArray[0]+'.'+reqVerArray[1];
        }
    }
   =20
    var verArg =3D "";
   =20
    if (shortVer.match(/^\d+\056\d+$/) )
    {
        verArg =3D "&v=3D"+shortVer;
    }
   =20
    Silverlight.followFWLink("114576" + verArg);
}


/////////////////////////////////////////////////////////////////////////=
//////////////////////
/// Navigates to a url based on fwlinkid
/////////////////////////////////////////////////////////////////////////=
//////////////////////
Silverlight.followFWLink =3D function(linkid)
{
    top.location=3DSilverlight.fwlinkRoot+String(linkid);
}












/////////////////////////////////////////////////////////////////////////=
//////////////////////
/// Encodes special characters in input strings as charcodes
/////////////////////////////////////////////////////////////////////////=
//////////////////////
Silverlight.HtmlAttributeEncode =3D function( strInput )
{
      var c;
      var retVal =3D '';

    if(strInput =3D=3D null)
      {
          return null;
    }
     =20
      for(var cnt =3D 0; cnt < strInput.length; cnt++)
      {
            c =3D strInput.charCodeAt(cnt);

            if (( ( c > 96 ) && ( c < 123 ) ) ||
                  ( ( c > 64 ) && ( c < 91 ) ) ||
                  ( ( c > 43 ) && ( c < 58 ) && (c!=3D47)) ||
                  ( c =3D=3D 95 ))
            {
                  retVal =3D retVal + String.fromCharCode(c);
            }
            else
            {
                  retVal =3D retVal + '&#' + c + ';';
            }
      }
     =20
      return retVal;
}
/////////////////////////////////////////////////////////////////////////=
//////
//
//  Default error handling function to be used when a custom error =
handler is
//  not present
//
/////////////////////////////////////////////////////////////////////////=
//////

Silverlight.default_error_handler =3D function (sender, args)
{
    var iErrorCode;
    var errorType =3D args.ErrorType;

    iErrorCode =3D args.ErrorCode;

    var errMsg =3D "\nSilverlight error message     \n" ;

    errMsg +=3D "ErrorCode: "+ iErrorCode + "\n";


    errMsg +=3D "ErrorType: " + errorType + "       \n";
    errMsg +=3D "Message: " + args.ErrorMessage + "     \n";

    if (errorType =3D=3D "ParserError")
    {
        errMsg +=3D "XamlFile: " + args.xamlFile + "     \n";
        errMsg +=3D "Line: " + args.lineNumber + "     \n";
        errMsg +=3D "Position: " + args.charPosition + "     \n";
    }
    else if (errorType =3D=3D "RuntimeError")
    {
        if (args.lineNumber !=3D 0)
        {
            errMsg +=3D "Line: " + args.lineNumber + "     \n";
            errMsg +=3D "Position: " +  args.charPosition + "     \n";
        }
        errMsg +=3D "MethodName: " + args.methodName + "     \n";
    }
    alert (errMsg);
}

/////////////////////////////////////////////////////////////////////////=
//////////////////////
/// Releases event handler resources when the page is unloaded
/////////////////////////////////////////////////////////////////////////=
//////////////////////
Silverlight.__cleanup =3D function ()
{
    for (var i =3D Silverlight._silverlightCount - 1; i >=3D 0; i--) {
        window['__slEvent' + i] =3D null;
    }
    Silverlight._silverlightCount =3D 0;
    if (window.removeEventListener) {=20
       window.removeEventListener('unload', Silverlight.__cleanup , =
false);
    }
    else {=20
        window.detachEvent('onunload', Silverlight.__cleanup );
    }
}
/////////////////////////////////////////////////////////////////////////=
//////////////////////
/// Releases event handler resources when the page is unloaded
/////////////////////////////////////////////////////////////////////////=
//////////////////////
Silverlight.__getHandlerName =3D function (handler)
{
    var handlerName =3D "";
    if ( typeof handler =3D=3D "string")
    {
        handlerName =3D handler;
    }
    else if ( typeof handler =3D=3D "function" )
    {
        if (Silverlight._silverlightCount =3D=3D 0)
        {
            if (window.addEventListener)=20
            {
                window.addEventListener('onunload', =
Silverlight.__cleanup , false);
            }
            else=20
            {
                window.attachEvent('onunload', Silverlight.__cleanup );
            }
        }
        var count =3D Silverlight._silverlightCount++;
        handlerName =3D "__slEvent"+count;
       =20
        window[handlerName]=3Dhandler;
    }
    else
    {
        handlerName =3D null;
    }
    return handlerName;
}
------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/Viewer.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

// globals
var g_urlDeliveryInfo =3D "DeliveryInfo.aspx";

var g_urlNoteTogglePublic =3D "Notes/TogglePublic.aspx";
var g_urlNoteSubmit =3D "Notes/Note_Create.aspx";
var g_urlNoteUpdate =3D "Notes/Note_Update.aspx";
var g_urlNoteDelete =3D "Notes/Note_Delete.aspx";

var g_urlSearchResults =3D "Search/Results.aspx";

var g_urlImage =3D "Image.aspx";
var g_urlThumb =3D "Thumb.aspx";

var g_dMinViewerHeight =3D 500;
var g_dMinViewerWidth_Object =3D 930;
var g_dMinViewerWidth_NoObject =3D 700;
var g_dMinViewerWidth =3D g_dMinViewerWidth_Object;
var g_dScrollbarHeight =3D 17;

var g_fLeftPaneWidthPerc =3D .37;
var g_fRightPaneWidthPerc =3D .63;

var g_dBorderWidth =3D 1;

var g_dMinEventViewerHeight =3D 200;
var g_dMinEventViewerWidth =3D 340;

var g_fOffsetThreshold =3D 5.0;

var g_dThumbnailHeight =3D 218;
var g_dThumbnailWidth =3D 250;

var g_dQuestionsHeight =3D 110;

var g_dContainerSpacing =3D 10;

// Global reference to viewer object for media player event handler =
access.
var g_pViewer;

function PanoptoViewer(el, viewerParams)
{
    var m_el =3D el;  // our root element
   =20
    // member controls
    var m_pVideo =3D null;          // presenter video stream
    var m_pEventTabViewer =3D null; // table of contents control
    var m_pTabViewer =3D null;      // object region with tab control to =
switch between streams
    var m_pObjectVideo =3D null;    // object video player
    var m_pThumbnails =3D null;     // thumbnail view
    var m_pQuestions =3D null;      // question entry for broadcast

    // our delivery info object - parses xml and holds our data
    var m_pDelivery =3D null;

    // true if there are object streams to show
    var m_bHasObjectRegion =3D true;
    var m_bObjectRegionMaximized =3D false;

    var m_bHasTimestamps =3D true;
    var m_bShowThumbnails =3D true;

    // timer to update streams in broadcast viewer
    var m_pDeliveryInfoTimer;

    // timer used to update event streams and synchronize videos in =
non-broadcast case
    var m_pSyncTimer;

    // lastsetvideoposition keeps track of the last place we manually =
positioned the video
    // we need this to get around a bug where the video player sets its =
position slightly before
    // the specified time which results in the display of incorrect =
events
    var m_fLastSetVideoPosition =3D 0;

    // the version of the system
    this.version =3D viewerParams.Version;

    // the delivery id
    this.deliveryID =3D viewerParams.DeliveryID;

    // the session public id
    this.sessionPID;

    // whether the session is being broadcast live.  set in =
SetDelivery()
    this.isLive;

    // whether the viewer is standalone notes
    this.isStandaloneNotes =3D false;

    // the display names and bios of creators who contributed to the =
session
    this.contributors =3D viewerParams.Contributors;

    // the name of the logged in user, for notes
    this.userName =3D viewerParams.UserName;

    // the user whose notes will be shown in the notes tab (for public =
notes).  null -> default to user's login.
    this.notesUser =3D null;

    // the list of public notes streams (at load time)
    this.publicNotesUsers =3D viewerParams.PublicNotesStreams;

    // indicates whether the current user is permitted to make their =
personal notes stream public.
    // setting takes into account session group setting for viewers and =
current user's creator status.
    // set in SetDelivery()
    this.bAllowPublishNotes;

    // for login triggered from notes user <select>
    this.loginURL =3D viewerParams.LoginURL;
   =20
    // initialize the viewer root and hosted controls
    // this will leak if called multiple times!
    this.Initialize =3D function Initialize()
    {
        // create the events tab viewer
        m_pEventTabViewer =3D new =
EventTabViewer(document.getElementById("eventViewerDiv"), this);

        // create our archival video player
        if (g_bUsingSilverlight)
        {
            m_pVideo =3D new =
StartPlayer_0(document.getElementById("videoPlayerDiv"), this);
        }
        else
        {
            m_pVideo =3D new =
VideoPlayer(document.getElementById("videoPlayerDiv"), "archivalPlayer", =
true);
        }


        // seek to the requested spot in the video
        if (viewerParams.StartTime)
        {
            this.SetVideoPosition(viewerParams.StartTime);
        }

        // create our thumbnails display
        m_pThumbnails =3D new =
Thumbnails(document.getElementById("thumbnails"), this);

        // create our tab viewer (boolean specifies large tabs)
        m_pTabViewer =3D new =
TabViewer(document.getElementById("tabViewer"), this, true);

        // create the questions entry
        m_pQuestions =3D new =
Questions(document.getElementById("questions"), this);

        // set event handler for window resize and clicking the =
thumbnail toggle button
        window.onresize =3D Function.createDelegate(this, this.Resize);
    }
   =20
    // get the data for the supplied delivery ID, then reconfigure the =
viewer
    // to display it.
    this.OpenDelivery =3D function OpenDelivery()
    {
        function deliveryCallback(pDocument, bSuccess)
        {
            if (!pDocument || !bSuccess)
            {
                alert("Error connecting to server. Please try refreshing =
the page later.");
            }
            else
            {
                var errorMessage =3D SelectSingleNodeValue(pDocument, =
"ErrorMessage");
                if (errorMessage)
                {
                    showMessage(errorMessage);

                    // Stop pinging DeliveryInfo when broadcast ends
                    if (m_pDeliveryInfoTimer)
                    {
                        clearInterval(m_pDeliveryInfoTimer);
                    }
                }
                else
                {
                    var pDelivery =3D new DeliveryInfo(pDocument);
                    // Apparently function calls from delegates do not =
preserve the instance pointer.
                    SetDelivery.call(this, pDelivery);
                }
            }
        }

        var params =3D
        {
            deliveryID      : this.deliveryID,
            invocationID    : viewerParams.InvocationID
        };

        CreateRequest(g_urlDeliveryInfo, params, =
Function.createDelegate(this, deliveryCallback));
    }

    // load information from the specified delivery into our viewers
    function SetDelivery(pDelivery)
    {
        // First load or broadcast hasn't started yet.
        if (m_pDelivery =3D=3D null)
        {
            this.isLive =3D pDelivery.isLive;

            this.bAllowPublishNotes =3D pDelivery.bAllowPublishNotes;

            this.sessionPID =3D pDelivery.sessionPID;

            // Set folder name in top bar.
            var folderNameElement =3D =
document.getElementById("courseTag");
            folderNameElement.title =3D pDelivery.sessionGroupLongName;
            SetText(folderNameElement, pDelivery.sessionGroupLongName);

            // Show colon separator
            var nameDividerElement =3D =
document.getElementById("nameDivider");
            nameDividerElement.style.display =3D "block";

            // Set session name in top bar.
            var sessionNameElement =3D =
document.getElementById("sessionName");
            sessionNameElement.title =3D pDelivery.sessionName;
            SetText(sessionNameElement, pDelivery.sessionName);

            if (pDelivery.isStarted)
            {
                // Hide broadcast not started message (if shown) and =
display viewer div.
                showMessage(false);

                SetText(document.getElementById("infoSessionName"), =
pDelivery.sessionName);

                var el_sessionGroupName =3D =
document.getElementById("infoSessionGroupName");
                var sessionGroupName =3D pDelivery.sessionGroupLongName;
                SetText(el_sessionGroupName, sessionGroupName);

                var el_sessionGroupLink =3D =
document.getElementById("infoSessionGroupLink");
                el_sessionGroupLink.href =3D =
viewerParams.ApplicationPath + "/Pages/Sessions/List.aspx?folderID=3D" + =
pDelivery.sessionGroupPID;

                var el_sessionAbstract =3D =
document.getElementById("sessionAbstract");
                SetTextWithLinks(el_sessionAbstract, =
pDelivery.sessionAbstract);
                SetTextWithNewlineTranslation(el_sessionAbstract, =
el_sessionAbstract.innerHTML);

                var el_sessionGroupAbstract =3D =
document.getElementById("sessionGroupAbstract");
                SetTextWithLinks(el_sessionGroupAbstract, =
pDelivery.sessionGroupAbstract);
                SetTextWithNewlineTranslation(el_sessionGroupAbstract, =
el_sessionGroupAbstract.innerHTML);

                // resize elements before setting contents
                OnResize();

                // show the questions tab if this delivery is live
                m_pQuestions.SetVisible(this.isLive);

                // render our event tab viewer and load the first event
                if (m_pEventTabViewer)
                {
                    =
m_pEventTabViewer.RenderContents(pDelivery.arrTOCEvents, =
pDelivery.arrTranscriptEvents);
                }

                // render the thumbnails
                if (m_pThumbnails)
                {
                    // if we have thumbnails to show, render them - =
otherwise hide the thumbnail pane
                    var thumbEl =3D =
document.getElementById("thumbnails");
                    m_bShowThumbnails =3D m_bHasTimestamps =3D =
(pDelivery.arrTOCEvents.length > 0);
                    if (m_bHasTimestamps)
                    {
                        =
m_pThumbnails.RenderContents(pDelivery.arrTOCEvents, =
pDelivery.sessionPID);
                        SetVisible(thumbEl, true);
                    }
                    else
                    {
                        SetVisible(thumbEl, false);
                    }
                }

                // render archival video player
                if (m_pVideo)
                {
                    // Can't act on events for broadcast case, set =
callbacks to null
                    var posChangedCallback =3D (pDelivery.isLive) ? null =
: Function.createDelegate(this, OnVideoPositionChanged);
                    var playStateChangedCallback =3D (pDelivery.isLive) =
? null : Function.createDelegate(this, OnPlayStateChanged);

                    m_pVideo.Initialize(pDelivery.archivalStream, =
posChangedCallback, playStateChangedCallback);
                }

                // render the object material region and load the first =
event
                if (m_pTabViewer)
                {
                    m_pTabViewer.SetViews(pDelivery.arrObjectViews);
                }

                OnResize();

                m_pDelivery =3D pDelivery;
            }
            else
            {
                showMessage("Broadcast has not started yet.  The viewer =
will load when content is available.");
            }
           =20
            // Reload delivery info every 10sec in broadcast mode to =
pick up new streams (or to pick up a broadcast that has just begun)
            if (pDelivery.isLive)
            {
                // We may hit this point again if we're waiting for a =
broadcast to begin.
                if (!m_pDeliveryInfoTimer)
                {
                    m_pDeliveryInfoTimer =3D =
setInterval(Function.createDelegate(this, this.OpenDelivery), 10000);
                }
            }
            // Broadcast streams aren't seekable, so can't synchronize
            else
            {
                m_pSyncTimer =3D =
setInterval(Function.createDelegate(this, Synchronize), 500);
            }
        }
        // Broadcast update, refresh streams
        else
        {
            if (m_pTabViewer)
            {
                m_pTabViewer.SetViews(pDelivery.arrObjectViews);
            }
        }
    }

    this.GetHasObjectRegion =3D function() { return m_bHasObjectRegion; =
};

    this.SetHasObjectRegion =3D function(hasObjectRegion)
    {
        m_bHasObjectRegion =3D hasObjectRegion;
        m_pTabViewer.SetVisible(hasObjectRegion);

        var viewer =3D document.getElementById("viewer");
        var leftPane =3D document.getElementById("leftPane");
        var rightPane =3D document.getElementById("rightPane");
        var eventViewerDiv =3D =
document.getElementById("eventViewerDiv");

        if (hasObjectRegion)
        {
            // Show right pane and move event viewer below video
            leftPane.style.width =3D "37%";
            rightPane.style.display =3D "block";
            eventViewerDiv.style.position =3D "relative";
            eventViewerDiv.style.width =3D "";
            eventViewerDiv.style.paddingTop =3D "10px";

            g_dMinViewerWidth =3D g_dMinViewerWidth_Object;
        }
        else
        {
            // Collapse right pane and move event viewer to right of =
video
            leftPane.style.width =3D "100%";
            rightPane.style.display =3D "none";
            eventViewerDiv.style.position =3D "absolute";
            eventViewerDiv.style.paddingTop =3D "0px";

            g_dMinViewerWidth =3D g_dMinViewerWidth_NoObject;
        }

        viewer.style.minWidth =3D g_dMinViewerWidth + "px";

        this.Resize();
    }
   =20
    // enlarge / reduce object material tabviewer
    this.ToggleObjectRegionMaximized =3D function(maximized)
    {
        if (maximized !=3D null)
        {
            m_bObjectRegionMaximized =3D maximized;
        }
        else
        {
            m_bObjectRegionMaximized =3D !m_bObjectRegionMaximized;
        }

        OnResize();
    }

    // Set thumbnail mode (show / hide).
    // Thumbnail display also depends on object region mode and presence =
of timestamps.
    function ToggleThumbnails(bShowThumbnails)
    {
        if (bShowThumbnails !=3D null)
        {
            m_bShowThumbnails =3D bShowThumbnails;
        }
        else
        {
            m_bShowThumbnails =3D !m_bShowThumbnails;
        }
       =20
        m_pThumbnails.SetVisible(m_bShowThumbnails);
    }
    this.ToggleThumbnails =3D ToggleThumbnails;

    function OnVideoPositionChanged(fVidPos, bUserInitiated)
    {
        // Video position is not valid for broadcast, ignore.
        if (this.isLive) return;

        // if this was triggered by a user action then keep track of the =
last set position
        if (bUserInitiated)
        {
            m_fLastSetVideoPosition =3D fVidPos;
        }

        // determine the current item
        if (m_pDelivery && m_pDelivery.arrTOCEvents)
        {
            var iItem =3D GetCurrentItem(m_pDelivery.arrTOCEvents, =
fVidPos);
            m_pThumbnails.SelectThumbByIndex(iItem);
        }

        // send the current state to the tabcontrol
        var pStatus =3D
        {     =20
            Time: fVidPos,
            PlayState: m_pVideo.GetPlayState()
        };

        if (m_pTabViewer)
        {
            m_pTabViewer.UpdateStatus(pStatus, bUserInitiated);
        }

        if (m_pEventTabViewer)
        {
            m_pEventTabViewer.UpdateStatus(pStatus);
        }
    }
   =20
    var m_isBuffering =3D false;

    function StartBuffering()
    {
        // when buffering, pause our object video and keep track of our =
state
        if (!m_isBuffering)
        {
            m_pObjectVideo.SetPlayState("Paused");
            m_isBuffering =3D true;
        }
    }

    function EndBuffering()
    {
        // when done start playing the object video again
        if (m_isBuffering)
        {
            m_isBuffering =3D false;
            m_pObjectVideo.SetPlayState("Playing");
        }
    }
   =20
    // called when our archival video changes play state
    function OnPlayStateChanged(playState)
    {
        if (playState =3D=3D "Buffering")
        {
            // if we are buffering, pause the object video
            StartBuffering();
        }
        else if (m_isBuffering)
        {
            // we are not now buffering but were buffering, so start =
playing the object video again =20
            EndBuffering();
        }
        else
        {
            // we were not buffering and are now not buffering, so =
synchronize the object video's play state
            m_pObjectVideo.SetPlayState(playState);
        }
    }

    this.OnObjectVideoPlayStateChanged =3D function(playState)
    {
        // this handles the case where object video gets initialized =
after archival video is playing (clicking a tab)
        // it simply synchronizes play states when the object video is =
not buffering
        if ((playState !=3D "Buffering") && (playState !=3D =
m_pVideo.GetPlayState()))
        {
            m_pObjectVideo.SetPlayState(m_pVideo.GetPlayState());
        }
    }

    // needed to allow tabviewer to pass in our object video instance
    this.SetObjectVideoPlayer =3D function(player)
    {
        m_pObjectVideo =3D player;
    }

    this.SetVideoPosition =3D function(fVidPos)
    {
        m_pVideo.SetVideoPosition(fVidPos);
        OnVideoPositionChanged(fVidPos, true);
    }

    this.SelectObjectView =3D function(viewID)
    {
        m_pTabViewer.SelectView(viewID);
    }
   =20
    // callback to synchronize streams
    function Synchronize()
    {
        // take the later of the actual and lastsetvideo positions
        var fVidPos =3D m_pVideo.GetVideoPosition();
        var playState =3D m_pVideo.GetPlayState();

        // case where actual time is before the last set time
        if (fVidPos < m_fLastSetVideoPosition)
        {
            fVidPos =3D m_fLastSetVideoPosition;
        }

        OnVideoPositionChanged.call(this, fVidPos, false);
    }

   =20
    // event handler for window resize
    function OnResize()
    {
        if (m_el.style.display =3D=3D "none") return;

        // determine our viewer height and set our outermost div - =
subtract 10 for the margin
        var viewerHeight =3D GetWindowHeight() - m_el.offsetTop - =
g_dContainerSpacing;
        viewerHeight =3D Math.max(g_dMinViewerHeight, viewerHeight);

        m_el.style.height =3D viewerHeight + "px";

        var viewerWidth =3D GetWindowWidth();
        viewerWidth =3D Math.max(g_dMinViewerWidth, viewerWidth);

        // set the height of our panes
        var leftPane =3D document.getElementById("leftPane");
        leftPane.style.height =3D viewerHeight + "px";

        var rightPane =3D document.getElementById("rightPane");
        rightPane.style.height =3D viewerHeight + "px";

        // call SetHeight for our events viewer and tab viewer
        // tab viewer is adjusted based on thumbnail display
        if (m_bHasObjectRegion)
        {
            var leftPaneWidth =3D m_bObjectRegionMaximized
                ? g_dMinEventViewerWidth
                : Math.max(g_dMinEventViewerWidth, viewerWidth * =
g_fLeftPaneWidthPerc);

            var videoWidthAvailable =3D leftPaneWidth - =
(g_dContainerSpacing * 2);
            var videoHeightAvailable =3D viewerHeight - =
g_dMinEventViewerHeight;
            m_pVideo.OnResize(videoHeightAvailable, =
videoWidthAvailable);

            // Video may have shrunk to accommodate min event viewer =
height
            leftPaneWidth =3D Math.max(g_dMinEventViewerWidth, =
m_pVideo.Width + (g_dContainerSpacing * 2));
            leftPane.style.width =3D leftPaneWidth + "px";
            rightPane.style.left =3D leftPaneWidth + "px";
            rightPane.style.width =3D viewerWidth - leftPaneWidth + =
"px";

            var eventTabViewerHeight =3D viewerHeight - m_pVideo.Height;
            eventTabViewerHeight =3D Math.max(g_dMinEventViewerHeight, =
eventTabViewerHeight);

            m_pEventTabViewer.SetHeight(eventTabViewerHeight);

            var tabViewerHeight =3D viewerHeight;
            if (m_bHasObjectRegion && !m_bObjectRegionMaximized && =
m_bShowThumbnails)
            {
                tabViewerHeight -=3D g_dThumbnailHeight;

                m_pThumbnails.SetVisible(true);
                m_pThumbnails.SetWidth(rightPane.offsetWidth - =
g_dContainerSpacing - (g_dBorderWidth * 2));
            }
            else
            {
                m_pThumbnails.SetVisible(false);
            }

            // Display questions tab for live broadcasts.
            if (g_pViewer.isLive)
            {
                tabViewerHeight -=3D (g_dQuestionsHeight + =
g_dContainerSpacing);
                m_pQuestions.OnResize(rightPane.offsetWidth - =
g_dContainerSpacing - (g_dBorderWidth * 2));
            }

            var tabViewerWidth =3D rightPane.offsetWidth - =
g_dContainerSpacing;
            m_pTabViewer.OnResize(tabViewerHeight, tabViewerWidth);
        }
        else
        {
            m_pVideo.OnResize(viewerHeight, viewerWidth - =
g_dMinEventViewerWidth - g_dContainerSpacing * 3);
            m_pEventTabViewer.SetWidth(viewerWidth - m_pVideo.Width - =
g_dContainerSpacing * 3);
            m_pEventTabViewer.SetHeight(m_pVideo.Height);
        }
    }
    this.Resize =3D OnResize;

    this.GetEventTabViewer =3D function ()
    {
        return m_pEventTabViewer;
    }

    this.HighlightThumbnail =3D function (fTime, bHighlighed)
    {
        if (m_pThumbnails)
        {
            var iItem =3D GetCurrentItem(m_pDelivery.arrTOCEvents, =
fTime);
            m_pThumbnails.HighlightThumbnailByIndex(iItem, bHighlighed);
        }
    }
}

// data object to store all info for a delivery
function DeliveryInfo(pXml)
{
    this.sessionPID;
    this.sessionName;
    this.sessionAbstract;
    this.sessionGroupPID;
    this.sessionGroupLongName;
    this.sessionGroupAbstract;
    this.isLive;
   =20
    this.arrTimestamps =3D new Array();
    this.arrPPTEvents =3D new Array();
    this.arrTOCEvents =3D new Array();
    this.arrTranscriptEvents =3D new Array();

    this.arrObjectViews =3D new Array();
    this.archivalStream;

    // Session and SessionGroup data
    this.sessionPID =3D SelectSingleNodeValue(pXml, "SessionPublicID");
    this.sessionName =3D SelectSingleNodeValue(pXml, "SessionName");
    this.sessionAbstract =3D SelectSingleNodeValue(pXml, =
"SessionAbstract");
    this.sessionGroupPID =3D SelectSingleNodeValue(pXml, =
"SessionGroupPublicID");
    this.sessionGroupLongName =3D SelectSingleNodeValue(pXml, =
"SessionGroupLongName");
    this.sessionGroupAbstract =3D SelectSingleNodeValue(pXml, =
"SessionGroupAbstract");

    // IsBroadcast indicates if the session was broadcast to begin with.
    // Only set viewer.isLive if the session is currently broadcasting,
    // else we're playing back a broadcast session.
    var bSessionIsBroadcast =3D SelectSingleNodeValue(pXml, =
"IsBroadcast", "bool");
    var bSessionIsOpen =3D SelectSingleNodeValue(pXml, "IsOpen", =
"bool");
    this.isLive =3D bSessionIsBroadcast && bSessionIsOpen;

    // Whether the session has started recording.  Used in broadcast =
case.
    this.isStarted =3D SelectSingleNodeValue(pXml, "IsStarted", "bool");

    this.bAllowPublishNotes =3D SelectSingleNodeValue(pXml, =
"AllowPublishNotes", "bool");

    // Timestamps
    var pTimestamps =3D SelectSingleNode(pXml, "Timestamps");
    var pArrTimestamps =3D SelectNodes(pTimestamps, "SimpleTimestamp");
    for (var i =3D 0; i < pArrTimestamps.length; i++)
    {
        var pEvent =3D ParseEvent(pArrTimestamps[i]);

        // skip this if we dont have time, eventtargetid, or =
sequencenumber
        if ((pEvent.Time !=3D null) && (pEvent.EventTargetID !=3D null) =
&& (pEvent.SequenceNumber !=3D null))
        {
            this.arrTimestamps.push(pEvent);
            if (pEvent.EventTargetType =3D=3D "PowerPoint")
            {
                this.arrPPTEvents.push(pEvent);
                this.arrTOCEvents.push(pEvent);
            }
            else if (pEvent.EventTargetType =3D=3D "ObjectVideo")
            {
                this.arrTOCEvents.push(pEvent);
            }
            else if (pEvent.EventTargetType =3D=3D "Transcript")
            {
                this.arrTranscriptEvents.push(pEvent);
            }
        }
    }
   =20
    // PPT
    if (this.arrPPTEvents.length > 0)
    {
        // We use the same object view for all PPT events, so just use =
ID "PowerPoint"
        this.arrObjectViews.push({         ViewID:  "PowerPoint",
                                            Title:  "Slides",=20
                                             Type:  "Image",=20
                                    EventTargetID:  =
this.arrPPTEvents[0].EventTargetID,
                                       Timestamps:  this.arrPPTEvents,=20
                                       SessionPID:  this.sessionPID });
    }

    // Streams
    var pStreams =3D SelectSingleNode(pXml, "Streams");
    var pArrStreams =3D SelectNodes(pStreams, "SimpleStream");
   =20
    // Streams: Archival segments
    var pXMLSegments =3D null;
    for (var i =3D 0; i < pArrStreams.length; i++)
    {
        var strStreamType =3D SelectSingleNodeValue(pArrStreams[i], =
"StreamType");
        if (strStreamType =3D=3D "Archival")
        {
            var pSegments =3D SelectSingleNode(pArrStreams[i], =
"Segments");
            if (pSegments)
            {
                pXMLSegments =3D SelectNodes(pSegments, "Segment");
            }
        }
    }
   =20
    // Streams: Adjusted stream data
    for (var i =3D 0; i < pArrStreams.length; i++)
    {
        var strStreamType =3D SelectSingleNodeValue(pArrStreams[i], =
"StreamType");
        var strStreamUrl =3D SelectSingleNodeValue(pArrStreams[i], =
"StreamUrl");
        var strStreamPublicID =3D SelectSingleNodeValue(pArrStreams[i], =
"PublicID");
        var bBroadcast =3D SelectSingleNodeValue(pArrStreams[i], =
"IsBroadcast", "bool");
        var fAbsoluteStart =3D =
parseFloat(SelectSingleNodeValue(pArrStreams[i], "AbsoluteStart", =
"float"));
        var fAbsoluteEnd =3D =
parseFloat(SelectSingleNodeValue(pArrStreams[i], "AbsoluteEnd", =
"float"));
        var fRelativeStart =3D =
parseFloat(SelectSingleNodeValue(pArrStreams[i], "RelativeStart", =
"float"));
        var fRelativeEnd =3D =
parseFloat(SelectSingleNodeValue(pArrStreams[i], "RelativeEnd", =
"float"));
        var strStreamTag =3D SelectSingleNodeValue(pArrStreams[i], =
"Tag");
       =20
        if(strStreamType =3D=3D "Archival")
        {
            this.archivalStream =3D {    Url: strStreamUrl,
                                    Length: fRelativeEnd,
                                       Tag: strStreamTag };
        }
        else if (strStreamType =3D=3D "Streaming")
        {
            var pArrSegments =3D null;
            if (pSegments)
            {
                var segRelativeStart =3D 0;
                pArrSegments =3D new Array();
                for (var s =3D 0; s < pXMLSegments.length; s++)
                {
                    var segStart =3D =
SelectSingleNodeValue(pXMLSegments[s], "Start", "float");
                    var segEnd =3D =
SelectSingleNodeValue(pXMLSegments[s], "End", "float");
                    var segLength =3D segEnd - segStart;
                    pArrSegments.push({ RelativeStart: segRelativeStart,
                                               Offset: segStart - =
fRelativeStart });
                    segRelativeStart +=3D segLength;
                }
            }
           =20
            var tagLookup =3D { SCREEN: "Screen Capture",
                              OBJECT: "Object Video" };
                             =20
            var strStreamDisplayName =3D "Other";
            if (tagLookup[strStreamTag])
            {
                strStreamDisplayName =3D tagLookup[strStreamTag];
            }

            this.arrObjectViews.push({   ViewID: strStreamPublicID,
                                          Title: strStreamDisplayName,
                                           Type: "Object",
                                            Url: strStreamUrl,
                                    IsBroadcast: bBroadcast,     =20
                                  AbsoluteStart: fAbsoluteStart,
                                    AbsoluteEnd: fAbsoluteEnd,
                                  RelativeStart: fRelativeStart,
                                    RelativeEnd: fRelativeEnd,
                                       Segments: pArrSegments,
                                       StreamID: strStreamPublicID });
        }
    }

    // Streams: Prune streams that don't overlap the delivery
    if (!this.isLive)
    {
        // prune object streams that fall outside of the dv video
        var i =3D 0;
        while (i < this.arrObjectViews.length)
        {
            var pView =3D this.arrObjectViews[i];

            if ((pView.Type =3D=3D "Object") &&
                ((pView.RelativeEnd <=3D 0) || (pView.RelativeStart >=3D =
this.archivalStream.Length)))
            {
                this.arrObjectViews.splice(i, 1);
            }
            else
            {
                i++;
            }
        }
    }

    // Event Targets (PDF only for now)
    var pEventTargetsNode =3D SelectSingleNode(pXml, "EventTargets");
    var arrEventTargetNodes =3D SelectNodes(pEventTargetsNode, =
"SimpleEventTarget");
    for (var i =3D 0; i < arrEventTargetNodes.length; i++)
    {
        var title =3D "PDF" + (i > 0 ? i + 1 : "");
        var url =3D SelectSingleNodeValue(arrEventTargetNodes[i], =
"URL");
        var publicID =3D SelectSingleNodeValue(arrEventTargetNodes[i], =
"PublicID");

        //BUGBUG: Use title for type to create separate players for each =
PDF (so view state is not clobbered when switching tabs).
        this.arrObjectViews.push({ ViewID: publicID,
                                    Title: title,
                                     Type: "PDF",
                                      URL: url });
    }
}


function ThumbnailImage(pParent, url, time, objectViewID)
{
    this.Time =3D time;
    // The viewID of the object pane to switch to when clicked
    this.ObjectViewID =3D objectViewID;

    var m_imgThumb =3D CreateChildElement(pParent, "img", "thumbImage");
    m_imgThumb.src =3D url;
    m_imgThumb.alt =3D FormatRelativeTime(time);

    var m_bSelected =3D false;
    var m_bHovering =3D false;
    m_imgThumb.onmouseover =3D function(e)
    {
        e =3D GetEvent(e);
        m_bHovering =3D true;
        SetStyle();
        return false;
    }

    m_imgThumb.onmouseout =3D function(e)
    {
        e =3D GetEvent(e);
        m_bHovering =3D false;
        SetStyle();
        return false;
    }

    function SetStyle()
    {
        if (m_bSelected)
        {
            m_imgThumb.className =3D "thumbImageSelected";
        }
        else if (m_bHovering)
        {
            m_imgThumb.className =3D "thumbImageHover";
        }
        else
        {
            m_imgThumb.className =3D "thumbImage";
        }
    }

    this.SetSelected =3D function(bSelected)
    {
        m_bSelected =3D bSelected;
        SetStyle();
    }

    this.SetHighlight =3D function (bHighlighted)
    {
        m_bHovering =3D bHighlighted;
        SetStyle();
    }

    this.GetImage =3D function()
    {
        return m_imgThumb;
    }
}


// the thumbnail strip control
function Thumbnails(el, pViewer)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;
    var m_pCanvas =3D CreateChildElement(m_el, "div", =
"thumbnailContainer");

    var m_bHighlighted =3D false;
    var m_pSelectedItem =3D null;
    var m_arrItems =3D new Array();

    var m_timerScrollBack =3D null;
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
    }

    this.RenderContents =3D function (arrTimestamps, strSessionPID)
    {
        m_pCanvas.style.width =3D arrTimestamps.length * =
g_dThumbnailWidth + "px";

        for (var i =3D 0; i < arrTimestamps.length; i++)
        {
            var pEvent =3D arrTimestamps[i];

            var url =3D g_urlThumb + "?eventTargetPID=3D" + =
pEvent.EventTargetPublicID + "&sessionPID=3D" + strSessionPID + =
"&number=3D" + pEvent.SequenceNumber;
            var objectViewID =3D (pEvent.EventTargetType =3D=3D =
"PowerPoint") ? "PowerPoint" : pEvent.StreamID;

            var imgThumb =3D new ThumbnailImage(m_pCanvas, url, =
pEvent.Time, objectViewID);

            function thumbnailClick(pItem)
            {
                SelectThumb(pItem);

                m_pViewer.SetVideoPosition(pItem.Time);

                if (pItem.ObjectViewID !=3D "PowerPoint")
                {
                    m_pViewer.SelectObjectView(pItem.ObjectViewID);
                }
            }

            var image =3D imgThumb.GetImage();
            image.onclick =3D Clicker(image, thumbnailClick, imgThumb);

            m_arrItems.push(imgThumb);
        }
    }

    this.HighlightThumbnailByIndex =3D function (iThumb, bHighlighted)
    {
        if (iThumb < m_arrItems.length)
        {
            m_bHighlighted =3D bHighlighted;

            var thumb =3D m_arrItems[iThumb];
            thumb.SetHighlight(bHighlighted);

            if (bHighlighted)
            {
                clearTimeout(m_timerScrollBack);
                ScrollIntoView(thumb);
            }
            else
            {
                m_timerScrollBack =3D setTimeout(
                    function ()
                    {
                        ScrollIntoView(m_pSelectedItem);
                    },
                    g_cEventVisualHoverDelay);
            }
        }
    }

    this.SelectThumbByIndex =3D function(iThumb)
    {
        if (iThumb < m_arrItems.length)
        {
            var thumb =3D m_arrItems[iThumb];

            SelectThumb(thumb);
        }
    }

    function SelectThumb(pItem)
    {
        if (m_pSelectedItem =3D=3D pItem)
        {
            return;
        }
       =20
        if (m_pSelectedItem)
        {
            m_pSelectedItem.SetSelected(false);
        }
       =20
        m_pSelectedItem =3D pItem;
        m_pSelectedItem.SetSelected(true);

        // prevent timeline from stealing scroll focus
        if (!m_bHighlighted)
        {
            ScrollIntoView(pItem);
        }
    }

    function ScrollIntoView(pThumb)
    {
        var imageWidth =3D pThumb.GetImage().offsetWidth;
        var imageLeft =3D pThumb.GetImage().offsetLeft;
        var scrollWidth =3D m_el.offsetWidth;

        // center the image in the thumbnail client region
        var scroll =3D Math.max(0, (scrollWidth - imageWidth) / 2);

        m_el.scrollLeft =3D imageLeft - scroll;
    }

    this.SetWidth =3D function(width)
    {
        m_el.style.width =3D width + "px";
    }
}


function ParseEvent(pXML)
{
    var pEvent =3D {                Time: SelectSingleNodeValue(pXML, =
"Time", "float"),
                         EventTargetID: SelectSingleNodeValue(pXML, =
"ObjectIdentifier"),
                   EventTargetPublicID: SelectSingleNodeValue(pXML, =
"ObjectPublicIdentifier"),
                       EventTargetType: SelectSingleNodeValue(pXML, =
"EventTargetType"),
                        SequenceNumber: SelectSingleNodeValue(pXML, =
"ObjectSequenceNumber"),
                              StreamID: SelectSingleNodeValue(pXML, =
"ObjectStreamID"),
                               Caption: SelectSingleNodeValue(pXML, =
"Caption"),
                               EventID: SelectSingleNodeValue(pXML, =
"ID"),
                                  Data: SelectSingleNodeValue(pXML, =
"Data"),
                              UserName: SelectSingleNodeValue(pXML, =
"UserName")
    };

    if (!pEvent.Caption && pEvent.Data)
    {
        pEvent.Caption =3D pEvent.Data;
    }

    return pEvent;
}


function GetCurrentItem(arrItems, time)
{
    var iItem =3D 0;

    while ((iItem < arrItems.length) && (arrItems[iItem].Time <=3D =
time)) iItem++;

    if (iItem > 0) iItem--;

    return iItem;
}

// event handler helpers
// creates object with callback and payload used for handling events
function Clicker(pEl, pFunc, pPayload)
{
    pEl.clicker =3D { fn: pFunc, data: pPayload };

    function callback(e)
    {
        e =3D GetEvent(e);

        var pSrc =3D GetSrcElement(e);

        while (pSrc && !pSrc.clicker)
        {
            pSrc =3D GetParentElement(pSrc);
        }

        if (pSrc)
        {
            pSrc.clicker.fn(pSrc.clicker.data);
        }

        return false;
    }

    return callback;
}

function GetEvent(e)
{
    if (g_bIsIE)
    {
        event.cancelBubble =3D true;
        return event;
    }
    else
    {
        return e;
    }
}

function GetKey(e)
{
    if (e.keyCode)
    {
        return e.keyCode;
    }
    else
    {
        return e.charCode;
    }
}


// dom element helpers
function CreateElement(type, className, id)
{
    var el =3D document.createElement(type);
    if (id)
    {
        el.id =3D id;
    }
    if (className)
    {
        el.className =3D className;
    }
    return el;
}

function CreateChildElement(parent, type, className, id)
{
    var el =3D CreateElement(type, className);
    parent.appendChild(el);
    if (id)
    {
        el.id =3D id;
    }
    return el;
}

// Append text to element, escaping HTML
function AppendText(element, text)
{
    element.appendChild(document.createTextNode(text));
}

// Returns the text content of an html string.
function GetText(element)
{
    if (element.textContent) return element.textContent;
    else if (element.innerText) return element.innerText;
    else if (element.innerHTML) return =
element.innerHTML.replace(/<[^>]*>/g, '')
    else if (element.replace) return element.replace(/<[^>]*>/g, '')
    else return element;
}

// Set text content of element, escaping HTML.
function SetText(element, text)
{
    while (element.hasChildNodes())
    {
        element.removeChild(element.firstChild);
    }

    AppendText(element, text);
}

// Set the text content of the element.
// Replace newlines with <br>s.
function SetTextWithNewlineTranslation(element, text)
{
    SetTextWithReplacement(element, text, /\n/, function() { return =
CreateElement("BR"); });
}

// Set the text content of the element.
// Turn URLs into links.
function SetTextWithLinks(element, text)
{
    // Match http:// and https:// URLs with HTML tags embedded in them
    var linkMatcher =3D new RegExp("\\bhttps?://(<[^>]*>|\\S)*", "i");

    // Given a URL match, build the link element and return it for =
insertion into parent element.
    function replacementDelegate(match)
    {
        var linkText =3D match[0];

        var linkNode =3D document.createElement("A");
        linkNode.href =3D GetText(linkText);
        linkNode.target =3D "_blank";

        // Set a click handler so we can cancel event bubbling to parent =
nodes.
        linkNode.onclick =3D function(e)
        {
            if (!e) e =3D GetEvent(e);
            if (e.stopPropagation) e.stopPropagation();
        }

        linkNode.innerHTML =3D linkText;
        return linkNode;
    }

    SetTextWithReplacement(element, text, linkMatcher, =
replacementDelegate);
}

// Set the text content of the element.
// Replace matches of regExp with element returned by =
replacementDelegate(match).
function SetTextWithReplacement(element, text, regExp, =
replacementDelegate)
{
    // Remove any existing children.
    element.innerHTML =3D "";
   =20
    var match;
    while (match =3D regExp.exec(text))
    {
        // Append any html before the match to the note
        if (RegExp.leftContext)
        {
            element.innerHTML +=3D RegExp.leftContext;
        }

        // Continue matching the remaining text after the match
        // Do this before calling the delegate in case they invoke a =
regex that would
        // mess up RegExp.rightContext
        text =3D RegExp.rightContext;

        // create a div and append the element to get outerHTML
        var replacementElement =3D CreateElement("div");
        replacementElement.appendChild(replacementDelegate(match));

        element.innerHTML +=3D replacementElement.innerHTML;
    }

    // Add html for any text remaining after last match.
    if (text)
    {
        element.innerHTML +=3D text;
    }
}

function SetChild(element, childElement)
{
    while (element.hasChildNodes())
    {
        element.removeChild(element.firstChild);
    }

    element.appendChild(childElement);
}

function GetWindowHeight()
{
    if (g_bIsSafari || !g_bIsMozilla)
    {
        return document.documentElement.clientHeight;
    }
    else
    {
        return window.innerHeight;
    }
}

function GetWindowWidth()
{
    if (g_bIsSafari || !g_bIsMozilla)
    {
        return document.documentElement.clientWidth;
    }
    else
    {
        return window.innerWidth;
    }
}

function SetVisible(el, bVisible, visibleDisplayType)
{
    if (el)
    {
        // actually changes layout rather than visibility
        if (bVisible)
        {
            el.style.display =3D visibleDisplayType ? visibleDisplayType =
: "block";
        }
        else
        {
            el.style.display =3D "none";
        }
    }
}

function GetSrcElement(e)
{
    if (g_bIsMozilla)
    {
        return e.target;
    }
    else
    {
        return e.srcElement;
    }
}


function GetParentElement(pEl)
{
    if (g_bIsMozilla)
    {
        return pEl.parentNode;
    }
    else
    {
        return pEl.parentElement;
    }
}


// browser/silverlight detect helpers
var g_bIsIE =3D false;
var g_bIsIE6 =3D false;
var g_bIsMozilla =3D false;
var g_bIsSafari =3D false;
var g_bIsMac =3D false;
var g_bUsingSilverlight =3D false;
var g_sSilverlightVersion =3D "2.0.31005.0";

var sAgent =3D navigator.userAgent.toLowerCase();
if (sAgent.indexOf("msie") !=3D -1)
{
    g_bIsIE =3D true;
    if (sAgent.indexOf("msie 6") !=3D -1) g_bIsIE6 =3D true;
}
else if (sAgent.indexOf("mozilla") !=3D -1) g_bIsMozilla =3D true;
if (sAgent.indexOf("safari") !=3D -1) g_bIsSafari =3D true;
if (sAgent.indexOf("mac os x") !=3D -1) g_bIsMac =3D true;


function FormatRelativeTime(dSeconds)
{
    // hooray, javascript
    function pad(int)
    {
        return int =3D (int < 10) ? '0' + int : int;
    }

    // surely there is some built-in way to do this
    var iHours =3D Math.floor(dSeconds / 3600);
    var iMinutes =3D Math.floor((dSeconds / 60) % 60);
    var iSeconds =3D Math.floor(dSeconds % 60);

    if (iHours > 0)
    {
        return iHours + ":" + pad(iMinutes) + ":" + pad(iSeconds);
    }
    else
    {
        return iMinutes + ":" + pad(iSeconds);
    }
}

function FormatFileTime(lSeconds)
{
    // convert time from windows file time epoch to unix timestamp =
epoch.  convert from seconds to millis.
    var javascriptTime =3D (lSeconds - 11644473600) * 1000;

    var pTime =3D new Date();
    pTime.setTime(javascriptTime);
   =20
    var h =3D pTime.getHours();
    var m =3D pTime.getMinutes();
    var s =3D pTime.getSeconds();
    var period =3D (h < 12 ? "am" : "pm");
   =20
    if( h > 12 )
    {
        h -=3D 12;
    }
   =20
    function padTime(i, c)
    {
        if (i < 10)
        {
            i =3D c + i;
        }
        return i;
    }

    h =3D padTime(h, "<span style=3D'visibility:hidden'>0</span>");
    m =3D padTime(m, "0");
    s =3D padTime(s, "0");

    return h + ":" + m + ":" + s + " " + period;
}

// XMLHttpRequest support methods

// Wikipedia.org: Here is a patch allowing direct invocation of =
XMLHttpRequest in browsers that don't supply one directly:
// BUGBUG:  untested.
if (!window.XMLHttpRequest) XMLHttpRequest =3D function()
{
    try { return new ActiveXObject("MSXML3.XMLHTTP") } catch (e) { }
    try { return new ActiveXObject("MSXML2.XMLHTTP.3.0") } catch (e) { }
    try { return new ActiveXObject("Msxml2.XMLHTTP") } catch (e) { }
    try { return new ActiveXObject("Microsoft.XMLHTTP") } catch (e) { }
    throw new Error("Could not find an XMLHttpRequest alternative.")
};

// execute an XMLHttpRequest using the specified callback function =
(after checking response validity)
// the properties of the params object form the name/value pairs to be =
passed as parameters
// e.g. params =3D { queryParam1: "value", queryParam2: "value2" };
function CreateRequest(url, params, fnCallback)
{
    var request =3D new XMLHttpRequest();

    request.open("POST", url, true);
    request.setRequestHeader("Content-Type", =
"application/x-www-form-urlencoded");

    request.onreadystatechange =3D function()
    {
        if (request.readyState =3D=3D 4 && fnCallback !=3D null)
        {
            if (request.status =3D=3D 200 && request.responseXML)
            {
                fnCallback(request.responseXML.documentElement, true);
            }
            else
            {
                fnCallback(null, false);
            }
        }
    };

    var paramArray =3D new Array();
    for (var param in params)
    {
        if (params[param])
        {
            paramArray.push(param + "=3D" + params[param]);
        }
    }

    var strVars =3D paramArray.join("&");

    request.send(strVars);
}


// xml parsing helper functions
function SelectNodes(pParent, sTag)
{
    if (g_bIsMozilla)
    {
        var pEvaluator =3D new XPathEvaluator();
        var pResult =3D pEvaluator.evaluate(sTag, pParent, null, =
XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);

        var arrNodes =3D new Array();

        if (pResult !=3D null)
        {
            var pElement =3D pResult.iterateNext();
            while (pElement)
            {
                arrNodes.push(pElement);
                pElement =3D pResult.iterateNext();
            }
        }

        return arrNodes;
    }
    else
    {
        return pParent.selectNodes(sTag);
    }
}

function SelectSingleNode(pParent, sTag)
{
    if (g_bIsMozilla)
    {
        var pEvaluator =3D new XPathEvaluator();
        var pResult =3D pEvaluator.evaluate(sTag, pParent, null, =
XPathResult.FIRST_ORDERED_NODE_TYPE, null);

        if (pResult !=3D null)
        {
            return pResult.singleNodeValue;
        }
        else
        {
            return null;
        }
    }
    else
    {
        return pParent.selectSingleNode(sTag);
    }
}

function SelectSingleNodeValue(pParent, sTag, type)
{
    var pNode =3D SelectSingleNode(pParent, sTag);
    if (!pNode)
    {
        return null;
    }

    var value;
    if (g_bIsIE)
    {
        value =3D pNode.text;
    }
    else if (g_bIsMozilla)
    {
        value =3D pNode.textContent;
    }

    if (type =3D=3D "float")
    {
        return parseFloat(value);
    }
    else if (type =3D=3D "int")
    {
        return parseInt(value);
    }
    else if (type =3D=3D "bool")
    {
        return (value =3D=3D "true");
    }
    else
    {
        return value;
    }
}

function getCookie(c_name)
{
    if (document.cookie.length > 0)
    {
        c_start =3D document.cookie.indexOf(c_name + "=3D");
        if (c_start !=3D -1)
        {
            c_start =3D c_start + c_name.length + 1;
            c_end =3D document.cookie.indexOf(";", c_start);
            if (c_end =3D=3D -1)
            {
                c_end =3D document.cookie.length;
            }
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}

function setCookie(c_name, value, expiredays)
{
    var exdate =3D new Date();
    exdate.setDate(exdate.getDate() + expiredays);
    document.cookie =3D c_name + "=3D" + escape(value) + ((expiredays =
=3D=3D null) ? "" : ";expires=3D" + exdate.toGMTString());
}

function deleteCookie(c_name)
{
    document.cookie =3D c_name + '=3D; expires=3DThu, 01-Jan-70 00:00:01 =
GMT;';
}

// selects the value from the dropdown and calls onchange()
// if successful, returns true, otherwise, false
function selectDropdownValue(dropdown, value)
{
    var exists =3D false;
    for (var i =3D 0; i < dropdown.length; i++)
    {
        if (dropdown[i].value =3D=3D value)
        {
            dropdown.selectedIndex =3D i;
            dropdown[i].selected =3D true;
            dropdown.onchange();
            exists =3D true;
            break;
        }
    }

    return exists;
}

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/TabViewer.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

var g_dTabBarOffsetHeight =3D 26;
var g_dImageAspect =3D (4/3);
var g_dTabViewerContentPadding =3D 10;

// tab viewer for object and image streams
function TabViewer(el, viewer, useLargeTabs)
{
    var m_el =3D el;
    var m_pViewer =3D viewer;

    // Hash of [ViewID] =3D> [View]
    var m_hshViews =3D new Object();
    var m_pSelectedView =3D null;

    var m_arrPlayers =3D new Object();
   =20
    var m_pLastStatus =3D null;
   =20
    // create our tab control
    var m_pTabControl =3D new TabControl(document.getElementById( =
"tabViewerBar" ), Function.createDelegate(this, OnSelectView), =
useLargeTabs);

    // create our content div
    var m_elContent =3D document.getElementById("tabContent");

    // height passed in to onresize - available height for content - =
width recorded during onresize
    var m_dContentHeightAvailable;
    var m_dContentWidthAvailable;
    var m_dContentWidth;
    var m_dContentHeight;

    // create our object video player
    var el =3D CreateChildElement(m_elContent, "div", "contentArea");
    if (g_bUsingSilverlight)
    {
        m_arrPlayers["Object"] =3D new SilverlightVideoPlayer(el, =
"objectVideoPlayer", m_pViewer);
    }
    else
    {
        m_arrPlayers["Object"] =3D new VideoPlayer(el, =
"objectVideoPlayer", false);
    }
    m_pViewer.SetObjectVideoPlayer( m_arrPlayers["Object"] );
    m_arrPlayers["Object"].SetVisible(false);

    // create our image viewer
    el =3D CreateChildElement(m_elContent, "div", "contentArea");
    m_arrPlayers["Image"] =3D new ImageViewer(el);
    m_arrPlayers["Image"].SetVisible(false);

    // create our PDF viewers
    el =3D CreateChildElement(m_elContent, "div", "contentArea");
    m_arrPlayers["PDF"] =3D new PDFViewer(el);
    m_arrPlayers["PDF"].SetVisible(false);

    // Buttons for maximizing / restoring / fullscreening object region
    var objectZoomInButton =3D =
document.getElementById("objectZoomInButton");
    var objectZoomInDisabledButton =3D =
document.getElementById("objectZoomInDisabledButton");
    objectZoomInButton.onclick =3D Clicker(objectZoomInButton, =
Function.createDelegate(this, Zoom), true);

    var objectZoomOutButton =3D =
document.getElementById("objectZoomOutButton");
    var objectZoomOutDisabledButton =3D =
document.getElementById("objectZoomOutDisabledButton");
    objectZoomOutButton.onclick =3D Clicker(objectZoomOutButton, =
Function.createDelegate(this, Zoom), false);

    var zoomLevel =3D "default";
    var canFullscreenFromJS =3D false;

    // Zoom(true) -> Zoom in, Zoom(false) -> Zoom out, Zoom(null) -> =
Toggle
    function Zoom(bZoomIn)
    {
        if((zoomLevel =3D=3D "default") && (bZoomIn || (bZoomIn =3D=3D =
null)))
        {
            SetZoomLevel("zoomed");
        }
        else if(zoomLevel =3D=3D "zoomed")
        {
            if(bZoomIn)
            {
                SetZoomLevel("fullScreen");
            }
            else
            {
                SetZoomLevel("default");
            }
        }
    }
   =20
    // For SL, only "default" and "zoomed" are valid.
    // Full screen can only be triggered from w/in SL plugin by user =
action.
    function SetZoomLevel(level)
    {
        switch (level)
        {
            case "default":
                {
                    objectZoomInButton.style.display =3D "inline";
                    objectZoomInDisabledButton.style.display =3D "none";
                    objectZoomOutButton.style.display =3D "none";
                    objectZoomOutDisabledButton.style.display =3D =
"inline";

                    =
m_pViewer.ToggleObjectRegionMaximized.call(m_pViewer, false);

                    zoomLevel =3D level;

                    break;
                }
            case "zoomed":
                {
                    objectZoomInButton.style.display =3D =
(canFullscreenFromJS ? "inline" : "none");
                    objectZoomInDisabledButton.style.display =3D =
(canFullscreenFromJS ? "none" : "inline");
                    objectZoomOutButton.style.display =3D "inline";
                    objectZoomOutDisabledButton.style.display =3D =
"none";

                    =
m_pViewer.ToggleObjectRegionMaximized.call(m_pViewer, true);

                    zoomLevel =3D level;

                    break;
                }
            case "fullScreen":
                {
                    if (canFullscreenFromJS)
                    {
                        m_arrPlayers["Object"].SetFullScreen(true);
                    }
                }=20
        }
    }

    // callback for clicking on tabs
    // can pass in null to hide the current view
    function OnSelectView(pView)
    {
        // if the current player no longer is needed then hide it
        if (m_pSelectedView && (!pView || (m_pSelectedView.Type !=3D =
pView.Type)))
        {
            m_arrPlayers[m_pSelectedView.Type].SetVisible(false);
        }

        if (m_pSelectedView !=3D pView)
        {
            m_pSelectedView =3D pView;

            // If we're switching to a WMP tab, enable full screen in =
zoom sequence.
            canFullscreenFromJS =3D (pView && (pView.Type =3D=3D =
"Object") && !g_bUsingSilverlight);
            if (canFullscreenFromJS)
            {
                objectZoomInButton.style.display =3D "inline";
                objectZoomInDisabledButton.style.display =3D "none";
            }

            // if we don't have a selected view, return
            if (!m_pSelectedView)
            {
                return;
            }

            // show player for this view
            m_arrPlayers[pView.Type].SetVisible(true);

            // resize the entire viewer
            m_pViewer.Resize();

            // For non-broadcast object videos, set callback to =
synchronize play state with main video when leaving buffering mode
            var objectVideoPlayStateCallback =3D null;
            if ((pView.Type =3D=3D "Object") && !m_pViewer.isLive)
            {
                objectVideoPlayStateCallback =3D =
m_pViewer.OnObjectVideoPlayStateChanged;
            }
           =20
            m_arrPlayers[pView.Type].Initialize(pView, null, =
objectVideoPlayStateCallback);

            if (m_pLastStatus)
            {
                m_arrPlayers[pView.Type].UpdateStatus(m_pLastStatus, =
true);
            }
        }
    }
   =20
    // Update our views hash with current streams and update currently =
selected view if necessary.
    this.SetViews =3D function SetViews(arrViews)
    {
        var bViewerHasObjectRegion =3D m_pViewer.GetHasObjectRegion();

        // SetHasObjectRegion triggers a resize, so only call it if =
we're changing state.     =20
        if ((!bViewerHasObjectRegion && arrViews.length) ||
            (bViewerHasObjectRegion && !arrViews.length))
        {
            m_pViewer.SetHasObjectRegion(!bViewerHasObjectRegion);
        }

        var bViewAdded =3D false;
        for (var viewID in arrViews)
        {
            var pView =3D arrViews[viewID];

            // If we already have a tab for this view, skip.
            if (m_hshViews[pView.ViewID])
            {
                m_hshViews[pView.ViewID].AbsoluteEnd =3D =
pView.AbsoluteEnd;
                continue;
            }

            bViewAdded =3D true;

            // If stream is not being broadcast, skip in broadcast =
viewer.
            if (m_pViewer.isLive && !pView.IsBroadcast) continue;

            // Add view to hash.
            m_hshViews[pView.ViewID] =3D pView;

            m_pTabControl.AddView(pView);
        }

        // Disable streams that are not active current video/broadcast =
time
        this.UpdateViewsEnabledStatus(0);

        if (!m_pSelectedView || bViewAdded)
        {
            m_pTabControl.UpdateCurrentView();
        }
    }

    this.SelectView =3D function(viewID)
    {
        var pView =3D m_hshViews[viewID];

        if (pView)
        {
            m_pTabControl.SelectView(pView);
        }
    }
   =20
    // Enable and disable tabs based on the video time (playback) or =
stream open state (live).
    this.UpdateViewsEnabledStatus =3D function =
UpdateViewsEnabledStatus(fTime)
    {
        for (var viewID in m_hshViews)
        {
            var pView =3D m_hshViews[viewID];

            // Skip non-stream views.
            // BUGBUG: We should probably calculate the start/end of PPT =
evts and enable/disable view appropriately.
            if (pView.Type !=3D "Object")
            {
                continue;
            }

            if (m_pViewer.isLive)
            {
                // If stream is finished, disable tab.
                if (pView.AbsoluteEnd)
                {
                    m_pTabControl.SetViewDisabled(pView, true);
                }
            }
            else
            {
                var fTargetObjPos;

                if (pView.Segments)
                {
                    var iTargetSeg =3D 0;
                    while ((iTargetSeg < pView.Segments.length) && =
(pView.Segments[iTargetSeg].RelativeStart <=3D fTime))
                    {
                        iTargetSeg++;
                    }
                    iTargetSeg--;

                    var pTargetSeg =3D pView.Segments[iTargetSeg];

                    fTargetObjPos =3D pTargetSeg.Offset + fTime - =
pTargetSeg.RelativeStart;
                }
                else
                {
                    // our target with respect to the archival video
                    fTargetObjPos =3D fTime - pView.RelativeStart;
                }

                var fStreamLength =3D pView.RelativeEnd - =
pView.RelativeStart;

                // Disable view if current video position is outside of =
stream bounds
                var bDisable =3D ((fTargetObjPos < 0) || (fTargetObjPos =
> fStreamLength));

                m_pTabControl.SetViewDisabled(pView, bDisable);
            }
        }
    }
   =20
    // process a status event
    this.UpdateStatus =3D function(pEvent, bUserInitiated)
    {
        m_pLastStatus =3D pEvent;

        // update the enabled status for all of our views
        this.UpdateViewsEnabledStatus(pEvent.Time);

        // send this status update to the current player
        if (m_pSelectedView)
        {
            m_arrPlayers[m_pSelectedView.Type].UpdateStatus(pEvent, =
bUserInitiated);
        }
    }
   =20
    this.OnResize =3D function OnResize(controlHeight, controlWidth)
    {
        // calculate the amount of height we have for content and resize =
our content div
        var contentTop =3D m_elContent.offsetTop;
        m_dContentHeightAvailable =3D controlHeight - contentTop - =
g_dTabViewerContentPadding * 2;
             =20
        // keep track of the width we have available - adjust width by =
content padding
        m_dContentWidthAvailable =3D controlWidth - =
(g_dTabViewerContentPadding * 2);
       =20
        // resize the content control
        ResizeContent();
       =20
        // Spacing required to vertically center the object material
        var contentPaddingTop =3D Math.floor((m_dContentHeightAvailable =
- m_dContentHeight) / 2);
        m_elContent.style.paddingTop =3D contentPaddingTop + "px";
       =20
        m_elContent.style.height =3D m_dContentHeightAvailable - =
contentPaddingTop + (g_dTabViewerContentPadding * 2) + "px";
       =20
        // resize our outer div
        m_el.style.height =3D m_dContentHeightAvailable + =
(g_dTabViewerContentPadding * 2) + contentTop + "px";
    }
   =20
    // figure out how large our content control should be and call its =
resize function
    function ResizeContent()
    {
        var aspect =3D null;
        var bHavePlayer =3D false;
        if( m_pSelectedView && m_arrPlayers[m_pSelectedView.Type] )
        {
            aspect =3D m_arrPlayers[m_pSelectedView.Type].AspectRatio;
            bHavePlayer =3D true;
        }
        else
        {
            aspect =3D g_dImageAspect;
        }
       =20
        // if our player isn't bound by aspect ratio use all available =
space
        if( !aspect && bHavePlayer )
        {
            m_dContentWidth =3D m_dContentWidthAvailable;
            m_dContentHeight =3D m_dContentHeightAvailable;
            m_arrPlayers[m_pSelectedView.Type].SetSize( m_dContentWidth, =
m_dContentHeight );
            return;
        }
       =20
        // determine the actual width and height we will use
        var desiredHeight =3D m_dContentWidthAvailable / aspect;
       =20
        // figure out whether to use full height and adjust width or the =
full width with adjusted hight
        if( desiredHeight > m_dContentHeightAvailable )
        {
            m_dContentWidth =3D Math.floor(m_dContentHeightAvailable * =
aspect);
            m_dContentHeight =3D m_dContentHeightAvailable;
        }
        else
        {
            m_dContentWidth =3D m_dContentWidthAvailable;
            m_dContentHeight =3D Math.floor(m_dContentWidthAvailable / =
aspect);
        }
       =20
        if( bHavePlayer )
        {
            m_arrPlayers[m_pSelectedView.Type].SetSize( m_dContentWidth, =
m_dContentHeight );
        }
    }
   =20
    this.GetContentWidth =3D function()
    {
        return m_dContentWidth;
    }       =20
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
    }
}



// the image viewer control - displays "image" event targets such as =
PowerPoint slides
function ImageViewer(el)
{
    var m_el =3D el;

    // Hack IE6 to use AlphaImageLoader filter on DIV instead of IMG =
tag.
    var elementType =3D g_bIsIE6 ? "div" : "img";

    var m_pImage =3D CreateChildElement(m_el, elementType, =
"imageViewerImage");
    var m_pCurImageUrl =3D null;
    var m_dImageWidth;
    var m_dImageHeight;
    var m_pLastEvent =3D null;
    var m_arrTimestamps =3D null;

    // this is needed by TabViewer for layout
    this.AspectRatio =3D g_dImageAspect;

    this.Initialize =3D function(pStream)
    {
        m_arrTimestamps =3D pStream.Timestamps;
    }

    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
    }

    this.UpdateStatus =3D function(pEvent)
    {
        m_pLastEvent =3D pEvent;

        // if SetSize hasn't yet been called then return
        if (!m_dImageHeight || !m_dImageWidth)
            return;

        var iItem =3D GetCurrentItem(m_arrTimestamps, pEvent.Time);
        var pImage =3D m_arrTimestamps[iItem];

        var url =3D g_urlImage + "?id=3D" + pImage.EventTargetID + =
"&number=3D" + pImage.SequenceNumber + "&x=3D" + m_dImageWidth;
        if (url !=3D m_pCurImageUrl)
        {
            m_pCurImageUrl =3D url;

            // Use AlphaImageLoader to get slightly better resizing in =
IE6
            if (g_bIsIE6)
            {
                m_pImage.style.filter =3D =
"progid:DXImageTransform.Microsoft.AlphaImageLoader(src=3D'" + url + "', =
sizingMethod=3D'scale')";
            }
            else
            {
                m_pImage.src =3D url;
            }
        }
    }

    this.SetSize =3D function(contentWidth, contentHeight)
    {
        m_dImageHeight =3D contentHeight;
        m_dImageWidth =3D Math.floor(contentWidth);

        m_el.style.width =3D contentWidth + "px";
        m_pImage.style.width =3D m_dImageWidth + "px";

        // Can probably run this for all browsers, but minimize impact =
of IE6 smooth-scaling hack.
        if (g_bIsIE6)
        {
            m_el.style.height =3D contentHeight + "px";
            m_pImage.style.height =3D m_dImageHeight + "px";
        }
    }
}


// the PDF viewer control - displays a static PDF alongside timeline =
content in the viewer
function PDFViewer(el)
{
    var m_el =3D el;

    var m_pIframe =3D CreateChildElement(m_el, "iframe", =
"imageViewerImage");

    this.NoThumbs =3D true;

    this.Initialize =3D function(pPDFEventTarget)
    {
        if (m_pIframe.src !=3D pPDFEventTarget.URL)
        {
            // Detect Acrobat plugin, without redirecting on failure to =
find (DetectAcrobat.js)
            if (detectPDF(null, false) || g_bIsMac)
            {
                m_pIframe.src =3D pPDFEventTarget.URL;
            }
            else
            {
                var textDiv =3D CreateElement("DIV", null, =
"adobeReaderDownloadTextDiv");
                AppendText(textDiv, "Adobe Reader is required to view =
Acrobat documents in your browser.");
                CreateChildElement(textDiv, "BR");
                AppendText(textDiv, "To download Adobe Reader, click the =
image below.");
                CreateChildElement(textDiv, "BR");
                CreateChildElement(textDiv, "BR");
                AppendText(textDiv, "You may need to restart your =
browser after installing the Adobe Reader plugin.");

                SetChild(m_el, textDiv);

                var adobeReaderDownloadDiv =3D CreateChildElement(m_el, =
"DIV", null, "adobeReaderDownloadDiv");

                var adobeReaderDownloadImg =3D =
CreateChildElement(adobeReaderDownloadDiv, "IMG");
                adobeReaderDownloadImg.src =3D "GetAdobeReader.gif";
                adobeReaderDownloadImg.onclick =3D function() { =
window.open("http://www.adobe.com/products/acrobat/readstep2.html", =
"acrobatDownload"); };
            }
        }
    }

    this.SetVisible =3D function(bVisible)
    {
        if( bVisible )
        {
            el.style.display =3D "block";
            el.style.visibility =3D "visible";
        }
        else
        {
            el.style.visibility =3D "hidden";
        }
    }

    this.UpdateStatus =3D function(pEvent)
    {
    }

    this.SetSize =3D function(contentWidth, contentHeight)
    {
        var dWidth =3D Math.floor(contentWidth);
        var dHeight =3D Math.floor(contentHeight);

        m_el.style.width =3D dWidth + "px";
        m_el.style.height =3D dHeight + "px";
        m_pIframe.style.width =3D dWidth + "px";
        m_pIframe.style.height =3D dHeight + "px";
    }
}


// control for rendering tab bar and switching between views
function TabControl(el, selectViewCallback, useLargeTabs)
{
    var m_tabsEl =3D el;
    var m_selectViewCallback =3D selectViewCallback;
   =20
    // Hash of [StreamID] =3D> [View]
    var m_hshViews =3D new Object();
    var m_pSelectedView =3D null;
   =20
    var m_bUseLargeTabs =3D useLargeTabs;

    this.AddView =3D function(pView)
    {
        // If we already have a tab for this view, skip.
        if (m_hshViews[pView.ViewID]) return;
       =20
        // Add view to hash.
        m_hshViews[pView.ViewID] =3D pView;
   =20
        var tabClass =3D GetTabClass(false, pView.Disabled);
        pView.Div =3D CreateChildElement(m_tabsEl, "div", tabClass);
        pView.Div.innerHTML =3D pView.Title;
        pView.Div.onselectstart =3D function() { return false; };

        function OnTabClick(viewID)
        {
            var pClickedView =3D m_hshViews[viewID];

            // if the view is already selected or disabled then return
            if ((pClickedView =3D=3D m_pSelectedView) || =
pClickedView.Disabled)
            {
                return;
            }
           =20
            this.SelectView(m_hshViews[viewID]);
        }

        pView.Div.onclick =3D Clicker(pView.Div, =
Function.createDelegate(this, OnTabClick), pView.ViewID);
    }
   =20
    // called when a tab or event is clicked
    this.SelectView =3D function(pView)
    {
        // if we aren't changing anything then return
        if (pView =3D=3D m_pSelectedView)
            return;

        // call callback if present=20
        if (m_selectViewCallback)
            m_selectViewCallback(pView);

        // unselect the currently selected tab
        if (m_pSelectedView)
        {
            m_pSelectedView.Div.className =3D GetTabClass(false, =
m_pSelectedView.Disabled);
        }

        // update the new view and change its tab
        m_pSelectedView =3D pView;
        if (m_pSelectedView)
        {
            m_pSelectedView.Div.className =3D GetTabClass(true, false);
        }
    }
   =20
    // go through all the views and select the first that is enabled
    this.UpdateCurrentView =3D function()
    {
        // If no streams are found to select, SelectView(null) will =
display a blank page.
        var pSelectedView =3D null;

        for (var viewID in m_hshViews)
        {
            var pView =3D m_hshViews[viewID];

            if (!pView.Disabled)
            {
                // If we have no selected view, any enabled view trumps
                if (!pSelectedView)
                {
                    pSelectedView =3D pView;
                }
                // If the current view is not a stream, stream views =
trump
                else if(!pSelectedView.AbsoluteStart && =
pView.AbsoluteStart)
                {
                    pSelectedView =3D pView;
                }
                // If the current view is a stream, more recent streams =
trump
                else if((pSelectedView.AbsoluteStart && =
pView.AbsoluteStart) && (pView.AbsoluteStart > =
pSelectedView.AbsoluteStart))
                {
                    pSelectedView =3D pView;
                }
            }
        }

        this.SelectView(pSelectedView);
    }
   =20
    // call to enable/disable views
    this.SetViewDisabled =3D function SetViewDisabled(view, bDisabled)
    {
        if (bDisabled)
        {
            // if we are already disabled do nothing
            if (view.Disabled)
            {
                return;
            }

            if (view.Div)
            {
                view.Div.className =3D GetTabClass(false, true);
            }
            view.Disabled =3D true;

            // if we have disabled the selected view, then select the =
first non-disabled view
            if (view =3D=3D m_pSelectedView)
            {
                this.UpdateCurrentView();
            }
        }
        else
        {
            // if we are disabled change the tab
            if (view.Disabled)
            {
                view.Div.className =3D GetTabClass(false, false);
                view.Disabled =3D false;

                // Auto-select newly-enabled tabs.
                this.SelectView(view);
            }
        }
    }
   =20
    function GetTabClass(isSelected, isDisabled)
    {
        var strTabClass =3D isSelected ? "tabDivSelected" : "tabDiv";
        strTabClass =3D isDisabled ? "tabDivDisabled" : strTabClass;

        strTabClass +=3D " ";

        if(isSelected)
        {
            strTabClass +=3D m_bUseLargeTabs ? "tabImageSelected_large" =
: "tabImageSelected_small";
        }
        else
        {
            strTabClass +=3D m_bUseLargeTabs ? "tabImage_large" : =
"tabImage_small";
        }
       =20
        return strTabClass;
    }
}



------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/EventsViewer.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

var g_dBroadcastLatencyEstimate =3D 13.0;

var g_cPaneDefaultTopPadding =3D 10;
var g_cPaneContentDividerWidth =3D 1;
var g_cQuestionEntryHeight =3D 30;

var g_cEventViewerMinHeight =3D 20;
var g_cTimeGroupSize =3D 3;

var g_cEventVisualHoverDelay =3D 250;

// tab control that hosts multiple event viewers
function EventTabViewer(el, pViewer)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;
   =20
    var m_pLastStatus =3D null;
    var m_pSelectedView =3D null;
   =20
    // create our tab control (boolean specifies small tabs)
    var m_pTabControl =3D new TabControl(document.getElementById( =
"eventViewerBar" ), OnSelectView, false);
   =20
    // create the info tab
    var m_pInfo =3D new InfoTab(document.getElementById("infoDiv"), =
m_pViewer);
    m_pInfo.Title =3D "Info";
    m_pInfo.ViewID =3D "Info";
    m_pInfo.SetVisible(false);
   =20
    // create our table of contents
    var m_pContents =3D new TocViewer(
        document.getElementById("tocDiv"),
        m_pViewer,
        "tocSearchBox",=20
        "tocSearchButton");
    m_pContents.Title =3D "Contents";
    m_pContents.ViewID =3D "Contents";
    m_pContents.SetVisible(false);
   =20
    // create our transcript viewer
    var m_pTranscript =3D new TocViewer(
        document.getElementById("transDiv"),
        m_pViewer,
        "transSearchBox",=20
        "transSearchButton");
    m_pTranscript.Title =3D "Captions";
    m_pTranscript.ViewID =3D "Captions";
    m_pTranscript.SetVisible(false);
   =20
    // create our notes viewer (current disabled)
    var m_pNotes =3D new =
NotesViewer(document.getElementById("notesDiv"), m_pViewer);
    m_pNotes.Title =3D "Notes";
    m_pNotes.ViewID =3D "Notes";
    m_pNotes.SetVisible(false);
   =20
    // create our search tab
    var m_pSearch =3D new =
SearchViewer(document.getElementById("searchDiv"), m_pViewer);
    m_pSearch.Title =3D "Search";
    m_pSearch.ViewID =3D "Search";
    m_pSearch.SetVisible(false);

    this.RenderContents =3D function (arrEvents, arrTranscriptEvents)
    {
        // initialize our tab control with our array of viewers

        // Contents
        if (arrEvents.length > 0)
        {
            // don't show empty captions in the toc
            var validEvents =3D new Array();
            for (var i =3D 0; i < arrEvents.length; i++)
            {
                if (arrEvents[i].Caption && (arrEvents[i].Caption.length =
> 0))
                {
                    validEvents.push(arrEvents[i]);
                }
            }

            if (validEvents.length > 0)
            {
                m_pTabControl.AddView(m_pContents);
                m_pContents.RenderContents(validEvents);
            }
        }

        // Transcript
        if (arrTranscriptEvents.length > 0)
        {
            m_pTabControl.AddView(m_pTranscript);
            m_pTranscript.RenderContents(arrTranscriptEvents);
        }
        else
        {
            document.getElementById("searchTranscript").style.display =
=3D "none";
        }

        // Notes
        m_pTabControl.AddView(m_pNotes);
        m_pNotes.RenderContents();

        // Search
        if (!m_pViewer.isLive)
        {
            m_pTabControl.AddView(m_pSearch);
        }

        // Info
        m_pTabControl.AddView(m_pInfo);

        // Hack to accomodate 5 event viewer tabs.
        if ((arrEvents.length > 0) && (arrTranscriptEvents.length > 0) =
&& !m_pViewer.isLive)
        {
            // make the event viewer a little larger than it would =
normally be
            g_dMinEventViewerWidth =3D 415;
            g_dMinViewerWidth =3D 1004;
            m_pViewer.Resize();
        }

        m_pTabControl.UpdateCurrentView();
    }

    this.UpdateStatus =3D function UpdateStatus(status)
    {
        m_pLastStatus =3D status;

        if (m_pSelectedView)
        {
            m_pSelectedView.UpdateStatus(status);
        }
    }

    // callback for clicking on tabs
    function OnSelectView(pView)
    {
        // If we're selecting a new tab, hide the old one
        if (m_pSelectedView && (m_pSelectedView !=3D pView))
        {
            m_pSelectedView.SetVisible(false);
        }

        m_pSelectedView =3D pView;

        if (m_pLastStatus)
        {
            m_pSelectedView.UpdateStatus(m_pLastStatus);
        }
       =20
        m_pSelectedView.SetVisible(true);
        m_pSelectedView.SetFocus();
    }

    this.SetHeight =3D function SetHeight(controlHeight)
    {
        var eventViewerHeight =3D controlHeight - g_dContainerSpacing;
        m_el.style.height =3D controlHeight - g_dContainerSpacing + =
"px";

        // Client panes get eventViewerHeight minus tab bar height
        m_pInfo.OnResize(eventViewerHeight - g_dTabBarOffsetHeight);
        m_pContents.OnResize(eventViewerHeight - g_dTabBarOffsetHeight);
        m_pTranscript.OnResize(eventViewerHeight - =
g_dTabBarOffsetHeight);
        m_pSearch.OnResize(eventViewerHeight - g_dTabBarOffsetHeight);
        if (!m_pNotes.Disabled)
        {
            m_pNotes.OnResize(eventViewerHeight - =
g_dTabBarOffsetHeight);
        }
    }
   =20
    this.SetWidth =3D function SetWidth(controlWidth)
    {
        m_el.style.width =3D controlWidth + "px";
    }

    this.CurrentlySelectedTab =3D function()
    {
        return m_pSelectedView ? m_pSelectedView.Title : null;
    }

    this.SearchCurrentEventTab =3D function (strQuery)
    {
        // needs to be in sync with searchTypeBox values
        var strType =3D null;
        switch (m_pSelectedView.ViewID)
        {
            case "Contents": strType =3D "ppt"; break;
            case "Captions": strType =3D "transcript"; break;
            case "Notes": strType =3D "notes"; break;
        }

        if (m_pSelectedView !=3D m_pSearch)
        {
            m_pTabControl.SelectView(m_pSearch);
        }

        m_pSearch.Search(strType, strQuery);
    }
}

// Info tab (presenter name, bio, etc.)
function InfoTab(el, pViewer)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;
    var m_elInfoContents =3D document.getElementById("infoContents");
    var m_elSpeakerBios =3D document.getElementById("speakerBios");

    var contributors =3D pViewer.contributors;

    for (var i =3D 0; i < contributors.length;  i++)
    {
        var displayName =3D contributors[i].DisplayName;

        if (displayName && (displayName.length > 0))
        {
            // BUGBUG: Convert consecutive spaces to &nbsp; ?
            var bio =3D contributors[i].Bio;

            CreateChildElement(m_elSpeakerBios, "HR");

            var table =3D CreateChildElement(m_elSpeakerBios, "TABLE", =
"info");
            var row =3D table.insertRow(-1);

            var labelCell =3D row.insertCell(-1);
            labelCell.className =3D "label";
            SetText(labelCell, "Presenter:");

            var speakerCell =3D row.insertCell(-1);
            SetText(speakerCell, displayName);

            var bioText =3D CreateChildElement(m_elSpeakerBios, "DIV", =
"contentText");
            SetTextWithLinks(bioText, bio);
            SetTextWithNewlineTranslation(bioText, bioText.innerHTML);
        }
    }

    this.RenderContents =3D function() { }
   =20
    this.UpdateStatus =3D function(status) { }
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);

        // resize
        if (bVisible)
        {
            m_pViewer.Resize();
        }
    }
   =20
    this.SetFocus =3D function() { }

    this.OnResize =3D function OnResize(controlHeight)
    {
        m_el.style.height =3D controlHeight + "px";
        m_elInfoContents.style.height =3D controlHeight + "px";
    }
}

function EventVisualGroup(elParent, eventTime, pViewer)
{
    var m_inlined =3D true;

    var m_bHovering =3D false;
    var m_bChildHovering =3D false;
    var m_bChildSelected =3D false;

    var m_groupDiv =3D CreateChildElement(elParent, "div", =
"eventVisualGroup");
    m_groupDiv.onmouseover =3D function (e)
    {
        m_bHovering =3D true;
        SetStyle(m_bChildSelected, m_bChildHovering);

        return false;
    }
    m_groupDiv.onmouseout =3D function (e)
    {
        m_bHovering =3D false;
        SetStyle(m_bChildSelected, m_bChildHovering);

        return false;
    }
    m_groupDiv.onclick =3D Clicker(
        m_groupDiv,
        function eventClick(pItem) { =
pViewer.SetVideoPosition(eventTime); },
        m_groupDiv);

    var m_eventVisualContainerDiv =3D CreateChildElement(m_groupDiv, =
"div", "eventVisualContainer");

    var m_timeDiv =3D CreateChildElement(m_eventVisualContainerDiv, =
"div", "eventVisualGroupTime");
    m_timeDiv.innerHTML =3D pViewer.isLive ? FormatFileTime(eventTime) : =
FormatRelativeTime(eventTime);

    this.AddEvents =3D function (arrEvents, pOptions)
    {
        var arrEventVisuals =3D new Array();
        if (arrEvents && (arrEvents.length > 0))
        {
            // if inlined, set the div to inline, otherwise block
            m_inlined =3D (arrEvents.length =3D=3D 1);

            for (var i =3D 0; i < arrEvents.length; i++)
            {
                var eventDiv =3D m_inlined ? m_eventVisualContainerDiv : =
CreateChildElement(m_eventVisualContainerDiv, "div");

                var pEventVisual =3D new EventVisual(this, eventDiv, =
arrEvents[i], pViewer, pOptions);
                var container =3D pEventVisual.GetContainer();
                if (!pViewer.isLive)
                {
                    container.onclick =3D Clicker(
                        container,
                        function eventClick(pItem) { =
pViewer.SetVideoPosition(pItem.Time); },
                        arrEvents[i]);
                }
                else
                {
                    container.style.cursor =3D "normal";
                }

                arrEventVisuals.push(pEventVisual);
            }
        }

        return arrEventVisuals;
    }

    this.SetStyle =3D function (bChildSelected, bChildHovering)
    {
        SetStyle(bChildSelected, bChildHovering);
    }

    function SetStyle(bChildSelected, bChildHovering)
    {
        m_bChildHovering =3D bChildHovering;
        m_bChildSelected =3D bChildSelected;

        if (!m_inlined)
        {
            // highlight the group if hovering over the group, but not a =
child
            m_groupDiv.className =3D
                m_bHovering && !bChildHovering
                    ? "eventVisualGroupHover"
                    : "eventVisualGroup";
        }
        else
        {
            // if inlined, highlight the group when hovering/selecting a =
child
            m_groupDiv.className =3D
                bChildSelected
                    ? "eventVisualGroupSelected"
                    : bChildHovering
                        ? "eventVisualGroupHover"
                        : "eventVisualGroup";
        }
    }
}

// visual representation for events - pass in the parent, event object, =
and options
// options:
//  DeleteCallback - when present a delete button is shown for the =
visual and when clicked
//                   calls the passed in function with the event
function EventVisual(pEventVisualGroup, elParent, pEvent, pViewer, =
pOptions)
{
    var m_pEvent =3D pEvent;
    var m_pViewer =3D pViewer;

    var m_bEditing =3D false;
    var m_bSelected =3D false;
    var m_bHovering =3D false;

    var m_timerHover =3D null;
    var m_bThumbnailHighlighted =3D false;

    var eventInfoDiv =3D CreateChildElement(elParent, "div", =
"eventInfoDiv");

    if (pOptions && pOptions.ShowUsernames)
    {
        var divUser =3D CreateChildElement(eventInfoDiv, "div", =
"eventVisualUser");
        divUser.innerHTML =3D pEvent.UserName ? "[" + pEvent.UserName + =
"]" : "[anonymous]";
    }

    if (!m_pViewer.isStandaloneNotes
        && (document.getElementById("searchTypeBox").value =3D=3D "all")
        && (m_pViewer.GetEventTabViewer().CurrentlySelectedTab() =3D=3D =
"Search"))
    {
        var eventTargetType =3D (pEvent.EventTargetType !=3D =
"PowerPoint") ? pEvent.EventTargetType : "Slides";
        var eventTypeSpan =3D CreateChildElement(eventInfoDiv, "span", =
"eventVisualType");
        eventTypeSpan.innerHTML =3D "[" + pEvent.EventTargetType + =
"]&nbsp;";
    }

    var divCaption =3D CreateChildElement(eventInfoDiv, "div", =
"eventVisualElement");
    SetTextWithLinks(divCaption, pEvent.Caption);

    var m_elActionPanel =3D null;
    var m_elEditLink =3D null;
    var m_elCancelEditLink =3D null;
    var m_elDeleteLink =3D null;

    // Only instantiate note action panel if we're dealing with notes.
    // Presence of DeleteCallback is effectively a flag that we're =
dealing with notes.
    if (pOptions && pOptions.DeleteCallback && (!m_pEvent.UserName || =
(m_pEvent.UserName =3D=3D m_pViewer.userName)))
    {
        // position: relative impacts perf, only use when necessary.
        elParent.style.position =3D "relative";

        m_elActionPanel =3D CreateChildElement(elParent, "div", =
"noteActionPanel");
       =20
        m_elEditLink =3D CreateChildElement(m_elActionPanel, "a", =
"editLink");
        m_elEditLink.href =3D "#";
        m_elEditLink.innerHTML =3D "edit";
        m_elEditLink.onclick =3D new Clicker(m_elEditLink, =
pOptions.EditCallback, pEvent);

        m_elCancelEditLink =3D CreateChildElement(m_elActionPanel, "a", =
"cancelEditLink");
        m_elCancelEditLink.href =3D "#";
        m_elCancelEditLink.innerHTML =3D "cancel edit";
        m_elCancelEditLink.onclick =3D new Clicker(m_elCancelEditLink, =
pOptions.CancelEditCallback);

        m_elDeleteLink =3D CreateChildElement(m_elActionPanel, "a", =
"deleteLink");
        m_elDeleteLink.href =3D "#";
        m_elDeleteLink.innerHTML =3D "delete";
        m_elDeleteLink.onclick =3D new Clicker(m_elDeleteLink, =
pOptions.DeleteCallback, pEvent);
    }

    elParent.onmouseover =3D function(e)
    {
        m_bHovering =3D true;
        SetStyle();
        return false;
    }

    elParent.onmouseout =3D function(e)
    {
        m_bHovering =3D false;
        SetStyle();
        return false;
    }

    function SetStyle()
    {
        if (m_elActionPanel)
        {
            m_elActionPanel.style.visibility =3D=20
                m_bHovering ? "visible" : "hidden";
        }

        if (m_bEditing)
        {
            elParent.className =3D "eventVisualEditing";

            // If note action panel is displayed, show "cancel edit" =
link.
            if (m_elActionPanel)
            {
                m_elCancelEditLink.style.display =3D "inline";
                m_elEditLink.style.display =3D "none";
                m_elDeleteLink.style.display =3D "none";
            }
        }
        else
        {
            elParent.className =3D
                m_bSelected=20
                    ? "eventVisualSelected"
                    : m_bHovering=20
                        ? "eventVisualHover"
                        : "eventVisual";

            // If note action panel is displayed, show "edit" and =
"delete" links.
            if (m_elActionPanel)
            {
                m_elCancelEditLink.style.display =3D "none";
                m_elEditLink.style.display =3D "inline";
                m_elDeleteLink.style.display =3D "inline";
            }
        }

        // update style on the parent group
        pEventVisualGroup.SetStyle(m_bSelected, m_bHovering);

        if (!m_pViewer.isStandaloneNotes)
        {
            // highlight the corresponding thumbnail
            // IE doesn't like rapid div switching (it lags the video), =
so add a delay
            if (m_bHovering)
            {
                m_timerHover =3D setTimeout(function ()
                {
                    m_bThumbnailHighlighted =3D true;
                    pViewer.HighlightThumbnail(pEvent.Time, =
m_bHovering);
                }, g_cEventVisualHoverDelay);
            }
            else
            {
                clearTimeout(m_timerHover);
                if (m_bThumbnailHighlighted)
                {
                    m_bThumnailHighlighted =3D false;
                    pViewer.HighlightThumbnail(pEvent.Time, =
m_bHovering);
                }
            }
        }
    }

    this.SetSelected =3D function(bSelected, bEditing)
    {
        m_bSelected =3D bSelected;
        m_bEditing =3D bEditing;
        SetStyle();
    }

    this.GetContainer =3D function()
    {
        return elParent;
    }
}

// general viewer for events
function EventViewer(el, pViewer, pOptions, strSearchBoxId, =
strSearchButtonId)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;

    var m_divContents =3D CreateChildElement(m_el, "div");
    m_divContents.onmouseover =3D function () { m_bHovering =3D true; =
return false; }
    m_divContents.onmouseout =3D function () { m_bHovering =3D false; =
return false; }

    var m_divScrollPane =3D null;
    var m_divToggleThumbs =3D null;

    var m_pSelectedItem =3D null;
    // Remember the current edit mode to avoid unnecessary style =
updating (causes hitching in IE8).
    var m_bSelectedItemEditing =3D false;
   =20
    var m_arrTimestamps =3D null;
    var m_arrVisuals =3D new Array();

    var m_bInitialized =3D false;
    var m_bHovering =3D false;

    if (strSearchBoxId && strSearchButtonId)
    {
        var m_searchBox =3D document.getElementById(strSearchBoxId);
        m_searchBox.onkeypress =3D function (e)
        {
            e =3D GetEvent(e);
            if (GetKey(e) !=3D 13)
            {
                // return if the user hasn't hit enter
                return true;
            }

            =
m_pViewer.GetEventTabViewer().SearchCurrentEventTab(m_searchBox.value);
            return false;
        }

        var m_searchButton =3D =
document.getElementById(strSearchButtonId);
        m_searchButton.onclick =3D function ()
        {
            =
m_pViewer.GetEventTabViewer().SearchCurrentEventTab(m_searchBox.value);
            return false;
        }
    }

    this.RenderContents =3D function (arrTimestamps)
    {
        m_divContents.innerHTML =3D "";
        m_arrTimestamps =3D arrTimestamps;

        // clear existing visuals
        m_arrVisuals.splice(0, m_arrVisuals.length);

        // if we don't have any elements, hide the list
        if (m_arrTimestamps.length =3D=3D 0)
        {
            SetVisible(m_divContents, false);
            return;
        }
        SetVisible(m_divContents, true);

        // create event visuals for our timestamps
        // first bucket them into groups based on time
        var timeHash =3D new Array();
        for (var i =3D 0; i < arrTimestamps.length; i++)
        {
            // calculate the bucket
            var eventTime =3D arrTimestamps[i].Time;
            var timeBucket =3D Math.round(eventTime / g_cTimeGroupSize);
            if (!timeHash[timeBucket])
            {
                timeHash[timeBucket] =3D new Array();
                timeHash[timeBucket].time =3D eventTime;
            }

            // add the event to the bucket
            timeHash[timeBucket].push(arrTimestamps[i]);
        }

        // now create a group for each bucket and add the events to the =
group and our list of visuals
        for (var timeBucket in timeHash)
        {
            var eventVisualGroup =3D new EventVisualGroup(m_divContents, =
timeHash[timeBucket].time, m_pViewer);
            m_arrVisuals =3D =
m_arrVisuals.concat(eventVisualGroup.AddEvents(timeHash[timeBucket], =
pOptions));
        }
    }

    // Highlight event and scroll into view.  If editing, indicate with =
different styling.
    function SelectItem(pItemToSelect, bEditing)
    {
        if (pItemToSelect =3D=3D m_pSelectedItem)
        {
            // If we're toggling edit mode on/off for the currently =
selected event, we need to update styles.
            if (bEditing !=3D m_bSelectedItemEditing)
            {
                m_pSelectedItem.SetSelected(true, bEditing);
                m_bSelectedItemEditing =3D bEditing;
            }
           =20
            return;
        }

        if (m_pSelectedItem)
        {
            m_pSelectedItem.SetSelected(false);
        }

        m_pSelectedItem =3D pItemToSelect;
        // Update cached value of edit mode to reflect whether we're =
editing the new event.
        m_bSelectedItemEditing =3D bEditing;

        if (!m_bHovering)
        {
            ScrollIntoView(m_pSelectedItem);
        }

        m_pSelectedItem.SetSelected(true, bEditing);
    }

    // Find event visual in parallel list of event.
    this.SelectEditEvent =3D function(pEditEvent)
    {
        for (var i =3D 0; i < m_arrTimestamps.length; i++)
        {
            var pEvent =3D m_arrTimestamps[i];
            if (pEvent.EventID =3D=3D pEditEvent.EventID)
            {
                var eventVisual =3D m_arrVisuals[i];
                SelectItem(eventVisual, true);
            }
        }
    }

    this.UpdateStatus =3D function(status)
    {
        if (!m_arrTimestamps)
        {
            return;
        }

        var iItem =3D GetCurrentItem(m_arrTimestamps, status.Time);
        if (iItem < m_arrVisuals.length)
        {
            SelectItem(m_arrVisuals[iItem]);
        }
    }
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
    }
   =20
    this.OnResize =3D function OnResize(controlHeight)
    {
        m_el.style.height =3D controlHeight + "px";
    }

    function ScrollIntoView( pVisual )
    {
        var visHeight =3D pVisual.GetContainer().offsetHeight;
        var visTop =3D pVisual.GetContainer().offsetTop;

        var scrollHeight =3D m_el.offsetHeight

        var scroll =3D Math.max(0, (scrollHeight - visHeight) / 2);

        // Guard against negative scrollTop for IE6
        m_el.scrollTop =3D Math.max(0, visTop - scroll);
    }
}

// Table of Contents (slide & thumbnail events) AND the transcript
function TocViewer(el, pViewer, strSearchBoxId, strSearchButtonId)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;

    var m_pEventViewer =3D new EventViewer(
        CreateChildElement(el, "div", "tocContents"),
        m_pViewer,
        null,
        strSearchBoxId,
        strSearchButtonId);

    this.RenderContents =3D function(arrTimestamps)
    {
        m_pEventViewer.RenderContents(arrTimestamps);
    }

    this.UpdateStatus =3D function(status)
    {
        m_pEventViewer.UpdateStatus(status);
    }

    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);

        // resize
        if (bVisible)
        {
            m_pViewer.Resize();
        }
    }

    this.SetFocus =3D function() { }

    this.OnResize =3D function OnResize(controlHeight)
    {
        var headerHeight =3D Math.max(
            document.getElementById("tocSearchChrome").offsetHeight,
            document.getElementById("transSearchChrome").offsetHeight);

        var paneHeight =3D controlHeight - headerHeight;
        m_pEventViewer.OnResize(paneHeight);
    }
}

// viewer for taking and viewing notes
function NotesViewer(el, pViewer)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;
    var m_arrNotes =3D new Array();
    var m_noteStartTime =3D 0;

    // we have an event viewer - we probably should subclass it instead
    var m_pEventViewer =3D new EventViewer(
        document.getElementById("notesDivDisplay"),
        m_pViewer,
        {
            EditCallback:       EditNote,
            CancelEditCallback: ExitEditMode,
            DeleteCallback:     DeleteNote,
            UserName:           m_pViewer.userName,
            ShowUsernames:      true
        },
        // Search is only available in full viewer.
        (!m_pViewer.isStandaloneNotes ? "notesSearchBox" : null),
        (!m_pViewer.isStandaloneNotes ? "notesSearchButton" : null));

    var m_pLastEvent =3D null;

    // The note currently being edited, if any.
    var m_pEditingEvent =3D null;
   =20
    // elements for choosing and displaying the user
    var m_userDiv =3D document.getElementById("userDiv");
    var m_notesUserDiv =3D document.getElementById("notesUserDiv");
    var m_notesUserSelect =3D =
document.getElementById("notesUserSelect");
    var m_myNotesOptionGroup =3D =
document.getElementById("myNotesOptionGroup");
    var m_publicNotesOptionGroup =3D =
document.getElementById("publicNotesOptionGroup");

    // elements for choosing notes visibility
    var m_publicNotesToggle =3D =
document.getElementById("publicNotesToggle");
    var m_publicNotesIcon =3D =
document.getElementById("publicNotesIcon");

    // elements for choosing and displaying the notes channel
    var m_channelDiv =3D document.getElementById("channelDiv");
    var m_channelInput =3D document.getElementById("channelInput");
    var m_changeChannelButton =3D =
document.getElementById("changeChannelButton");

    // Note entry area
    var m_notesInputDiv =3D document.getElementById("notesInputDiv");
    var m_elCancelEditLinkSpan =3D =
document.getElementById("cancelEditLinkSpan");
    var m_elCancelEditLink =3D =
document.getElementById("cancelEditLink");
    m_elCancelEditLink.onclick =3D Clicker(m_elCancelEditLink, =
ExitEditMode);
    var m_elNotesInputMessage =3D =
document.getElementById("notesInputMessage");

    // Notes input textarea
    var m_notesText =3D document.getElementById("inputTextArea");
    m_notesText.onkeypress =3D NotesKeyPressed;
    m_notesText.onfocus =3D function (e)
    {
        if (!m_pEditingEvent)
        {
            m_notesText.rows =3D 3;
            // BUGBUG: we need to resize event panel, but no easy way to =
do it, so take a viewer resize pass
            m_pViewer.Resize();
        }
    }

    m_notesText.onblur =3D function (e)
    {
        m_notesText.rows =3D 1;
        // BUGBUG: we need to resize event panel, but no easy way to do =
it, so take a viewer resize pass
        m_pViewer.Resize();
    }

    document.getElementById("notesDivDisplay").onclick =3D function (e)
    {
        m_notesText.rows =3D 1;
        m_pViewer.Resize();
    }

    m_publicNotesToggle.onclick =3D function (e)
    {
        function onPublicToggled(pXML, bSuccess)
        {
            if (bSuccess && pXML)
            {
                // Page returns resulting value
                var retVal =3D SelectSingleNodeValue(pXML, "Public");
                m_publicNotesIcon.src =3D (retVal =3D=3D "true") ? =
"../../Images/unlocked.png" : "../../Images/locked.png";
                m_publicNotesIcon.title =3D m_publicNotesIcon.alt =3D =
(retVal =3D=3D "true")
                    ? "Your notes are public. Click to make them =
private."
                    : "Your notes are private. Click to make them =
public.";
                m_publicNotesToggle.title =3D (retVal =3D=3D "true") ? =
"unlocked" : "locked";
            }
        }

        var params =3D
        {
            id: m_pViewer.deliveryID,
            public: (m_publicNotesToggle.title =3D=3D "locked") // if =
locked, make public when the user clicks, and vice-versa
        }

        CreateRequest(g_urlNoteTogglePublic, params, onPublicToggled);
    }

    m_notesUserSelect.onchange =3D function (e)
    {
        var optionGroupName =3D =
m_notesUserSelect[m_notesUserSelect.selectedIndex].parentNode.id;
        m_pViewer.notesUser =3D null;
        m_pViewer.channel =3D null;

        // clear the cookie
        deleteCookie("Channel");

        if (optionGroupName =3D=3D "myNotesOptionGroup")
        {
            // my notes group
            if (m_notesUserSelect.value =3D=3D "#login")
            {
                // Use replace so we don't create a useless history =
state when logging in.
                location.replace(pViewer.loginURL);
            }
            else
            {
                PopulateNotesFromServer();
            }
        }
        else if (optionGroupName =3D=3D "publicNotesOptionGroup")
        {
            // users group
            m_pViewer.notesUser =3D m_notesUserSelect.value;
            PopulateNotesFromServer();
        }
        else
        {
            // channel group
            if (m_notesUserSelect.value !=3D "#custom")
            {
                // set the channel if it is not set to #custom,=20
                // otherwise leave it blank and RenderControls() will =
show the channel input box
                pViewer.channel =3D m_notesUserSelect.value;
                PopulateNotesFromServer();
            }
        }

        RenderControls();
    }

    m_channelInput.onkeypress =3D function(e)
    {
        e =3D GetEvent( e );
       =20
        // return if the user hasn't hit enter
        if( GetKey(e)!=3D 13 )
        {
            return true;
        }
       =20
        SetCustomChannel();
        return false;
    }
   =20
    m_changeChannelButton.onclick =3D function(e)
    {
        SetCustomChannel();
        return false;
    }

    function SetCustomChannel()
    {
        if (m_channelInput.value)
        {
            m_pViewer.channel =3D m_channelInput.value;
            setCookie("Channel", m_pViewer.channel, 365);

            if (!selectDropdownValue(m_notesUserSelect, =
m_channelInput.value))
            {
                // add the channel to the dropdown if it doesn't exist
                var publicUserOption =3D =
CreateChildElement(document.getElementById("customNotesOptionGroup"), =
"option");
                publicUserOption.innerHTML =3D m_channelInput.value;
                publicUserOption.value =3D m_channelInput.value;

                selectDropdownValue(m_notesUserSelect, =
m_channelInput.value);
            }
        }
        else if (m_pViewer.userName)
        {
            selectDropdownValue(m_notesUserSelect, m_pViewer.userName);
        }
        else if (m_publicNotesOptionGroup.childNodes.length > 0)
        {
            selectDropdownValue(m_notesUserSelect, =
m_publicNotesOptionGroup.childNodes[0].value);
        }
        else
        {
            alert("Please enter a channel or log in to take notes.");
        }

        RenderControls();
    }

    function PopulateNotesFromServer()
    {
        function onNotesXML(pXML, bSuccess)
        {
            var error =3D "true";
            if (pXML)
            {
                error =3D SelectSingleNodeValue(pXML, "Error");
            }

            if (error =3D=3D "false" && bSuccess)
            {
                // clear the current array
                m_arrNotes =3D new Array();
                var pEvents =3D SelectSingleNode(pXML, "Events");
                var pArrTimestamps =3D SelectNodes(pEvents, =
"SimpleTimestamp");

                // parse the xml
                for (var i =3D 0; i < pArrTimestamps.length; i++)
                {
                    m_arrNotes.push(ParseEvent(pArrTimestamps[i]));
                }

                // sort by time
                m_arrNotes.sort(function (a, b) { return a.Time - b.Time =
});

                // render
                m_pEventViewer.RenderContents(m_arrNotes);

                SetFocus();
            }
            else
            {
                // TODO: show message and disable note entry
            }
        }

        var params =3D
        {
            id:                 m_pViewer.deliveryID,
            type:               "notes",
            notesUser:          m_pViewer.notesUser,
            channelName:        m_pViewer.channel ? =
encodeURIComponent(m_pViewer.channel) : null,
            deliveryRelative:   (m_pViewer.isLive ? null : "true")
        }

        CreateRequest(g_urlSearchResults, params, onNotesXML);
    }

    function EditNote(pNote)
    {
        m_pEditingEvent =3D pNote;

        m_pEventViewer.SelectEditEvent(m_pEditingEvent);
   =20
        m_notesText.value =3D pNote.Caption;

        m_elNotesInputMessage.style.display =3D "none";
        m_elCancelEditLinkSpan.style.display =3D "inline";
        m_notesText.className =3D "editing";

        // setTimeout is a workaround for IE.  Fails to set focus if =
called synchronously.
        setTimeout(function() { SetFocus(); }, 0);

        return false;
    }

    function ExitEditMode()
    {
        m_pEditingEvent =3D null;

        // Clear notes text entry.
        m_notesText.value =3D "";
       =20
        m_elNotesInputMessage.style.display =3D "inline";
        m_elCancelEditLinkSpan.style.display =3D "none";
        m_notesText.className =3D "";

        SetFocus();
    }

    function DeleteNote(pToDelete)
    {
        ExitEditMode();
   =20
        // go through our list to find the note we need to delete
        for (var n in m_arrNotes)
        {
            if (pToDelete =3D=3D m_arrNotes[n])
            {
                // take it out of our array and rerender the other notes
                m_arrNotes.splice(n, 1);
                m_pEventViewer.RenderContents(m_arrNotes);
            }
        }

        CreateRequest(g_urlNoteDelete, { eventid: pToDelete.EventID });
        return false;
    }

    function NotesKeyPressed(e)
    {
        e =3D GetEvent(e);

        // If user has hit [Enter], submit note.
        if (GetKey(e) =3D=3D 13)
        {
            SubmitNote();

            // Prevent [Enter] from submitting form.
            return false;
        }

        // If user has hit [Esc], cancel edit or clear note entry
        if (GetKey(e) =3D=3D 27)
        {
            if (m_pEditingEvent)
            {
                ExitEditMode();
            }
            else
            {
                m_notesText.value =3D "";
            }
       =20
            return false;
        }

        // Set the note start when the first character is typed in the =
notes area
        if (m_notesText.value.length =3D=3D 0)
        {
            if (m_pViewer.isLive)
            {
                m_noteStartTime =3D new Date().getTime();
               =20
                // When viewing a live broadcast, offset the note by an =
estimated delay to account for
                // latency between video capture and display.
                if (!m_pViewer.isStandaloneNotes)
                {
                    m_noteStartTime -=3D g_dBroadcastLatencyEstimate;
                }
            }
            else
            {
                // BUGBUG: We should pull the exact video time instead =
of using the m_pLastEvent proxy.
                m_noteStartTime =3D m_pLastEvent ? m_pLastEvent.Time : =
0;
            }
        }

        // Allow character to be entered
        return true;
    }

    function SubmitNote()
    {
        if (!m_pViewer.userName && !m_pViewer.channel)
        {
            alert("Please select a channel or log in to take notes.");
            return;
        }

        // Return if we have an empty note.
        var caption =3D m_notesText.value;
        if (caption =3D=3D "")
        {
            return;
        }
        m_notesText.value =3D "";

        if (m_pEditingEvent)
        {
            UpdateNote(caption);
        }
        else
        {
            CreateNote(caption);
        }
    }

    // Change the text of the note being edited.
    function UpdateNote(caption)
    {
        // If there was an error updating the note, pop up an alert.
        function onNoteUpdated(pXML, bSuccess)
        {
            var errorMessage =3D SelectSingleNodeValue(pXML, =
"ErrorMessage");

            if (errorMessage)
            {
                alert(errorMessage);
            }
        }

        var params =3D
        {
            eventid:    m_pEditingEvent.EventID,
            data:       encodeURIComponent(caption)
        };

        CreateRequest(g_urlNoteUpdate, params, onNoteUpdated);

        // We update the relevant note immediately, and just notify the =
user via popup if the update failed.
        m_pEditingEvent.Caption =3D caption;

        // Ensure notes are sorted by time, and then render.
        m_arrNotes.sort(function (a, b) { return a.Time - b.Time });
        m_pEventViewer.RenderContents(m_arrNotes);

        // Highlight updated note.
        m_pEventViewer.UpdateStatus(m_pEditingEvent);

        ExitEditMode();
    }

    function CreateNote(caption)
    {
        // For live note taking, get the time difference between note =
start and current time
        // to determine note start offset from server time.
        var noteStartTimeOffset =3D (m_noteStartTime - new =
Date().getTime()) / 1000;
       =20
        var pNote =3D { Time:           (m_pViewer.isLive ? =
noteStartTimeOffset : m_noteStartTime),
                      UserName:       m_pViewer.userName,
                      EventTargetID:  1,
                      SequenceNumber: m_arrNotes.length + 1,
                      Caption:        caption };

        function onNoteSubmitted(pXML, bSuccess)
        {
            var ret =3D SelectSingleNodeValue(pXML, "ReturnCode");
            pNote.EventID =3D SelectSingleNodeValue(pXML, "EventID");
            // If taking live notes, retrieve note time from server.
            if(m_pViewer.isLive)
            {
                pNote.Time =3D SelectSingleNodeValue(pXML, "Time", =
"float");
            }
           =20
            if((ret =3D=3D "true") && bSuccess)
            {
                // Add the note to the notes array and re-render our =
event viewer.
                m_arrNotes.push(pNote);
               =20
                // Ensure notes are sorted by time, and then render.
                m_arrNotes.sort(function (a, b) { return a.Time - b.Time =
});
                m_pEventViewer.RenderContents(m_arrNotes);

                // Use pNote.Time to highlight added note.
                m_pEventViewer.UpdateStatus(pNote);
            }
            else
            {
                // TODO: figure out how we want to handle errors
            }
        }

        var params =3D
        {
            deliveryid:         m_pViewer.deliveryID,
            time:               pNote.Time,
            data:               encodeURIComponent(pNote.Caption),
            channelName:        m_pViewer.channel ? =
encodeURIComponent(m_pViewer.channel) : null,
            deliveryRelative:   (m_pViewer.isLive ? null : "true")
        };
       =20
        CreateRequest( g_urlNoteSubmit, params, onNoteSubmitted );
    }

    this.SetVisible =3D function (bVisible)
    {
        SetVisible(m_el, bVisible);

        // resize
        if (bVisible)
        {
            m_pViewer.Resize();
        }
    }

    this.OnResize =3D function (controlHeight)
    {
        var headerHeight =3D =
document.getElementById("notesHeaderDiv").offsetHeight;
        var footerHeight =3D =
document.getElementById("notesInputDiv").offsetHeight;
        var eventViewerHeight =3D controlHeight - headerHeight - =
footerHeight - g_cPaneContentDividerWidth;

        m_pEventViewer.OnResize(eventViewerHeight);
    }

    function RenderControls()
    {
        var showDropDown =3D (m_notesUserSelect.value !=3D "#custom");
        SetVisible(m_notesUserDiv, showDropDown);
        SetVisible(m_channelDiv, !showDropDown);

        var allowNotes =3D !pViewer.notesUser;
        SetVisible(m_notesInputDiv, allowNotes);

        var showPublicNotesToggle =3D allowNotes && pViewer.userName && =
!pViewer.channel && pViewer.bAllowPublishNotes;
        m_publicNotesToggle.style.visibility =3D showPublicNotesToggle ? =
"visible" : "hidden";

        m_pViewer.Resize();
        SetFocus();
    }

    function FillNotesUserSelect()
    {
        // add the private user notes option (or login if not logged in)
        var loginOption =3D CreateChildElement(m_myNotesOptionGroup, =
"option");
        loginOption.innerHTML =3D (m_pViewer.userName) ? =
m_pViewer.userName : "Log in...";
        loginOption.value =3D (m_pViewer.userName) ? m_pViewer.userName =
: "#login";

        // try to select the user's private notes by default
        // BUGBUG: make a dead state and populate by default?
        selectDropdownValue(m_notesUserSelect, m_pViewer.userName);

        for (var i in m_pViewer.publicNotesUsers)
        {
            // Don't show duplicate notes stream for current user.
            if (m_pViewer.userName =3D=3D m_pViewer.publicNotesUsers[i]) =
continue;

            var publicUserOption =3D =
CreateChildElement(m_publicNotesOptionGroup, "option");
            publicUserOption.innerHTML =3D =
m_pViewer.publicNotesUsers[i];
            publicUserOption.value =3D m_pViewer.publicNotesUsers[i];
        }
    }

    function SetFocus()
    {
        if(m_el.style.display !=3D "none")
        {
            if (m_channelDiv.style.display !=3D "none")
            {
                m_channelInput.focus();
                m_channelInput.select();
            }
            else if(m_notesInputDiv.style.display !=3D "none")
            {
                m_notesText.focus();
            }

            if (m_pViewer.isLive && m_arrNotes.length)
            {
                m_pEventViewer.UpdateStatus(m_arrNotes[m_arrNotes.length =
- 1]);
            }
        }
    }
    this.SetFocus =3D SetFocus;

    this.RenderContents =3D function ()
    {
        // load user name from cookie
        m_pViewer.channel =3D getCookie("Channel");
        if (m_pViewer.channel)
        {
            // add the channel to the dropdown
            m_channelInput.value =3D m_pViewer.channel;
            SetCustomChannel();
        }

        FillNotesUserSelect();
        RenderControls();
    }

    this.UpdateStatus =3D function(status)
    {
        m_pLastEvent =3D status;

        if (!m_pEditingEvent)
        {
            m_pEventViewer.UpdateStatus(status);
        }
    }
}


function SearchViewer(el, pViewer)
{
    var m_el =3D el;
   =20
    var m_pViewer =3D pViewer;
    var m_arrResults =3D null;
   =20
    // we have an event viewer - we probably should subclass it instead
    var m_pEventViewer =3D new EventViewer(
        document.getElementById("searchResults"),
        m_pViewer,
        null,
        "searchBox",
        "searchButton");
   =20
    // get our html elements
    var m_searchQuery =3D document.getElementById("searchBox");
    var m_context =3D document.getElementById("searchContext");

    var m_searchSortBox =3D document.getElementById("searchSortBox");
    var m_searchTypeBox =3D document.getElementById("searchTypeBox");

    m_searchSortBox.onchange =3D function() { GetResults(); return =
false; }
    m_searchTypeBox.onchange =3D function() { GetResults(); return =
false; }

    var m_channelName =3D document.getElementById("channelName");

    this.Search =3D function (strType, strQuery)
    {
        m_searchQuery.value =3D strQuery;

        if (strType)
        {
            m_searchTypeBox.value =3D strType;
        }

        GetResults();
    }

    function GetResults()
    {
        var query =3D m_searchQuery.value;
        var type =3D m_searchTypeBox.value;
        var sort =3D m_searchSortBox.value;

        function onResultsXML( pXML, bSuccess )
        {
            var error =3D "true";
            if( pXML )
            {
                error =3D SelectSingleNodeValue( pXML, "Error" );
            }

            if( error =3D=3D "false" && bSuccess )
            {
                m_arrResults =3D new Array();
                var pEvents =3D SelectSingleNode( pXML, "Events" );
                var arrTimestamps =3D SelectNodes( pEvents, =
"SimpleTimestamp" );
           =20
                // parse the xml
                for (var i =3D 0; i < arrTimestamps.length; i++)
                {
                    m_arrResults.push( ParseEvent( arrTimestamps[i] ) );
                }

                // results come back in relevance order, sort by time if =
requested
                if (sort =3D=3D "time")
                {
                    m_arrResults.sort(function (a, b) { return a.Time - =
b.Time });
                }
               =20
                // render
                m_pEventViewer.RenderContents(m_arrResults);

                // set our context
                var friendlyTypeName =3D
                    (type =3D=3D "ppt")
                        ? " slide "
                        : (type =3D=3D "notes")
                            ? " note "
                            : (type =3D=3D " caption ")
                                ? " caption "
                                : " ";

                var friendlyResultCount =3D (m_arrResults.length > 0) ? =
m_arrResults.length : "no";
                m_context.innerHTML =3D "Search returned <b>" + =
friendlyResultCount + "</b>" + friendlyTypeName + "results."
                m_context.style.display =3D "inline-block";
            }
            else
            {
                var errorSpan =3D CreateElement("SPAN", "error");
                SetText(errorSpan, "Error generating search results.");
                SetChild(m_context, errorSpan);
            }

            // reflow as some elements might have changed height
            m_pViewer.Resize();
        }

        // check to make sure we have a user, public notes selection or =
channel if we are searching notes
        if((type =3D=3D "notes") && !(m_pViewer.userName || =
m_pViewer.notesUser || m_pViewer.channel))
        {
            alert("Please log in or select a channel in the notes tab =
before searching notes.");
            return;
        }
       =20
        if(query)
        {
            var params =3D
            {
                query:              query ? encodeURIComponent(query) : =
null,
                type:               type,
                id:                 m_pViewer.deliveryID,
                notesUser:          m_pViewer.notesUser,
                channelName:        m_pViewer.channel ? =
encodeURIComponent(m_pViewer.channel) : null,
                deliveryRelative:   (m_pViewer.isLive ? null : "true")
            };
                        =20
            CreateRequest(g_urlSearchResults, params, onResultsXML);
        }

        SetFocus();
    }
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);

        // resize
        if (bVisible)
        {
            m_pViewer.Resize();
        }
    }

    function SetFocus()
    {
        m_searchQuery.select();
        m_searchQuery.focus();
    }
    this.SetFocus =3D SetFocus;
   =20
    this.OnResize =3D function OnResize(controlHeight)
    {
        var headerHeight =3D =
document.getElementById("searchSearchChrome").offsetHeight;
        var eventViewerHeight =3D Math.max(g_cEventViewerMinHeight, =
controlHeight - headerHeight);
        m_pEventViewer.OnResize(eventViewerHeight);
    }
   =20
    this.RenderContents =3D function(arrTimestamps) { }
   =20
    this.UpdateStatus =3D function(status) { }
}

function Questions(el, pViewer)
{
    var m_el =3D el;
    var m_pViewer =3D pViewer;

    var m_arrQuestions =3D new Array();

    // create a tab control to hold the single tab
    var m_pTabControl =3D new =
TabControl(document.getElementById("questionsTabBar"), null, false);
    m_pTabControl.AddView({ ViewID: "questions", Title: "Questions" });
    m_pTabControl.UpdateCurrentView();                           =20

    var m_pEventViewer =3D new =
EventViewer(document.getElementById("questionsAsked"), m_pViewer, { =
ShowUsernames: true });

    var m_pQuestionTextEntry =3D =
document.getElementById("questionTextEntry");
    m_pQuestionTextEntry.onkeypress =3D KeyPressed;
    m_pQuestionTextEntry.onfocus =3D HideQuestionTextEntryInstructions;

    var m_pQuestionTextEntryInstructions =3D =
document.getElementById("questionTextEntryInstructions");
    m_pQuestionTextEntryInstructions.onclick =3D =
HideQuestionTextEntryInstructions;

    var m_dQuestionStartTime =3D 0;

    function HideQuestionTextEntryInstructions()
    {
        m_pQuestionTextEntryInstructions.style.display =3D "none";
        m_pQuestionTextEntry.focus();
    }

    function KeyPressed(e)
    {
        e =3D GetEvent(e);

        // If user has hit [Enter], submit question.
        if (GetKey(e) =3D=3D 13)
        {
            SubmitQuestion();

            // Prevent [Enter] from submitting form.
            return false;
        }

        // If user has hit [Esc], cancel edit or clear note entry
        if (GetKey(e) =3D=3D 27)
        {
            m_pQuestionTextEntry.value =3D "";

            return false;
        }

        // Set the note start when the first character is typed in the =
notes area
        if (m_pQuestionTextEntry.value.length =3D=3D 0)
        {
            // Since we're in a remote broadcast case, offset the note =
by an estimated delay to account for
            // latency between video capture and display.
            m_dQuestionStartTime =3D new Date().getTime() - =
g_dBroadcastLatencyEstimate;
        }

        // Allow character to be entered
        return true;
    }

    function SubmitQuestion()
    {
        if (!m_pViewer.userName)
        {
            alert("Please log in to ask questions.");
            return;
        }

        // Return if we have an empty note.
        var question =3D m_pQuestionTextEntry.value;
        if (question =3D=3D "")
        {
            return;
        }
        m_pQuestionTextEntry.value =3D "";

        // Get the time difference between question start and current =
time
        // to determine start offset from server time.
        var questionStartTimeOffset =3D (m_dQuestionStartTime - new =
Date().getTime()) / 1000;

        var pQuestion =3D { Time:     questionStartTimeOffset,
                          UserName: m_pViewer.userName,
                          Caption:  question };

        function onQuestionSubmitted(pXML, bSuccess)
        {
            var ret =3D SelectSingleNodeValue(pXML, "ReturnCode");
            pQuestion.EventID =3D SelectSingleNodeValue(pXML, =
"EventID");
            // Retrieve event time from server.
            pQuestion.Time =3D SelectSingleNodeValue(pXML, "Time", =
"float");

            if ((ret =3D=3D "true") && bSuccess)
            {
                // Add the event to the questions list and re-render our =
event viewer.
                m_arrQuestions.push(pQuestion);
                m_pEventViewer.RenderContents(m_arrQuestions);
                // Use pQuestion.Time to highlight added event.
                m_pEventViewer.UpdateStatus(pQuestion);
            }
        }

        var params =3D
        {
            deliveryid:         m_pViewer.deliveryID,
            time:               pQuestion.Time,
            data:               encodeURIComponent(pQuestion.Caption),
            channelName:        "Questions_" + m_pViewer.sessionPID
        };

        CreateRequest(g_urlNoteSubmit, params, onQuestionSubmitted);
    }

    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
   =20
        // resize
        if (bVisible)
        {
            m_pViewer.Resize();
        }
    }

    this.OnResize =3D function(controlWidth)
    {
        m_el.style.height =3D g_dQuestionsHeight + "px";
        m_el.style.width =3D controlWidth + "px";

        m_pEventViewer.OnResize(g_dQuestionsHeight - =
g_dTabBarOffsetHeight - (g_cPaneContentDividerWidth * 2) - =
g_cQuestionEntryHeight);
    }

}
------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/BasePlayer.js

Type.registerNamespace('Ee.UI.Xaml');

Ee.UI.Xaml.scriptVersion =3D "1.0.070606.0";

Ee.UI.Xaml.ScaleMode =3D function Ee$UI$Xaml$ScaleMode() {
    /// <field name=3D"none" type=3D"Number" integer=3D"true" =
static=3D"true"></field>
    /// <field name=3D"zoom" type=3D"Number" integer=3D"true" =
static=3D"true"></field>
    /// <field name=3D"stretch" type=3D"Number" integer=3D"true" =
static=3D"true"></field>
    if (arguments.length !=3D=3D 0) throw Error.parameterCount();
    throw Error.notImplemented();
}




Ee.UI.Xaml.ScaleMode.prototype =3D {
    none: 0,
    zoom: 1,
    stretch: 2
}
Ee.UI.Xaml.ScaleMode.registerEnum('Ee.UI.Xaml.ScaleMode');
Ee.UI.Xaml.Control =3D function Ee$UI$Xaml$Control(domElement) {
    /// <param name=3D"domElement" domElement=3D"true"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "domElement", domElement: true}
    ]);
    if (e) throw e;

    Ee.UI.Xaml.Control.initializeBase(this, [domElement]);
}







    function Ee$UI$Xaml$Control$add_xamlError(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler('xamlError', handler);
    }
    function Ee$UI$Xaml$Control$remove_xamlError(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler('xamlError', handler);
    }

    function Ee$UI$Xaml$Control$add_resize(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("resize", handler);
    }
    function Ee$UI$Xaml$Control$remove_resize(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("resize", handler);
    }

    function Ee$UI$Xaml$Control$add_xamlInitialized(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler('xamlInitialized', handler);
    }
    function Ee$UI$Xaml$Control$remove_xamlInitialized(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler('xamlInitialized', handler);
    }

    function Ee$UI$Xaml$Control$get_scaleMode() {
        /// <value type=3D"Ee.UI.Xaml.ScaleMode"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._scaleMode;
    }
    function Ee$UI$Xaml$Control$set_scaleMode(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Ee.UI.Xaml.ScaleMode}]);
        if (e) throw e;

        this._scaleMode =3D value;
        if (this._xamlInitialized && value !=3D=3D =
Ee.UI.Xaml.ScaleMode.none) {
            this._ensureTransform();
        }
    }


    function Ee$UI$Xaml$Control$get_xamlSource() {
        /// <value type=3D"String"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._xamlSource || "";
    }
    function Ee$UI$Xaml$Control$set_xamlSource(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: String}]);
        if (e) throw e;

        if (this.get_isInitialized()) {
            throw =
Error.invalidOperation(Ee.UI.Xaml.Res.cannotChangeXamlSource);
        }
        this._xamlSource =3D value;
    }

    function Ee$UI$Xaml$Control$addEventListener(element, eventName, =
handler) {
        /// <param name=3D"element"></param>
        /// <param name=3D"eventName" type=3D"String"></param>
        /// <param name=3D"handler" type=3D"Function"></param>
        /// <returns></returns>
        var e =3D Function._validateParams(arguments, [
            {name: "element"},
            {name: "eventName", type: String},
            {name: "handler", type: Function}
        ]);
        if (e) throw e;

        if (!this._boundEvents) {
            this._boundEvents =3D [];
        }

        var token =3D element.addEventListener(eventName, handler);
        this._boundEvents[this._boundEvents.length] =3D { element: =
element, eventName: eventName, token: token };
        return token;
    }

    function Ee$UI$Xaml$Control$addEventListeners(element, events, =
handlerOwner) {
        /// <param name=3D"element"></param>
        /// <param name=3D"events" type=3D"Object"></param>
        /// <param name=3D"handlerOwner" optional=3D"true"></param>
        /// <returns></returns>
        var e =3D Function._validateParams(arguments, [
            {name: "element"},
            {name: "events", type: Object},
            {name: "handlerOwner", optional: true}
        ]);
        if (e) throw e;

        var tokens =3D { };
        for (var name in events) {
            var handler =3D events[name];
            if (typeof(handler) !=3D=3D 'function') throw =
Error.invalidOperation(Sys.Res.cantAddNonFunctionhandler);
            if (handlerOwner) {
                handler =3D Function.createDelegate(handlerOwner, =
handler);
            }
            tokens[name] =3D this.addEventListener(element, name, =
handler);
        }
        return tokens;
    }

    function Ee$UI$Xaml$Control$dispose() {
        var host =3D this.get_element();
        if (host) {
            if (this._resizeDelegate) {
                host.content.onResize =3D null;
                this._resizeDelegate =3D null;
            }
            host.OnLoad =3D null;
            host.OnError =3D null;
        }

        if (this._xamlInitialized) {
            this.xamlDispose();
            this._xamlInitialized =3D false;
        }
       =20
        if (this._boundEvents) {
            for (var i =3D 0, l =3D this._boundEvents.length; i < l; =
i++) {
                var e =3D this._boundEvents[i];
                e.element.removeEventListener(e.eventName, e.token);
            }
            this._boundEvents =3D null;
        }

        Ee.UI.Xaml.Control.callBaseMethod(this, "dispose");
    }

    function Ee$UI$Xaml$Control$initialize() {
        Ee.UI.Xaml.Control.callBaseMethod(this, "initialize");

        var host =3D this.get_element();
        host.OnError =3D Function.createDelegate(this, this._xamlError);
       =20
        // set the xaml source
        var src =3D this.get_xamlSource();
        if (src && (typeof(host.Source) =3D=3D=3D 'undefined' || =
host.Source !=3D=3D src)) {
            host.OnLoad =3D Function.createDelegate(this, =
this._xamlLoaded);
            host.Source =3D src;
        }
        else {
            // if we are not setting the source we assume its already =
been loaded by some other means
            this._raiseXamlInitialize();
        }
    }

    function Ee$UI$Xaml$Control$onResize(args) {
        /// <param name=3D"args" type=3D"Sys.EventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "args", type: Sys.EventArgs}
        ]);
        if (e) throw e;

    }

    function Ee$UI$Xaml$Control$onXamlError(errorEventArgs) {
        /// <param name=3D"errorEventArgs" =
type=3D"Ee.UI.Xaml.ErrorEventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "errorEventArgs", type: Ee.UI.Xaml.ErrorEventArgs}
        ]);
        if (e) throw e;

    }

    function Ee$UI$Xaml$Control$xamlDispose() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
    }

    function Ee$UI$Xaml$Control$xamlInitialize() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
    }

    function Ee$UI$Xaml$Control$_ensureTransform() {

        var root =3D this.get_element().content.root;
        var scalePlayer =3D Ee.UI.Xaml.Control._computeScale(root);
        var x, y;
        if (this.get_scaleMode() =3D=3D=3D Ee.UI.Xaml.ScaleMode.zoom) {
            // zoom
            x =3D y =3D Math.min(scalePlayer.horizontal, =
scalePlayer.vertical);
        }
        else {
            // fit
            x =3D scalePlayer.horizontal;
            y =3D scalePlayer.vertical;
        }
        Ee.UI.Xaml.Control._ensureScale(root, x, y);
       =20
        // ensure we are watching the resize event
        if (!this._resizeDelegate) {
            this._resizeDelegate =3D Function.createDelegate(this, =
this._onResize);
            root.getHost().content.onResize =3D this._resizeDelegate;
        }
    }

    function Ee$UI$Xaml$Control$_onResize() {
        var element =3D this.get_element();
        // DevDiv Bugs 125915: may have been disposed by now. SL calls =
us even though we unhook.
        if (element && (this.get_scaleMode() !=3D=3D =
Ee.UI.Xaml.ScaleMode.none)) {
            this._ensureTransform();

            var args =3D Sys.EventArgs.Empty;
            this.onResize(args);
            var handler =3D this.get_events().getHandler("resize");
            if (handler) {
                handler(this, args);
            }
        }
    }

    function Ee$UI$Xaml$Control$_raiseXamlError(sender, errorEventArgs) =
{
        this.onXamlError(errorEventArgs);
       =20
        if (!errorEventArgs.get_cancel()) {
            var handler =3D this.get_events().getHandler("xamlError");
            if (handler) {
                handler(this, errorEventArgs);
            }
            // in debug mode, when error goes unhandled, throw exception
            // The silverlight error object is particular about what =
fields you can access depending on the type of the error.
            // Accessing an inappropriate field will cause an error.
            else {
                var xamlError =3D errorEventArgs.get_error(),
                    errorType =3D xamlError.errorType,
                    errorCode =3D xamlError.errorCode,
                    errorMessage =3D xamlError.errorMessage,
                    id =3D this.get_id(),
                    lineNumber =3D "", charPosition =3D "", xamlFile =3D =
"", methodName =3D "",
                    errorFormat =3D Ee.UI.Xaml.Res.otherError;
                // not all the elements are available for all error =
types (you get an exception if you try)
                if (errorType =3D=3D=3D "ParserError") {
                    errorFormat =3D Ee.UI.Xaml.Res.parserError;
                    lineNumber =3D xamlError.lineNumber;
                    charPosition =3D xamlError.charPosition;
                    xamlFile =3D xamlError.xamlFile;
                }
                else if ((errorType =3D=3D=3D "ImageError" || errorType =
=3D=3D=3D "MediaError") && errorMessage =3D=3D=3D "AG_E_NOT_FOUND") {
                        errorFormat =3D =
Ee.UI.Xaml.Res.mediaError_NotFound;
                        errorMessage =3D sender.Source;
                }
                else if (errorType =3D=3D=3D "RuntimeError") {
                    if (xamlError.lineNumber) {
                        errorFormat =3D =
Ee.UI.Xaml.Res.runtimeErrorWithPosition;
                        lineNumber =3D xamlError.lineNumber;
                        charPosition =3D xamlError.charPosition;
                        methodName =3D xamlError.methodName;
                    }
                    else {
                        errorFormat =3D =
Ee.UI.Xaml.Res.runtimeErrorWithoutPosition;
                        methodName =3D xamlError.methodName;
                    }
                }
                throw Error.invalidOperation(
                    String.format(errorFormat, id, errorType, errorCode, =
errorMessage, lineNumber, charPosition, methodName, xamlFile));
            }
        }
    }

    function Ee$UI$Xaml$Control$_raiseXamlInitialize() {
        if (this.get_scaleMode() !=3D=3D Ee.UI.Xaml.ScaleMode.none) {
            this._ensureTransform();
        }
        this._xamlInitialized =3D true;
        this.xamlInitialize();
        var handler =3D this.get_events().getHandler('xamlInitialized');
        if (handler) {
            handler(this, Sys.EventArgs.Empty);
        }
    }

    function Ee$UI$Xaml$Control$_xamlError(sender, args) {
        var element =3D this.get_element();
        if (element) {
            // DevDiv Bugs 125915: may have been disposed by now. SL =
calls us even though we unhook.
            this._raiseXamlError(sender, new =
Ee.UI.Xaml.ErrorEventArgs(args));
        }
    }

    function Ee$UI$Xaml$Control$_xamlLoaded() {
        var element =3D this.get_element();
        if (element) {
            // DevDiv Bugs 125915: may have been disposed by now. SL =
calls us even though we unhook.
            element.OnLoad =3D null;
            this._raiseXamlInitialize();
        }
    }
Ee.UI.Xaml.Control.prototype =3D {
    _xamlSource: null,
    _xamlInitialized: false,
    _scaleMode: Ee.UI.Xaml.ScaleMode.none,
    _resizeDelegate: null,
    _boundEvents: null,
   =20
    add_xamlError: Ee$UI$Xaml$Control$add_xamlError,
    remove_xamlError: Ee$UI$Xaml$Control$remove_xamlError,

    add_resize: Ee$UI$Xaml$Control$add_resize,
    remove_resize: Ee$UI$Xaml$Control$remove_resize,

    add_xamlInitialized: Ee$UI$Xaml$Control$add_xamlInitialized,
    remove_xamlInitialized: Ee$UI$Xaml$Control$remove_xamlInitialized,

    get_scaleMode: Ee$UI$Xaml$Control$get_scaleMode,
    set_scaleMode: Ee$UI$Xaml$Control$set_scaleMode,
   =20
   =20
    get_xamlSource: Ee$UI$Xaml$Control$get_xamlSource,
    set_xamlSource: Ee$UI$Xaml$Control$set_xamlSource,
   =20
    addEventListener: Ee$UI$Xaml$Control$addEventListener,
   =20
    addEventListeners: Ee$UI$Xaml$Control$addEventListeners,
   =20
    dispose: Ee$UI$Xaml$Control$dispose,   =20
   =20
    initialize: Ee$UI$Xaml$Control$initialize,

    onResize: Ee$UI$Xaml$Control$onResize,
   =20
    onXamlError: Ee$UI$Xaml$Control$onXamlError,
   =20
    xamlDispose: Ee$UI$Xaml$Control$xamlDispose,

    xamlInitialize: Ee$UI$Xaml$Control$xamlInitialize,
   =20
    _ensureTransform: Ee$UI$Xaml$Control$_ensureTransform,

    _onResize: Ee$UI$Xaml$Control$_onResize,
   =20
    _raiseXamlError: Ee$UI$Xaml$Control$_raiseXamlError,
   =20
    _raiseXamlInitialize: Ee$UI$Xaml$Control$_raiseXamlInitialize,

    _xamlError: Ee$UI$Xaml$Control$_xamlError,
   =20
    _xamlLoaded: Ee$UI$Xaml$Control$_xamlLoaded
}

Ee.UI.Xaml.Control._computeScale =3D function =
Ee$UI$Xaml$Control$_computeScale(element) {
    // Calculates the scale of a xamlElement in relation to the =
Silverlight host.
    // used for autoScale and lockAspectRatio
    var width =3D element.width;
    var height =3D element.height;
    var host =3D element.getHost();
    var x =3D width ? (host.content.ActualWidth / width) : 0;
    var y =3D height ? (host.content.ActualHeight / height) : 0;
    return { horizontal: x, vertical: y };
}
Ee.UI.Xaml.Control._ensureScale =3D function =
Ee$UI$Xaml$Control$_ensureScale(el, x, y) {
    var transform =3D el.RenderTransform;
    if (!transform) {
        el.RenderTransform =3D transform =3D =
el.getHost().content.createFromXaml('<ScaleTransform ScaleX=3D"1" =
ScaleY=3D"1"/>');
    }
    else if (transform.toString() !=3D=3D "ScaleTransform") {
        throw =
Error.invalidOperation(Ee.UI.Xaml.Res.scaleModeRequiresScaleTransform);
    }
    transform.ScaleX =3D x;
    transform.ScaleY =3D y;
}
Ee.UI.Xaml.Control._ensureMatrix =3D function =
Ee$UI$Xaml$Control$_ensureMatrix(el, xScale, yScale, xOffset, yOffset) {
    var transform =3D el.RenderTransform;
    if (!transform) {
        el.RenderTransform =3D transform =3D =
el.getHost().content.createFromXaml('<MatrixTransform Matrix=3D"1.0,0.0, =
0.0,1.0, 0.0,0.0"/>');
    }
    else if (transform.toString() !=3D=3D "MatrixTransform") {
        throw =
Error.invalidOperation(Ee.UI.Xaml.Res.scaleModeRequiresScaleTransform);=20
    }
    transform.Matrix.M11 =3D xScale;
    transform.Matrix.M22 =3D yScale;
    transform.Matrix.OffsetX =3D xOffset;
    transform.Matrix.OffsetY =3D yOffset;
}
Ee.UI.Xaml.Control.registerClass("Ee.UI.Xaml.Control", Sys.UI.Control);
Ee.UI.Xaml.ErrorEventArgs =3D function =
Ee$UI$Xaml$ErrorEventArgs(xamlError) {
    /// <param name=3D"xamlError"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "xamlError"}
    ]);
    if (e) throw e;

    this._xamlError =3D xamlError;
    Ee.UI.Xaml.ErrorEventArgs.initializeBase(this);
}



    function Ee$UI$Xaml$ErrorEventArgs$get_error() {
        /// <value></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._xamlError;
    }
Ee.UI.Xaml.ErrorEventArgs.prototype =3D {
    _xamlError: null,
   =20
    get_error: Ee$UI$Xaml$ErrorEventArgs$get_error
}
Ee.UI.Xaml.ErrorEventArgs.registerClass("Ee.UI.Xaml.ErrorEventArgs", =
Sys.CancelEventArgs);



Type.registerNamespace('Ee.UI.Xaml.Media');

Ee.UI.Xaml.Media.PlayerElementName  =3D {
    videoWindow             : "VideoWindow",              // the =
<mediaelement>
    placeholderImage        : "PlaceholderImage",         // Displays =
the placeholder image prior to the media loading
    playerControls          : "PlayerControls",           // area =
encompassing all player controls
    playButton              : "PlayButton",               // a play =
button
    playPauseButton         : "PlayPauseButton",          // a =
play/pause toggle button (requires PlaySymbol & PauseSymbol)
    playSymbol              : "PlaySymbol",               // part of =
play/pause button, represents symbol showing for "play"
    pauseSymbol             : "PauseSymbol",              // part of =
play/pause button, represents symbol showing for "pause"
    stopButton              : "StopButton",               // the stop =
button
    pauseButton             : "PauseButton",              // the pause =
button
    nextButton              : "NextButton",               // the next =
button (next chapter)
    previousButton          : "PreviousButton",           // the =
previous button (prev chapter)
    muteButton              : "MuteButton",               // mute button
    muteOnSymbol            : "MuteOnSymbol",             // adornment =
to show on MuteButton when audio muted
    muteOffSymbol           : "MuteOffSymbol",            // adornment =
to show on MuteButton when audio enabled
    timeSlider              : "TimeSlider",               // the scrub =
bar
    timeThumb               : "TimeThumb",                // the play =
head
    timeCompleted           : "TimeCompleted",            // indicator =
on slider showing how much time is completed
    volumeSlider            : "VolumeSlider",             // the volume =
slider bar
    volumeThumb             : "VolumeThumb",              // the volume =
slider thumb control
    volumeUpButton          : "VolumeUpButton",           // a button to =
make the volume increase
    volumeDownButton        : "VolumeDownButton",         // a button to =
make the volume decrease
    totalTimeText           : "TotalTimeText",            // the text =
area for total duration of video
    currentTimeText         : "CurrentTimeText",          // the text =
area for the current media time
    downloadSlider          : "DownloadProgressSlider",   // slider to =
show download progress
    downloadText            : "DownloadProgressText",     // text to =
show download progress
    bufferingArea           : "BufferingArea",            // canvas that =
contains buffering feedback UI
    bufferingText           : "BufferingText",            // text to =
show buffering progress
    fullScreenButton        : "FullScreenButton",         // button to =
show video full screen
    chapterArea             : "ChapterArea",              // encasing =
chapters area
    chapterToggleButton     : "ChapterToggleButton",      // toggles the =
chapter list
    chapterScroll           : "ChapterScroll",            // chapters =
scroll region
    chapterPrev             : "ChapterScrollPrevious",    // control to =
scroll chapters to next
    chapterNext             : "ChapterScrollNext",        // control to =
scroll chapters to previous
    chapterItem             : "ChapterScrollItem",        // item =
signifying video item
    captionText             : "CaptionText",              // TextBlock =
to show closed captions in   =20
    captionArea             : "CaptionArea",              // Background =
of CaptionText=20
    captionToggleButton     : "CaptionToggleButton",      // Toggles =
closed captions
    captionOnSymbol         : "CaptionOnSymbol",          // adornment =
to show on CaptionButton when captions on
    captionOffSymbol        : "CaptionOffSymbol",         // adornment =
to show on CaptionButton when captions off
    fullScreenArea          : "FullScreenArea",           // enabled =
when player switches to FS
    fullScreenVideoWindow   : "FullScreenVideoWindow",    // video =
window used for fullscreen mode
    fullScreenCaptionText   : "FullScreenCaptionText",    // mirror of =
captions for fullscreen mode
    fullScreenCaptionArea   : "FullScreenCaptionArea"     // mirror of =
captions for fullscreen mode
};
Ee.UI.Xaml.Media._DomElement =3D function =
Ee$UI$Xaml$Media$_DomElement(host, nameElement) {
    // <summary>Represents a XAML Element</summary>
    // <param name=3D"host">Silverlight host</param>
    // <param name=3D"nameElement" type=3D"String">Name of XAML canvas =
which represents the element</param>
    this._control =3D host.content.findName(nameElement);
    if (this._control) {
        this.bindEvent("mouseEnter", nameElement + "_MouseEnter");
        this.bindEvent("mouseLeave", nameElement + "_MouseLeave");
        this._showAnimation =3D this._control.findName(nameElement + =
"_Show");
        this._hideAnimation =3D this._control.findName(nameElement + =
"_Hide");
        this._enableAnimation =3D this._control.findName(nameElement + =
"_Enable");
        this._disableAnimation =3D this._control.findName(nameElement + =
"_Disable");
    }
}









    function Ee$UI$Xaml$Media$_DomElement$get_control() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value>The underlying XAML control</value>
        return this._control;
    }

    function Ee$UI$Xaml$Media$_DomElement$get_enabled() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._enabled;
    }
    function Ee$UI$Xaml$Media$_DomElement$set_enabled(value) {
        if (value !=3D=3D this.get_enabled()) {
            // e.g. might make the control look grayed out or increase =
its alpha
            var anim =3D value ? this._enableAnimation : =
this._disableAnimation;
            if (anim) anim.begin();
            this._enabled =3D value;
        }
    }

    function Ee$UI$Xaml$Media$_DomElement$bindEvent(eventName, =
animationName, callback, callbackOwner) {
        // helper that reduces code necessary to bind a xaml event to a =
function and have it play an animation by name
        // if set_enabled(false) is called, animations stop playing and =
callbacks aren't called. For example, a disabled button does nothing.
        if (animationName || callback) {
            var animation =3D null;
            if (animationName) animation =3D =
this._control.findName(animationName);
           =20
            // no animation found and theres no callback, no reason to =
hook the event
            if (!animation && !callback) return;
           =20
            if (!this._boundEvents) this._boundEvents =3D [];

            if (callback) {
                callback =3D Function.createDelegate(callbackOwner || =
this, callback);
            }
           =20
            var _this =3D this;
            function handleEvent(sender, args) {
                if (!_this.get_enabled()) return;
                if (callback && !callback(sender, args)) return;
                if (animation) animation.begin();
            }
           =20
            var token =3D this._control.addEventListener(eventName, =
handleEvent);
            this._boundEvents[this._boundEvents.length] =3D { eventName: =
eventName, token: token };
        }
    }

    function Ee$UI$Xaml$Media$_DomElement$dispose() {
        if (this._control) {
            if (this._boundEvents) {
                for (var i =3D 0, l =3D this._boundEvents.length; i < l; =
i++) {
                    var e =3D this._boundEvents[i];
                    this._control.removeEventListener(e.eventName, =
e.token);
                }
                this._boundEvents =3D null;
            }
                   =20
            this._showAnimation =3D null;
            this._hideAnimation =3D null;
            this._enableAnimation =3D null;
            this._disableAnimation =3D null;
            this._control =3D null;
        }
    }

    function Ee$UI$Xaml$Media$_DomElement$setVisible(value) {
        var anim =3D value ? this._showAnimation : this._hideAnimation;
        if (anim) {
            anim.begin();
        }
        else if (this._control) {
            this._control.visibility =3D value ? 0 : 1;
        }
    }
Ee.UI.Xaml.Media._DomElement.prototype =3D {
    _control: null,
    _boundEvents: null,
    _showAnimation: null,
    _hideAnimation: null,
    _enableAnimation: null,
    _disableAnimation: null,
    _enabled: true,
   =20
    get_control: Ee$UI$Xaml$Media$_DomElement$get_control,

    get_enabled: Ee$UI$Xaml$Media$_DomElement$get_enabled,
    set_enabled: Ee$UI$Xaml$Media$_DomElement$set_enabled,

    bindEvent: Ee$UI$Xaml$Media$_DomElement$bindEvent,
   =20
    dispose: Ee$UI$Xaml$Media$_DomElement$dispose,
   =20
    setVisible: Ee$UI$Xaml$Media$_DomElement$setVisible
}
Ee.UI.Xaml.Media._DomElement.registerClass('Ee.UI.Xaml.Media._DomElement'=
, null, Sys.IDisposable);

Ee.UI.Xaml.Media._Button =3D function Ee$UI$Xaml$Media$_Button(host, =
nameElement, autoRepeatInterval,
                                            clickHandler, =
doubleClickHandler, handlerOwner, requiresSender) {
   =20
    Ee.UI.Xaml.Media._Button.initializeBase(this, [host, nameElement]);
    this._repeatInterval =3D autoRepeatInterval || 0;
   =20
    var control =3D this.get_control();
    if (control) {
        control.cursor =3D "Hand";
        this.bindEvent("mouseLeftButtonDown", nameElement + =
"_MouseDown", this._mouseDown);
        this.bindEvent("mouseLeftButtonUp", nameElement + "_MouseUp", =
this._mouseUp);
        this.bindEvent("mouseLeave", nameElement + "_MouseUp", =
this._mouseLeave);
    }
    if (handlerOwner) {
        // some button handlers are wired directly into public methods =
that dont take parameters.
        // others are private methods that need to know the button =
instance clicked.
        this._requiresSender =3D !!requiresSender;
        this._clickDelegate =3D Function.createDelegate(handlerOwner, =
clickHandler);
        if (doubleClickHandler) {
            this._doubleClickDelegate =3D =
Function.createDelegate(handlerOwner, doubleClickHandler);
        }
    }
}









    function Ee$UI$Xaml$Media$_Button$set_enabled(value) {
        Ee.UI.Xaml.Media._Button.callBaseMethod(this, "set_enabled", =
[value]);
        var c =3D this.get_control();
        if (c) c.cursor =3D value ? "Hand" : "Default";
    }

	function Ee$UI$Xaml$Media$_Button$dispose() {
	    this._cancelRepeat();
	    this._clickDelegate =3D null;
	    this._doubleClickDelegate =3D null;
        Ee.UI.Xaml.Media._Button.callBaseMethod(this, 'dispose');        =
       =20
    }

    function Ee$UI$Xaml$Media$_Button$_cancelRepeat() {
        if (!this._repeatTimeout) return;
        window.clearTimeout(this._repeatTimeout);
        this._repeatTimeout =3D null;
        this._repeatClickDelegate =3D null;
    }

    function Ee$UI$Xaml$Media$_Button$_doClick(isDouble) {
        if (isDouble && this._doubleClickDelegate) {
            this._requiresSender ? this._doubleClickDelegate(this) : =
this._doubleClickDelegate();
        }
        else if (this._clickDelegate) {
            this._requiresSender ? this._clickDelegate(this) : =
this._clickDelegate();
        }
    }

    function Ee$UI$Xaml$Media$_Button$_mouseDown() {
        this._down =3D true;
        if (this._repeatInterval && !this._repeatTimeout) {
            // click immediately when it will be repeating,
            // otherwise we don't until leftbuttonup
            this._doClick(false);
            this._repeatClickDelegate =3D Function.createDelegate(this, =
this._repeatClick);
            this._repeatTimeout =3D =
window.setTimeout(this._repeatClickDelegate, this._repeatInterval);
        }
        return true;
    }

    function Ee$UI$Xaml$Media$_Button$_mouseLeave() {
        if (!this._down) {
            // we're not already down, so cancel the mouseup animation
            return false;
        }
        this._down =3D false;
        this._cancelRepeat();
        return true;
    }

    function Ee$UI$Xaml$Media$_Button$_mouseUp() {
        this._down =3D false;

        if (this._repeatTimeout) {
            this._cancelRepeat();
        }
        else {
            var tmNow =3D new Date().getTime();
            var last =3D this._timeLastLeftButtonUp;
            this._timeLastLeftButtonUp =3D tmNow;
            var doubleClick =3D last && ((tmNow - last) < 300);
            if (doubleClick) {
                // so a 3rd click won't result in another double click
                this._timeLastLeftButtonUp =3D 0;
            }
            this._doClick(doubleClick);
        }
        return true;
    }

    function Ee$UI$Xaml$Media$_Button$_repeatClick() {
        this._repeatTimeout =3D =
window.setTimeout(this._repeatClickDelegate, this._repeatInterval);
        this._doClick(false);
    }
Ee.UI.Xaml.Media._Button.prototype =3D {
    _down: false,
    _repeatInterval: 0,
    _repeatTimeout: null,
    _repeatClickDelegate: null,
    _timeLastLeftButtonUp: 0,
    _clickDelegate: null,
    _doubleClickDelegate: null,
   =20
    set_enabled: Ee$UI$Xaml$Media$_Button$set_enabled,
   =20
	dispose: Ee$UI$Xaml$Media$_Button$dispose,

    _cancelRepeat: Ee$UI$Xaml$Media$_Button$_cancelRepeat,

    _doClick: Ee$UI$Xaml$Media$_Button$_doClick,

    _mouseDown: Ee$UI$Xaml$Media$_Button$_mouseDown,
   =20
    _mouseLeave: Ee$UI$Xaml$Media$_Button$_mouseLeave,
   =20
    _mouseUp: Ee$UI$Xaml$Media$_Button$_mouseUp,

    _repeatClick: Ee$UI$Xaml$Media$_Button$_repeatClick
}
Ee.UI.Xaml.Media._Button.registerClass('Ee.UI.Xaml.Media._Button', =
Ee.UI.Xaml.Media._DomElement);

Ee.UI.Xaml.Media.Player =3D function Ee$UI$Xaml$Media$Player(domElement) =
{
    /// <param name=3D"domElement"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "domElement"}
    ]);
    if (e) throw e;

    Ee.UI.Xaml.Media.Player.initializeBase(this, [domElement]);
    // default scale mode for a media player
    this.set_scaleMode(Ee.UI.Xaml.ScaleMode.zoom);
}
















































    function Ee$UI$Xaml$Media$Player$add_chapterStarted(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("chapterStarted", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_chapterStarted(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("chapterStarted", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_markerReached(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("markerReached", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_markerReached(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("markerReached", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_mediaEnded(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("mediaEnded", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_mediaEnded(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("mediaEnded", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_mediaFailed(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("mediaFailed", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_mediaFailed(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("mediaFailed", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_mediaOpened(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("mediaOpened", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_mediaOpened(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("mediaOpened", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_stateChanged(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("stateChanged", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_stateChanged(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("stateChanged", handler);
    }

    function Ee$UI$Xaml$Media$Player$add_volumeChanged(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().addHandler("volumeChanged", handler);
    }
    function Ee$UI$Xaml$Media$Player$remove_volumeChanged(handler) {
    var e =3D Function._validateParams(arguments, [{name: "handler", =
type: Function}]);
    if (e) throw e;

        this.get_events().removeHandler("volumeChanged", handler);
    }

    function Ee$UI$Xaml$Media$Player$get_autoPlay() {
        /// <value type=3D"Boolean"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (this._mediaElement) return this._mediaElement.AutoPlay;
        if (this._autoPlay !=3D=3D null) return this._autoPlay;
        return false;
    }
    function Ee$UI$Xaml$Media$Player$set_autoPlay(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Boolean}]);
        if (e) throw e;

        if (this._mediaElement) {
            this._mediaElement.AutoPlay =3D value;
        }
        else {
            this._autoPlay =3D value;
        }
    }

    function Ee$UI$Xaml$Media$Player$get_caption() {
        /// <value type=3D"String"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._caption || "";
    }
    function Ee$UI$Xaml$Media$Player$set_caption(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: String}]);
        if (e) throw e;

        this._caption =3D value;
        if (this._captionArea) {
            this._captionArea.set_text(value);
        }
        if (this._captionAreaFS) {
            this._captionAreaFS.set_text(value);
        }
    }

    function Ee$UI$Xaml$Media$Player$get_chapters() {
        /// <value type=3D"Array"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._chapters) return [];
        return Array.clone(this._chapters);
    }
    function Ee$UI$Xaml$Media$Player$set_chapters(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Array}]);
        if (e) throw e;

        this._chapters =3D value;
        if (this._chapterArea) {
            this._loadChapters(value);
        }
    }

    function Ee$UI$Xaml$Media$Player$get_currentChapter() {
        /// <value type=3D"Number"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._currentChapter;
    }
    function Ee$UI$Xaml$Media$Player$set_currentChapter(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Number}]);
        if (e) throw e;

        var chapters =3D this.get_chapters();
        if (!chapters || value < 0 || value >=3D chapters.length) {
            throw Error.argumentOutOfRange("currentChapter", value, =
Ee.UI.Xaml.Media.Res.invalidChapterIndex);
        }
        var newTime =3D chapters[value].time;
        if (newTime !=3D=3D -1) {
            this.set_timeIndex(newTime);
        }
    }

    function Ee$UI$Xaml$Media$Player$get_enableCaptions() {
        /// <value type=3D"Boolean"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return !!this._enableCaptions;
    }
    function Ee$UI$Xaml$Media$Player$set_enableCaptions(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Boolean}]);
        if (e) throw e;

        if (this._enableCaptions !=3D=3D value) {
            this._enableCaptions =3D value;
            this._ensureCaption();
        }
    }

    function Ee$UI$Xaml$Media$Player$get_mediaMarkers() {
        /// <value type=3D"Array"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._mediaMarkers) return [];
        return Array.clone(this._mediaMarkers);
    }

    function Ee$UI$Xaml$Media$Player$get_mediaElement() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._mediaElement || null;
    }

    function Ee$UI$Xaml$Media$Player$get_mediaUrl() {
        /// <value type=3D"String"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (this._mediaElement) return this._mediaElement.Source || "";
        return this._mediaUrl || "";
    }
    function Ee$UI$Xaml$Media$Player$set_mediaUrl(value) {   =20
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: String}]);
        if (e) throw e;

        if (this._mediaElement) {
            this._loadPlaceholderImage();
            this._loadMediaUrl(value);
        }
        else {
            this._mediaUrl =3D value;
        }
    }

    function Ee$UI$Xaml$Media$Player$get_muted() {
        /// <value type=3D"Boolean"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (this._mediaElement) return this._mediaElement.IsMuted;
        return !!this._muted;
    }
    function Ee$UI$Xaml$Media$Player$set_muted(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Boolean}]);
        if (e) throw e;

        if (value !=3D=3D this.get_muted()) {
            if (this._mediaElement) {
                this._mediaElement.IsMuted =3D value;
                this._muteButton.set_state(value ? 1 : 0);
            }
            else {
                this._muted =3D value;
            }
            if (!this.get_isUpdating()) {
                this._raiseVolumeChanged(Sys.EventArgs.Empty);
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$get_placeholderImage() {
        /// <value type=3D"String" mayBeNull=3D"true"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._placeholderImage || "";
    }
    function Ee$UI$Xaml$Media$Player$set_placeholderImage(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: String, mayBeNull: true}]);
        if (e) throw e;

        this._placeholderImage =3D value;
    }

    function Ee$UI$Xaml$Media$Player$get_playState() {
        /// <value type=3D"String"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._mediaElement ? this._mediaElement.CurrentState : =
"Stopped";
    }

    function Ee$UI$Xaml$Media$Player$get_timeIndex() {
        /// <value type=3D"Number"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._mediaElement ? this._mediaElement.position.seconds =
: 0;
    }
    function Ee$UI$Xaml$Media$Player$set_timeIndex(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Number}]);
        if (e) throw e;

        if(this._mediaElement && this._canSeek) {
            // restrict to within 0 and naturalduration
            value =3D Math.max(0, value);
            value =3D Math.min(this._naturalduration, value);
            this._updateTime(value);

            if (!this._dragTime._isDragging) {
                this._mediaEnded =3D false;
                this.set_caption("");
                var position =3D this._mediaElement.position;
                position.seconds =3D value;
                this._mediaElement.position =3D position;
                // update ui and detect chapter changing
                this._currentChapter =3D this._getChapterAt(value, =
true);
                this._detectChapterChanged();
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$get_volume() {
        /// <value type=3D"Number"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (this._volume !=3D=3D null) return this._volume;
        if (this._mediaElement) return this._mediaElement.volume;
        return Ee.UI.Xaml.Media.Player._defaultVolume;
    }
    function Ee$UI$Xaml$Media$Player$set_volume(value) {
        var e =3D Function._validateParams(arguments, [{name: "value", =
type: Number}]);
        if (e) throw e;

        if (value < 0 || value > 1) {
            throw Error.argumentOutOfRange("value", value, =
Ee.UI.Xaml.Media.Res.volumeRange);
        }
        if (value !=3D=3D this.get_volume()) {
            if (this._mediaElement && this._mediaElement.CurrentState =
!=3D=3D "Closed") {
                this._mediaElement.volume =3D value;
            }
            else {
                this._volume =3D value;
            }
            if (!this.get_isUpdating()) {
                this._raiseVolumeChanged(Sys.EventArgs.Empty);
            }
        }

        if (this._dragVolume) this._dragVolume.set_value(value);
    }

    function Ee$UI$Xaml$Media$Player$nextChapter() {
        /// <returns type=3D"Boolean"></returns>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._canSeek) return false;
        var chapters =3D this.get_chapters();
        if (chapters) {
            var i =3D this.get_currentChapter();
            if (++i < chapters.length) {
                this.set_currentChapter(i);
                return true;
            }
        }
        return false;
    }

    function Ee$UI$Xaml$Media$Player$onChapterStarted(chapterEventArgs) =
{
        /// <param name=3D"chapterEventArgs" =
type=3D"Ee.UI.Xaml.Media.ChapterEventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "chapterEventArgs", type: =
Ee.UI.Xaml.Media.ChapterEventArgs}
        ]);
        if (e) throw e;

    }

    function Ee$UI$Xaml$Media$Player$onMarkerReached(args) {
        /// <param name=3D"args" =
type=3D"Ee.UI.Xaml.Media.MarkerEventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "args", type: Ee.UI.Xaml.Media.MarkerEventArgs}
        ]);
        if (e) throw e;

    }

    function =
Ee$UI$Xaml$Media$Player$onPlayStateChanged(stateChangedEventArgs) {
        /// <param name=3D"stateChangedEventArgs" =
type=3D"Ee.UI.Xaml.Media.StateChangedEventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "stateChangedEventArgs", type: =
Ee.UI.Xaml.Media.StateChangedEventArgs}
        ]);
        if (e) throw e;

    }

    function Ee$UI$Xaml$Media$Player$onVolumeChanged(args) {
        /// <param name=3D"args" type=3D"Sys.EventArgs"></param>
        var e =3D Function._validateParams(arguments, [
            {name: "args", type: Sys.EventArgs}
        ]);
        if (e) throw e;

    }

    function Ee$UI$Xaml$Media$Player$pause() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._mediaElement) throw =
Error.invalidOperation(Ee.UI.Xaml.Media.Res.noMediaElement);
        if (!this._mediaOpened) return;
	    this._mediaElement.pause();
    }

    function Ee$UI$Xaml$Media$Player$play() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._mediaElement) throw =
Error.invalidOperation(Ee.UI.Xaml.Media.Res.noMediaElement);
        if (!this._mediaOpened) return;
        this.set_caption("");
        var me =3D this._mediaElement;
        if (this._mediaEnded) {
            this._mediaEnded =3D false;
            var seconds =3D me.Position.Seconds;
            var totalSeconds =3D me.NaturalDuration.Seconds;
            if ( seconds =3D=3D totalSeconds )
            {
                me.Position =3D "0";
            }
        }
        me.play();
    }

    function Ee$UI$Xaml$Media$Player$previousChapter() {
        /// <returns type=3D"Boolean"></returns>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._canSeek) return false;
        var chapters =3D this.get_chapters();
        if (chapters) {
            var i =3D this.get_currentChapter();
            if (--i >=3D 0) {
                this.set_currentChapter(i);
                return true;
            }
        }
        return false;
    }

    function Ee$UI$Xaml$Media$Player$stop() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        if (!this._mediaElement) throw =
Error.invalidOperation(Ee.UI.Xaml.Media.Res.noMediaElement);
        if (!this._mediaOpened) return;
        this._mediaEnded =3D false;
        this._currentChapter =3D this._getChapterAt(0, true);
	    this._mediaElement.stop();
	    this.set_caption("");
    }

    function Ee$UI$Xaml$Media$Player$toggleMuted() {
        /// <returns type=3D"Boolean"></returns>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        var v =3D !this.get_muted();
        this.set_muted(v);
        return v;
    }

    function Ee$UI$Xaml$Media$Player$togglePlayPause() {
        /// <returns type=3D"String"></returns>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        this.get_playState() =3D=3D=3D "Playing" ? this.pause() : =
this.play();
        return this.get_playState();
    }

    function Ee$UI$Xaml$Media$Player$xamlDispose() {
        if (this._timerCookie) {
            window.clearTimeout(this._timerCookie);
            this._timerCookie =3D null;
        }
        if (this._domElements) {
            for (var i =3D 0, l =3D this._domElements.length; i < l; =
i++) {
                this._domElements[i].dispose();
            }
            delete this._domElements;
        }

        // player should not continue playing after disposed
        // safe to call stop in any state
        if (this._mediaElement) this._mediaElement.stop();
        // remove direct references to xaml elements
        this._mediaElement =3D null;
        this._bufferingText =3D null;
        this._bufferingStoryboard =3D null;
       =20
        var content =3D this.get_element() ? this.get_element().content =
: null;
        if (content) {
            content.onFullScreenChange =3D null;
        }
       =20
        Ee.UI.Xaml.Media.Player.callBaseMethod(this, "xamlDispose");     =
  =20
    }

    function Ee$UI$Xaml$Media$Player$xamlInitialize() {
        // search and create controls for well named XAML elements
        this._bindChildControls();=20
        Ee.UI.Xaml.Media.Player.callBaseMethod(this, 'xamlInitialize');
       =20
        var chapters =3D this.get_chapters();
        if (chapters) {
            this._loadChapters(chapters);
        }
       =20
        if (this._mediaUrl =3D=3D=3D null) {
            // no initial media means you can't seek
            this._ensureSeeking(false);
            // disable play, pause, stop, etc
	        this._mediaAvailable(false);
	    }
        this._loadPlaceholderImage();	   =20
        this._clearMediaCache();
    }

    function Ee$UI$Xaml$Media$Player$_bindChildControls() {
        var names =3D Ee.UI.Xaml.Media.PlayerElementName,
            host =3D this.get_element(),
            btn =3D Ee.UI.Xaml.Media._Button,
            domEl =3D Ee.UI.Xaml.Media._DomElement,
            sldr =3D Ee.UI.Xaml.Media._Slider,
            mbtn =3D Ee.UI.Xaml.Media._MultiStateButton,
            tb =3D Ee.UI.Xaml.Media._TextBlock;
       =20
        var mediaDomElement;
        this._domElements =3D [
            mediaDomElement =3D new btn(host, names.videoWindow, null, =
this.togglePlayPause, this._onFullScreenME, this),
            this._fsCanvas =3D new btn(host, names.fullScreenArea, null, =
this.togglePlayPause, this._onFullScreenME, this),
            this._fsVideoWindow =3D new domEl(host, =
names.fullScreenVideoWindow),
            this._bufferingProgress =3D new domEl(host, =
names.bufferingArea),
            new domEl(host, names.playerControls),
            // buttons
            this._playButton =3D new btn(host, names.playButton, null, =
this.play, null, this),
            this._stopButton =3D new btn(host, names.stopButton, null, =
this.stop, null, this),
            this._pauseButton =3D new btn(host, names.pauseButton, null, =
this.pause, null, this),
            new btn(host, names.volumeUpButton, 20, this._onVolumeUp, =
null, this),
            new btn(host, names.volumeDownButton, 20, =
this._onVolumeDown, null, this),
            new btn(host, names.fullScreenButton, null, =
this._onFullScreen, null, this),
            this._previousButton =3D new btn(host, names.previousButton, =
null, this._chapterPrevious, null, this),
            this._nextButton =3D new btn(host, names.nextButton, null, =
this._chapterNext, null, this),
            this._playPauseButton =3D new mbtn(host, =
names.playPauseButton, null, this.togglePlayPause, null, this, =
names.playSymbol, names.pauseSymbol),
            this._muteButton =3D new mbtn(host, names.muteButton, null, =
this.toggleMuted, null, this, names.muteOffSymbol, names.muteOnSymbol),
            // time slider
            this._dragTime =3D new sldr(host, names.timeThumb, =
names.timeSlider, this._onTimeSliderChanged, this),
            // volume slider
            this._dragVolume =3D new sldr(host, names.volumeThumb, =
names.volumeSlider, this._onVolumeSliderChanged, this),
            // time
            this._totalTimeText =3D new tb(host, names.totalTimeText),
            this._currentTimeText =3D new tb(host, =
names.currentTimeText),
            this._downloadProgress =3D new =
Ee.UI.Xaml.Media._ProgressBar(host, names.downloadSlider, =
names.downloadText),
            // chapter area       =20
            this._chapterArea =3D new =
Ee.UI.Xaml.Media._ChapterArea(this),
            // caption area
            this._captionArea =3D new tb(host, names.captionText, =
names.captionArea),
            this._captionAreaFS =3D new tb(host, =
names.fullScreenCaptionText, names.fullScreenCaptionArea),
            // toggle captions on/off
            this._captionButton =3D new mbtn(host, =
names.captionToggleButton, null, this._onCaptionToggle, null, this, =
names.captionOnSymbol, names.captionOffSymbol),
            // placeholder image
            this._imageElement =3D new domEl(host, =
names.placeholderImage)
        ];

        mediaDomElement.bindEvent("mediaOpened", null, =
this._meMediaOpened, this);
        mediaDomElement.bindEvent("mediaFailed", null, =
this._meMediaFailed, this);
        mediaDomElement.bindEvent("mediaEnded", null, =
this._meMediaEnded, this);
        mediaDomElement.bindEvent("downloadProgressChanged", null, =
this._meDownloadProgress, this);
        mediaDomElement.bindEvent("bufferingProgressChanged", null, =
this._meBufferingProgress, this);
        mediaDomElement.bindEvent("markerReached", null, =
this._meMarkerReached, this);
        mediaDomElement.bindEvent("currentStateChanged", null, =
this._meStateChanged, this);

        // UI for buffering feedback       =20
        this._bufferingStoryboard =3D =
host.content.findName(names.bufferingArea + "_Buffering");
        this._bufferingText =3D =
host.content.findName(names.bufferingText);

        this._dragVolume.set_value(this.get_volume());

        // full screen event
        host.content.onFullScreenChange =3D =
Function.createDelegate(this, this._fullScreenChanged);
       =20
        this._mediaElement =3D mediaDomElement.get_control();
        if (!this._mediaElement) {
            throw =
Error.invalidOperation(Ee.UI.Xaml.Media.Res.noMediaElement);
        }
        this._mediaElement.AutoPlay =3D false;
    }

    function Ee$UI$Xaml$Media$Player$_chapterNext() {
        var chapters =3D this.get_chapters();
        if (!chapters || !chapters.length) {
            // if there are no chapters, the next and previous buttons =
jump by a percentage of play time
            this._skipTime(1);
        }
        else {
            this.nextChapter();
        }
    }

    function Ee$UI$Xaml$Media$Player$_chapterPrevious() {
        var chapters =3D this.get_chapters();
        if (!chapters || !chapters.length) {
            // if there are no chapters, the next and previous buttons =
jump by a percentage of play time
            this._skipTime(-1);
        }
        else {
            // find previous chapter (don't use previousChapter() =
because we need to allow 1s lead time)
            // e.g. clicking the previous chapter button in the middle =
of chapter #X should start at the beginning of chapter #X,
            // not chapter #X-1.
            // getChapterAt will tell us which chapter is playing at the =
current time minus 1 second
            var newChapter =3D this._getChapterAt(this.get_timeIndex() - =
1);
            if (newChapter =3D=3D=3D -1) {
                // 1 second ago =3D before the first chapter in the list
                this.set_timeIndex(0);
            }
            else {
                this.set_currentChapter(newChapter);
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$_clearMediaCache() {
        // some properties can't be set until the MediaElement has =
content
        if (this._muted !=3D=3D null) {
            this._mediaElement.IsMuted =3D this._muted;
            this._muteButton.set_state(this._muted ? 1 : 0);
            this._muted =3D null;
        }
        if (this._volume !=3D=3D null) {
            this._mediaElement.Volume =3D this._volume;
            this._dragVolume.set_value(this._volume);
            this._volume =3D null;
        }
        if (this._autoPlay !=3D=3D null) {
            this._mediaElement.AutoPlay =3D this._autoPlay;
            this._autoPlay =3D null;
        }
        if (this._mediaUrl !=3D=3D null) {
            this._loadMediaUrl(this._mediaUrl);
            this._mediaUrl =3D null
        }
    }

    function Ee$UI$Xaml$Media$Player$_detectChapterChanged(currentTime) =
{
        if (this._lastChapterStarted !=3D=3D this._currentChapter) {
            // may have skipped into a chapter
            this._lastChapterStarted =3D this._currentChapter;
            this._raiseChapterStarted(new =
Ee.UI.Xaml.Media.ChapterEventArgs(this._currentChapter));
        }
        else {
            // We think we're on the same chapter we last raised an =
event for. But natural progression of the media
            // or seeking operations may have put the position outside =
the bounds of this chapter.
           =20
            // DevDiv Bugs 126619: use a 0.001 second padding to prevent =
false chapter start detection
            if ((this._nextChapterTime !=3D=3D -1 && currentTime >=3D =
(this._nextChapterTime - 0.001)) ||
                (this._currentChapterTime !=3D=3D -1 && currentTime < =
(this._currentChapterTime - 0.001))) {
                // the time index jumped outside the bounds of the =
current chapter
                this._currentChapter =3D this._getChapterAt(currentTime, =
true);
                this._lastChapterStarted =3D this._currentChapter;
                this._raiseChapterStarted(new =
Ee.UI.Xaml.Media.ChapterEventArgs(this._currentChapter));
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$_enableBuffering(enabled, percent) =
{
        if (enabled) {
            if (this._bufferingText) {
                this._bufferingText.Visibility =3D 0;
                this._bufferingText.Text =3D percent.toString();
            }
            if (!this._bufferingProgressVisible) {
                this._bufferingProgress.setVisible(true);
                if (this._bufferingStoryboard) =
this._bufferingStoryboard.begin();
            }
            this._bufferingProgressVisible =3D true;
        }
        else if (this._bufferingProgressVisible) {
            if (this._bufferingText) {
                this._bufferingText.Visibility =3D 1;
            }
            this._bufferingProgress.setVisible(false);
            if (this._bufferingStoryboard) =
this._bufferingStoryboard.stop();
            this._bufferingProgressVisible =3D false;
        }
    }

    function Ee$UI$Xaml$Media$Player$_ensureCaption() {
        var showCaptions =3D this._toggledCaptions && =
this.get_enableCaptions();
        if (showCaptions) {
            var caption =3D this.get_caption();
            if (this._captionArea) {
                this._captionArea.set_text(caption);
            }
            if (this._captionAreaFS) {
                this._captionAreaFS.set_text(caption);
            }
        }
        else {
            if (this._captionArea) {
                this._captionArea.setVisible(false);
            }
            if (this._captionAreaFS) {
                this._captionAreaFS.setVisible(false);
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$_ensureChapterArea() {
        var displayChapters =3D this._canSeek;
        if (displayChapters) {
            var chapters =3D this.get_chapters();
            if (chapters) {
                // we may have chapters but none have images. In that =
case don't show the chapter area.
                displayChapters =3D false;
                for (var i =3D 0, l =3D chapters.length; i < l; i++) {
                    if (chapters[i].imageUrl) {
                        displayChapters =3D true;
                        break;
                    }
                }
            }
        }
       =20
        if (displayChapters && !this._chaptersActive) {
            this._chapterArea.activate();
            this._chaptersActive =3D true;
        }
        else if(!displayChapters && this._chaptersActive) {
            this._chapterArea.deactivate();
            this._chapterArea.setVisible(false);
            this._chaptersActive =3D false;
        }
    }

    function Ee$UI$Xaml$Media$Player$_ensureSeeking(canSeek) {
        // when media is opened that doesn't support seeking (e.g. live =
streams), disable seek related controls
        if (this._canSeek !=3D=3D canSeek) {
            this._canSeek =3D canSeek;
            this._previousButton.set_enabled(canSeek);
            this._nextButton.set_enabled(canSeek);
            this._ensureChapterArea();
            // it might be that the slider should still show time =
progress, but not allow you to click on it to set the time
            this._dragTime.set_enableSeeking(canSeek);
        }
    }

    function Ee$UI$Xaml$Media$Player$_ensureDuration(hasDuration) {
        if (this._hasDuration !=3D=3D hasDuration) {
            this._hasDuration =3D hasDuration;
            this._totalTimeText.setVisible(hasDuration);
            this._currentTimeText.setVisible(hasDuration);
            // when there is no duration (e.g. live feed) the time =
slider is meaningless.
            this._dragTime.set_enabled(hasDuration);
        }
    }

    function Ee$UI$Xaml$Media$Player$_formatTime(time) {
    	var hours =3D Math.floor(time / (1000*60*60));
    	var minutes =3D Math.floor(time / (1000*60)) - (hours*60);
    	var seconds =3D Math.floor(time / 1000) - (hours*60*60) - =
(minutes*60);
	    var timeString =3D "";
    	if (hours > 0) {
    	    timeString =3D hours < 10 ? ("0" + hours) : ("" + hours);
    	    timeString +=3D ":";
    	}
        timeString +=3D minutes < 10 ? ("0" + minutes) : ("" + minutes);
	    timeString +=3D ":";
        timeString +=3D seconds < 10 ? ("0" + seconds) : ("" + seconds);
	    return timeString;
    }

    function Ee$UI$Xaml$Media$Player$_fullScreenChanged(sender, =
eventArgs) {
        var fs =3D this._fsCanvas.get_control();
        if (!fs) return;
        if (this.get_element().content.fullScreen) {
            var rootTransform =3D =
this.get_element().content.root.RenderTransform;
            var rootX =3D 1;
            var rootY =3D 1;
            if (rootTransform && rootTransform.toString() =3D=3D=3D =
"ScaleTransform") {
                rootX =3D rootTransform.ScaleX;
                rootY =3D rootTransform.ScaleY;
            }
            var s =3D Ee.UI.Xaml.Control._computeScale(fs);
           =20
            var newXScale =3D s.horizontal / rootX;
            var newYScale =3D s.vertical / rootY;
           =20
            Ee.UI.Xaml.Control._ensureScale(fs, newXScale, newYScale);
                       =20
            var fsVideoWindow =3D this._fsVideoWindow.get_control();     =
                  =20
            if (fsVideoWindow)  {
                var minScale =3D Math.min(s.horizontal, s.vertical);
                var scale =3D Math.min(s.horizontal / rootX, s.vertical =
/ rootY);
                var offX =3D =
(fs.getHost().content.ActualWidth-fsVideoWindow.width*minScale)/2;
                var offY =3D =
(fs.getHost().content.ActualHeight-fsVideoWindow.height*minScale)/2;
                if (newXScale>newYScale)
                    Ee.UI.Xaml.Control._ensureMatrix(fsVideoWindow, =
newYScale/newXScale, 1.0, offX/s.horizontal, offY/s.vertical);
                else
                    Ee.UI.Xaml.Control._ensureMatrix(fsVideoWindow, 1.0, =
newXScale/newYScale, offX/s.horizontal, offY/s.vertical);
            }
            fs.Visibility =3D 0;
        }
        else {
            fs.Visibility =3D 1;
        }
    }

    function Ee$UI$Xaml$Media$Player$_getChapterAt(seconds, =
isCurrentTime) {
        var chapters =3D this.get_chapters();
        var chapterIndex =3D -1;
        seconds +=3D 0.001;
        if (chapters) {
            for (var i=3D0, l=3Dchapters.length; i < l; i++) {
                // adjust the time 0.001, because actual chapter time is =
not as accurate as the time you specify.
                // If you specify a chapter to start at 5s, it might =
actually start at 4.999s or 5.001s, for example.
                // In other words you are considered at a chapter if you =
are at least within 0.001 seconds of it.
                var t =3D chapters[i].time - 0.001;
                if (t <=3D seconds) {
                    chapterIndex =3D i;
                }
                else {
                    break;
                }
            }
        }
        // if seconds is the current time index, we store the next =
chapter's start time so the timer
        // knows when to raise the chapter changed event while the video =
is naturally seeking forward.
        // otherwise we'd have to constantly index the chapter =
collection to see if the chapter changed.
        if (isCurrentTime) {
            this._currentChapterTime =3D (chapterIndex >=3D 0) ? =
chapters[chapterIndex].time : -1;
            this._nextChapterTime =3D (chapterIndex < chapters.length-1) =
? chapters[chapterIndex+1].time : -1;
        }
        return chapterIndex;
    }

    function Ee$UI$Xaml$Media$Player$_getMediaFailedError() {
        var displayMessage =3D "Ee.UI.Xaml.Media.MediaFailedException: " =
+
            String.format(Ee.UI.Xaml.Media.Res.mediaFailed, =
this.get_mediaUrl());
        var e =3D Error.create(displayMessage, { name: =
"Ee.UI.Xaml.Media.MediaFailedException", mediaUrl: this.get_mediaUrl() =
});
        e.popStackFrame();
        return e;
    }

    function Ee$UI$Xaml$Media$Player$_loadChapters(chapters) {
        this._ensureChapterArea();
        this._chapterArea.setChapters(chapters);
        this._currentChapter =3D =
this._getChapterAt(this.get_timeIndex(), true);
        this._lastChapterStarted =3D -1;
        this._detectChapterChanged();
    }

    function Ee$UI$Xaml$Media$Player$_loadMediaUrl(url) {   =20
        this._currentChapter =3D -1;
        this._lastChapterStarted =3D -1;
        this._mediaElement.Source =3D url;
    }

    function Ee$UI$Xaml$Media$Player$_loadPlaceholderImage() {
        // show placeholder image over video
        var url =3D this.get_placeholderImage();
        if (url) {
            var img =3D this._imageElement.get_control();
            if (img) {
                img.Source =3D url;
                this._placeholderImageShowing =3D true;
                this._imageElement.setVisible(true);
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$_onCaptionToggle() {
        this._toggledCaptions =3D !this._toggledCaptions;
        this._ensureCaption();
        this._captionButton.set_state(this._toggledCaptions ? 0 : 1);
    }

    function Ee$UI$Xaml$Media$Player$_onFullScreen() {
        var content =3D this.get_element().content;
        content.fullScreen =3D !content.fullScreen;
    }
    function Ee$UI$Xaml$Media$Player$_onFullScreenME() {
        // full screen request came from double clicking the media, =
which caused it to toggle play/pause
        // toggle once again to put back
        this.togglePlayPause();
        this._onFullScreen();
    }
    function Ee$UI$Xaml$Media$Player$_onTimeSliderChanged() {
        this.set_timeIndex(this._dragTime.get_value() * =
this._naturalduration);   =20
    }
    function Ee$UI$Xaml$Media$Player$_onVolumeDown() {
        this.set_volume(Math.max(0, this.get_volume() - 0.02));
    }
    function Ee$UI$Xaml$Media$Player$_onVolumeSliderChanged() {
        this.set_volume(this._dragVolume.get_value());
    }
    function Ee$UI$Xaml$Media$Player$_onVolumeUp() {
        this.set_volume(Math.min(1, this.get_volume() + 0.02));
    }

    function Ee$UI$Xaml$Media$Player$_mediaAvailable(available) {
        // when media is not available (e.g. it is closed or none was =
opened from the start), disable player controls
        if (this._mediaOpened !=3D=3D available) {
            this._mediaOpened =3D available;
            this._playPauseButton.set_enabled(available);
            this._playButton.set_enabled(available);
            this._pauseButton.set_enabled(available);
            this._stopButton.set_enabled(available);
            if (!available) {
                this.set_caption("");
            }
        }
    }

    function Ee$UI$Xaml$Media$Player$_meBufferingProgress() {
        var progress =3D this._mediaElement.bufferingProgress;
        var percent =3D Math.round(progress * 100);
        if (percent >=3D 100) {
            this._enableBuffering(false);
        }
        else {
            this._enableBuffering(true, percent);
        }
    }

    function Ee$UI$Xaml$Media$Player$_meDownloadProgress() {
        // progressive download occuring, means there is no buffering. =
They don't occur at the same time.
        this._enableBuffering(false);
        =
this._downloadProgress.set_value(this._mediaElement.downloadProgress);
    }

    function Ee$UI$Xaml$Media$Player$_meMarkerReached(sender, args) {
        this._raiseMarkerReached(new =
Ee.UI.Xaml.Media.MarkerEventArgs(args.marker));
    }

    function Ee$UI$Xaml$Media$Player$_meMediaEnded() {
        this._mediaEnded =3D true;
        this._raiseEvent("mediaEnded", Sys.EventArgs.Empty);
    }

    function Ee$UI$Xaml$Media$Player$_meMediaFailed() {  =20
        this._naturalduration =3D null;
        this._enableBuffering(false);
        this._mediaAvailable(false);
        this._ensureDuration(false);
        this._ensureSeeking(false);
        this._mediaEnded =3D false;
        // existing captions should be cleared if the media fails to =
open
        this.set_caption("");
       =20
        var handler =3D this.get_events().getHandler('mediaFailed');
        if (handler) {
            handler(this, Sys.EventArgs.Empty);
        }
        else {
            throw this._getMediaFailedError();
        }  =20
    }

    function Ee$UI$Xaml$Media$Player$_meMediaOpened() {
        // note: this event may occur multiple times with a single =
mediaurl, if its an ASX stream with multiple entries.
       =20
        this._mediaEnded =3D false;
        // make sure properties set before hand are now copied in (e.g. =
Volume cant be set until media is loaded)
        this._clearMediaCache();
        // if a placeholder is showing, remove it
        if (this._placeholderImageShowing) {
            this._imageElement.setVisible(false);
            this._placeholderImageShowing =3D false;
        }
        // existing captions should be cleared if a new media file is =
opened
        this.set_caption("");
       =20
        // load markers in the head of the media
        this._markers =3D [];
        var markers =3D this._mediaElement.Markers;
        for (var i =3D 0, l =3D markers.Count; i < l; i++) {
            Array.add(this._markers, markers.getItem(i));
        }

        this._naturalduration =3D =
this._mediaElement.naturalduration.seconds;
        var hasDuration =3D !!this._naturalduration;
        var canSeek =3D hasDuration && this._mediaElement.CanSeek;
        if (canSeek) {
            // if seeking is supported, initialize chapter detection
            this._currentChapter =3D this._getChapterAt(0, true);
            this._lastChapterStarted =3D -1;
            this._detectChapterChanged();
	    }
	    if (hasDuration) {
            // and set the total/current time labels
            =
this._totalTimeText.set_text(this._formatTime(this._naturalduration * =
1000));
            =
this._currentTimeText.set_text(this._formatTime(this.get_timeIndex() * =
1000));
	    }
	   =20
	    // make sure player controls are in the right state
	    this._mediaAvailable(true);
	    this._ensureDuration(hasDuration);
	    this._ensureSeeking(canSeek);

        // hookup timer for monitoring time index (for chapter =
detection, time slider and currenttimetext updates)
        if (!this._timerCookie) {
            this._tickTimerDelegate =3D Function.createDelegate(this, =
this._tickTimer);
            this._timerCookie =3D =
window.setTimeout(this._tickTimerDelegate, 100);
        }
        this._raiseEvent("mediaOpened", Sys.EventArgs.Empty);
    }

    function Ee$UI$Xaml$Media$Player$_meStateChanged() {
        var newState =3D this.get_playState();
        if (newState =3D=3D=3D "Closed") {
            this._enableBuffering(false);
            this._mediaAvailable(false);
            this._ensureSeeking(false);
            this._mediaEnded =3D false;
        }
        else if (newState =3D=3D=3D "Playing" || newState =3D=3D=3D =
"Paused") {
            // playing/paused, make sure buffering area is hidden
            this._enableBuffering(false);
        }
       =20
        var oldState =3D this._oldState || "";
        if (newState !=3D=3D oldState) {
            this._oldState =3D newState;
            this._raisePlayStateChanged(new =
Ee.UI.Xaml.Media.StateChangedEventArgs("playState", oldState, =
newState));
        }
    }

    function =
Ee$UI$Xaml$Media$Player$_raiseChapterStarted(chapterEventArgs) {
        this.onChapterStarted(chapterEventArgs);
        this._raiseEvent("chapterStarted", chapterEventArgs);
        this.raisePropertyChanged("currentChapter");
    }

    function Ee$UI$Xaml$Media$Player$_raiseEvent(name, args) {
        var handler =3D this.get_events().getHandler(name);
        if (handler) {
            handler(this, args);
        }
    }

    function Ee$UI$Xaml$Media$Player$_raiseMarkerReached(args) {
        if (this._toggledCaptions && this.get_enableCaptions()) {
            var marker =3D args.get_marker();
            var type =3D marker.type ? marker.type.toLowerCase() : "";
            if (type =3D=3D=3D "caption") {
                if (!this._enabledCaptionToggleButton) {
                    this._enabledCaptionToggleButton =3D true;
                    this._captionButton.setVisible(true);
                }
                var text =3D marker.text ? marker.text : "";
                if (text.trim().length =3D=3D=3D 0) {
                    text =3D "";
                }
                this.set_caption(text);
                this.raisePropertyChanged("caption");
            }
        }

        this.onMarkerReached(args);
        this._raiseEvent("markerReached", args);
    }

    function Ee$UI$Xaml$Media$Player$_raisePlayStateChanged(args) {
        this._playPauseButton.set_state(args.get_currentState() =
=3D=3D=3D "Playing" ? 1/*pause*/ : 0/*play*/);
       =20
        this.onPlayStateChanged(args);
        this._raiseEvent("stateChanged", args);
        this._raiseEvent("propertyChanged", args);
    }

    function Ee$UI$Xaml$Media$Player$_raiseVolumeChanged(args) {
        this.onVolumeChanged(args);
        this._raiseEvent("volumeChanged", args);
        this.raisePropertyChanged("volume");
    }

    function Ee$UI$Xaml$Media$Player$_skipTime(direction) {
        // skipping always skips by 10% of the total duration
        var delta =3D this._naturalduration / 10;
        // always skip by at least 5 seconds
        delta =3D direction * Math.max(5, delta);
        var newTime =3D delta + this.get_timeIndex();
        this.set_timeIndex(newTime);
    }

    function Ee$UI$Xaml$Media$Player$_tickTimer() {
        this._timerCookie =3D window.setTimeout(this._tickTimerDelegate, =
100);
        var time =3D this.get_timeIndex();
        if (this._hasDuration) {
            if (!this._dragTime._isDragging) {
                this._dragTime.set_value(time / this._naturalduration);
                this._updateTime(time);
            }
        }
        if (this._canSeek) {
            this._detectChapterChanged(time);
        }
    }

    function Ee$UI$Xaml$Media$Player$_updateTime(time) {
        this._currentTimeText.set_text(this._formatTime(time * 1000));
    }
Ee.UI.Xaml.Media.Player.prototype =3D {
    _mediaEnded: false,
    _naturalduration: null,
    _domElements: null,
    _timerCookie: null,
    _mediaOpened: true,
    _enabledCaptionToggleButton: false,
    _autoPlay: null,
    _canSeek: true,
    _hasDuration: true,
    _caption: null,
    _chapters: null,
    _currentChapter: -1,
    _lastChapterStarted: -1,
    _nextChapterTime: -1,
    _currentChapterTime: -1,
    _enableCaptions: true,
    _toggledCaptions: true,
    _mediaMarkers: null,
    _mediaUrl: null,
    _muted: null,
    _placeholderImage: null,
    _imageElement: null,
    _volume: null,
    _chaptersActive: false,
    _bufferingProgressVisible: false,
    // controls
    _bufferingProgress: null,
    _bufferingStoryboard: null,
    _bufferingText: null,
    _captionButton: null,
    _captionArea: null,
    _captionAreaFS: null,
    _chapterArea: null,
    _currentTimeText: null,
    _downloadProgress: null,
    _dragTime: null,
    _dragVolume: null,
    _mediaElement: null,
    _muteButton: null,
    _nextButton: null,
    _playPauseButton: null,
    _playButton: null,
    _pauseButton: null,
    _stopButton: null,
    _previousButton: null,
    _totalTimeText: null,
   =20
    add_chapterStarted: Ee$UI$Xaml$Media$Player$add_chapterStarted,
    remove_chapterStarted: =
Ee$UI$Xaml$Media$Player$remove_chapterStarted,

    add_markerReached: Ee$UI$Xaml$Media$Player$add_markerReached,
    remove_markerReached: Ee$UI$Xaml$Media$Player$remove_markerReached,

    add_mediaEnded: Ee$UI$Xaml$Media$Player$add_mediaEnded,
    remove_mediaEnded: Ee$UI$Xaml$Media$Player$remove_mediaEnded,

    add_mediaFailed: Ee$UI$Xaml$Media$Player$add_mediaFailed,
    remove_mediaFailed: Ee$UI$Xaml$Media$Player$remove_mediaFailed,

    add_mediaOpened: Ee$UI$Xaml$Media$Player$add_mediaOpened,
    remove_mediaOpened: Ee$UI$Xaml$Media$Player$remove_mediaOpened,

    add_stateChanged: Ee$UI$Xaml$Media$Player$add_stateChanged,
    remove_stateChanged: Ee$UI$Xaml$Media$Player$remove_stateChanged,

    add_volumeChanged: Ee$UI$Xaml$Media$Player$add_volumeChanged,
    remove_volumeChanged: Ee$UI$Xaml$Media$Player$remove_volumeChanged,

    get_autoPlay: Ee$UI$Xaml$Media$Player$get_autoPlay,
    set_autoPlay: Ee$UI$Xaml$Media$Player$set_autoPlay,

    get_caption: Ee$UI$Xaml$Media$Player$get_caption,
    set_caption: Ee$UI$Xaml$Media$Player$set_caption,

    get_chapters: Ee$UI$Xaml$Media$Player$get_chapters,
    set_chapters: Ee$UI$Xaml$Media$Player$set_chapters,

    get_currentChapter: Ee$UI$Xaml$Media$Player$get_currentChapter,
    set_currentChapter: Ee$UI$Xaml$Media$Player$set_currentChapter,

    get_enableCaptions: Ee$UI$Xaml$Media$Player$get_enableCaptions,
    set_enableCaptions: Ee$UI$Xaml$Media$Player$set_enableCaptions,
   =20
    get_mediaMarkers: Ee$UI$Xaml$Media$Player$get_mediaMarkers,
   =20
    get_mediaElement: Ee$UI$Xaml$Media$Player$get_mediaElement,

    get_mediaUrl: Ee$UI$Xaml$Media$Player$get_mediaUrl,
    set_mediaUrl: Ee$UI$Xaml$Media$Player$set_mediaUrl,

    get_muted: Ee$UI$Xaml$Media$Player$get_muted,
    set_muted: Ee$UI$Xaml$Media$Player$set_muted,

    get_placeholderImage: Ee$UI$Xaml$Media$Player$get_placeholderImage,
    set_placeholderImage: Ee$UI$Xaml$Media$Player$set_placeholderImage,

    get_playState: Ee$UI$Xaml$Media$Player$get_playState,

    get_timeIndex: Ee$UI$Xaml$Media$Player$get_timeIndex,
    set_timeIndex: Ee$UI$Xaml$Media$Player$set_timeIndex,
   =20
    get_volume: Ee$UI$Xaml$Media$Player$get_volume,
    set_volume: Ee$UI$Xaml$Media$Player$set_volume,

    nextChapter: Ee$UI$Xaml$Media$Player$nextChapter,

    onChapterStarted: Ee$UI$Xaml$Media$Player$onChapterStarted,

    onMarkerReached: Ee$UI$Xaml$Media$Player$onMarkerReached,

    onPlayStateChanged: Ee$UI$Xaml$Media$Player$onPlayStateChanged,

    onVolumeChanged: Ee$UI$Xaml$Media$Player$onVolumeChanged,

    pause: Ee$UI$Xaml$Media$Player$pause,

    play: Ee$UI$Xaml$Media$Player$play,

    previousChapter: Ee$UI$Xaml$Media$Player$previousChapter,
   =20
    stop: Ee$UI$Xaml$Media$Player$stop,

    toggleMuted: Ee$UI$Xaml$Media$Player$toggleMuted,

    togglePlayPause: Ee$UI$Xaml$Media$Player$togglePlayPause,
   =20
    xamlDispose: Ee$UI$Xaml$Media$Player$xamlDispose,  =20

    xamlInitialize: Ee$UI$Xaml$Media$Player$xamlInitialize,

    _bindChildControls: Ee$UI$Xaml$Media$Player$_bindChildControls,
   =20
    _chapterNext: Ee$UI$Xaml$Media$Player$_chapterNext,
       =20
    _chapterPrevious: Ee$UI$Xaml$Media$Player$_chapterPrevious,
   =20
    _clearMediaCache: Ee$UI$Xaml$Media$Player$_clearMediaCache,
   =20
    _detectChapterChanged: =
Ee$UI$Xaml$Media$Player$_detectChapterChanged,

    _enableBuffering: Ee$UI$Xaml$Media$Player$_enableBuffering,
   =20
    _ensureCaption: Ee$UI$Xaml$Media$Player$_ensureCaption,

    _ensureChapterArea: Ee$UI$Xaml$Media$Player$_ensureChapterArea,
   =20
    _ensureSeeking: Ee$UI$Xaml$Media$Player$_ensureSeeking,
   =20
    _ensureDuration: Ee$UI$Xaml$Media$Player$_ensureDuration,

    _formatTime: Ee$UI$Xaml$Media$Player$_formatTime,

    _fullScreenChanged: Ee$UI$Xaml$Media$Player$_fullScreenChanged,
   =20
    _getChapterAt: Ee$UI$Xaml$Media$Player$_getChapterAt,
   =20
    _getMediaFailedError: Ee$UI$Xaml$Media$Player$_getMediaFailedError,

    _loadChapters: Ee$UI$Xaml$Media$Player$_loadChapters,

    _loadMediaUrl: Ee$UI$Xaml$Media$Player$_loadMediaUrl,   =20
   =20
    _loadPlaceholderImage: =
Ee$UI$Xaml$Media$Player$_loadPlaceholderImage,
   =20
    _onCaptionToggle: Ee$UI$Xaml$Media$Player$_onCaptionToggle,

    _onFullScreen: Ee$UI$Xaml$Media$Player$_onFullScreen,
    _onFullScreenME: Ee$UI$Xaml$Media$Player$_onFullScreenME,
    _onTimeSliderChanged: Ee$UI$Xaml$Media$Player$_onTimeSliderChanged,
    _onVolumeDown: Ee$UI$Xaml$Media$Player$_onVolumeDown,
    _onVolumeSliderChanged: =
Ee$UI$Xaml$Media$Player$_onVolumeSliderChanged,
    _onVolumeUp: Ee$UI$Xaml$Media$Player$_onVolumeUp,
   =20
    _mediaAvailable: Ee$UI$Xaml$Media$Player$_mediaAvailable,

    _meBufferingProgress: Ee$UI$Xaml$Media$Player$_meBufferingProgress,
   =20
    _meDownloadProgress: Ee$UI$Xaml$Media$Player$_meDownloadProgress,

    _meMarkerReached: Ee$UI$Xaml$Media$Player$_meMarkerReached,
   =20
    _meMediaEnded: Ee$UI$Xaml$Media$Player$_meMediaEnded,

    _meMediaFailed: Ee$UI$Xaml$Media$Player$_meMediaFailed,

    _meMediaOpened: Ee$UI$Xaml$Media$Player$_meMediaOpened,
   =20
    _meStateChanged: Ee$UI$Xaml$Media$Player$_meStateChanged,
   =20
    _raiseChapterStarted: Ee$UI$Xaml$Media$Player$_raiseChapterStarted,
   =20
    _raiseEvent: Ee$UI$Xaml$Media$Player$_raiseEvent,
   =20
    _raiseMarkerReached: Ee$UI$Xaml$Media$Player$_raiseMarkerReached,
   =20
    _raisePlayStateChanged: =
Ee$UI$Xaml$Media$Player$_raisePlayStateChanged,   =20
   =20
    _raiseVolumeChanged: Ee$UI$Xaml$Media$Player$_raiseVolumeChanged,
   =20
    _skipTime: Ee$UI$Xaml$Media$Player$_skipTime,
   =20
    _tickTimer: Ee$UI$Xaml$Media$Player$_tickTimer,
   =20
    _updateTime: Ee$UI$Xaml$Media$Player$_updateTime
}
Ee.UI.Xaml.Media.Player._defaultVolume =3D 0.5;
Ee.UI.Xaml.Media.Player.registerClass('Ee.UI.Xaml.Media.Player', =
Ee.UI.Xaml.Control);

Ee.UI.Xaml.Media.StateChangedEventArgs =3D function =
Ee$UI$Xaml$Media$StateChangedEventArgs(propertyName, previousState, =
currentState) {
    /// <param name=3D"propertyName" type=3D"String"></param>
    /// <param name=3D"previousState"></param>
    /// <param name=3D"currentState"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "propertyName", type: String},
        {name: "previousState"},
        {name: "currentState"}
    ]);
    if (e) throw e;

    this._currentState =3D currentState;
    this._previousState =3D previousState;
    Ee.UI.Xaml.Media.StateChangedEventArgs.initializeBase(this, =
[propertyName]);
}

    function Ee$UI$Xaml$Media$StateChangedEventArgs$get_currentState() {
        /// <value></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._currentState || null;
    }
    function Ee$UI$Xaml$Media$StateChangedEventArgs$get_previousState() =
{
        /// <value></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._previousState || null;
    }
Ee.UI.Xaml.Media.StateChangedEventArgs.prototype =3D {
    get_currentState: =
Ee$UI$Xaml$Media$StateChangedEventArgs$get_currentState,
    get_previousState: =
Ee$UI$Xaml$Media$StateChangedEventArgs$get_previousState
}
Ee.UI.Xaml.Media.StateChangedEventArgs.registerClass("Ee.UI.Xaml.Media.St=
ateChangedEventArgs", Sys.PropertyChangedEventArgs);
Ee.UI.Xaml.Media.ChapterEventArgs =3D function =
Ee$UI$Xaml$Media$ChapterEventArgs(chapterIndex) {
    /// <param name=3D"chapterIndex" type=3D"Number"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "chapterIndex", type: Number}
    ]);
    if (e) throw e;

    this._chapterIndex =3D chapterIndex;
    Ee.UI.Xaml.Media.ChapterEventArgs.initializeBase(this);
}

    function Ee$UI$Xaml$Media$ChapterEventArgs$get_chapterIndex() {
        /// <value type=3D"Number"></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._chapterIndex;
    }
Ee.UI.Xaml.Media.ChapterEventArgs.prototype =3D {
    get_chapterIndex: Ee$UI$Xaml$Media$ChapterEventArgs$get_chapterIndex
}
Ee.UI.Xaml.Media.ChapterEventArgs.registerClass("Ee.UI.Xaml.Media.Chapter=
EventArgs", Sys.EventArgs);
Ee.UI.Xaml.Media.MarkerEventArgs =3D function =
Ee$UI$Xaml$Media$MarkerEventArgs(marker) {
    /// <param name=3D"marker"></param>
    var e =3D Function._validateParams(arguments, [
        {name: "marker"}
    ]);
    if (e) throw e;

    this._marker =3D marker;
    Ee.UI.Xaml.Media.MarkerEventArgs.initializeBase(this);
}

    function Ee$UI$Xaml$Media$MarkerEventArgs$get_marker() {
        /// <value></value>
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._marker || null;
    }
Ee.UI.Xaml.Media.MarkerEventArgs.prototype =3D {
    get_marker: Ee$UI$Xaml$Media$MarkerEventArgs$get_marker
}
Ee.UI.Xaml.Media.MarkerEventArgs.registerClass("Ee.UI.Xaml.Media.MarkerEv=
entArgs", Sys.EventArgs);

Ee.UI.Xaml.Media._TextBlock =3D function =
Ee$UI$Xaml$Media$_TextBlock(host, textBlockElementName, =
backgroundElementName) {
    // <param name=3D"host">Silverlight host</param>
    // <param name=3D"textBlockElementName" type=3D"String">Name of XAML =
TextBlock</param>
    // <param name=3D"backgroundElementName" type=3D"String" =
optional=3D"true" mayBeNull=3D"true">Name of XAML element that will =
serve as a background for the text block, if any</param>
    Ee.UI.Xaml.Media._TextBlock.initializeBase(this, [host, =
textBlockElementName]);
    var control =3D this.get_control();
    if (control && backgroundElementName) {
        var bg =3D control.findName(backgroundElementName);
        if (bg) {
            this._centerX =3D bg["Canvas.Left"] + bg.width / 2;
            this._bottomY =3D bg["Canvas.Top"] + bg.height;
            this._background =3D bg;
        }
    }

    if (control && !this._background && textBlockElementName) {
        var bg =3D control.findName(textBlockElementName);
        if (bg) {
            this._centerX =3D bg["Canvas.Left"] + bg.ActualWidth / 2;
            this._bottomY =3D bg["Canvas.Top"] + bg.ActualHeight;
            this._background =3D bg;
        }
    }

}





    function Ee$UI$Xaml$Media$_TextBlock$get_backgroundControl() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value mayBeNull=3D"true">The Silverlight control that acts =
as the background for the text block.</value>
        return this._background || null;
    }

    function Ee$UI$Xaml$Media$_TextBlock$get_text() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value type=3D"String" mayBeNull=3D"true"></value>
        var control =3D this.get_control();
        return control ? (control.Text || "") : "";
    }
    function Ee$UI$Xaml$Media$_TextBlock$set_text(value) {
        var control =3D this.get_control();
        if (control) {
            control.Text =3D value || "";
            this.setVisible(!!value);
            var bg =3D this.get_backgroundControl();
            if (bg) {
                var x =3D control.ActualWidth;
                var y =3D control.ActualHeight;
                bg["Canvas.Left"] =3D this._centerX - x / 2;
                bg["Canvas.Top"] =3D this._bottomY - y;
                bg.width =3D x;
                bg.height =3D y;
            }
        }
    }

    function Ee$UI$Xaml$Media$_TextBlock$dispose() {
        Ee.UI.Xaml.Media._TextBlock.callBaseMethod(this, "dispose");
        this._background =3D null;
    }

    function Ee$UI$Xaml$Media$_TextBlock$setVisible(value) {
        Ee.UI.Xaml.Media._TextBlock.callBaseMethod(this, "setVisible", =
[value]);
        var c =3D this.get_backgroundControl();
        if (c) c.visibility =3D value ? 0 : 1;       =20
    }
Ee.UI.Xaml.Media._TextBlock.prototype =3D {
    _centerX: 0,
    _bottomY: 0,
    _background: null,
   =20
    get_backgroundControl: =
Ee$UI$Xaml$Media$_TextBlock$get_backgroundControl,
   =20
    get_text: Ee$UI$Xaml$Media$_TextBlock$get_text,
    set_text: Ee$UI$Xaml$Media$_TextBlock$set_text,

    dispose: Ee$UI$Xaml$Media$_TextBlock$dispose,
   =20
    setVisible: Ee$UI$Xaml$Media$_TextBlock$setVisible
}
Ee.UI.Xaml.Media._TextBlock.registerClass('Ee.UI.Xaml.Media._TextBlock', =
Ee.UI.Xaml.Media._DomElement);
Ee.UI.Xaml.Media._MultiStateButton =3D function =
Ee$UI$Xaml$Media$_MultiStateButton(host, nameElement, =
autorepeatInterval, clickHandler, doubleClickHandler, handlerOwner, =
stateList) {
    Ee.UI.Xaml.Media._MultiStateButton.initializeBase(this, [host, =
nameElement, autorepeatInterval, clickHandler, doubleClickHandler, =
handlerOwner]);
    // animations for state changes
    var stateCount =3D arguments.length-6;
   =20
   =20
    this._animationsOn =3D new Array(stateCount);
    this._animationsOff =3D new Array(stateCount);
    this._controls =3D new Array(stateCount);

    var control =3D this.get_control();
    for (var i =3D 0; i < stateCount; i++) {
        var nameControl =3D arguments[i + 6];
        var ctl =3D control ? control.findName(nameControl) : null;
        // check for (control)_Show and (control)_Hide
        this._controls[i] =3D ctl || null;
        this._animationsOn[i] =3D ctl ? ctl.findName(nameControl + =
"_Show") : null;
        this._animationsOff[i] =3D ctl ? ctl.findName(nameControl + =
"_Hide") : null;
    }
}






    function Ee$UI$Xaml$Media$_MultiStateButton$get_state() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value type=3D"Number" integer=3D"true">current button =
state</value>
        return this._state;
    }
    function Ee$UI$Xaml$Media$_MultiStateButton$set_state(value) {
       =20
        if (value !=3D=3D this._state) {
            var a =3D this._animationsOff[this._state];
            if (a) {
                a.begin();
            }
            else {
                var cOff =3D this._controls[this._state];
                if (cOff) cOff.visibility =3D 1;
            }
            this._state =3D value;
            a =3D this._animationsOn[this._state];
            if (a) {
                a.begin();
            }
            else {
                var cOn =3D this._controls[this._state];
                if (cOn) cOn.visibility =3D 0;
            }
        }
    }

    function Ee$UI$Xaml$Media$_MultiStateButton$dispose() {
        Ee.UI.Xaml.Media._MultiStateButton.callBaseMethod(this, =
"dispose");
        this._animationsOn =3D null;
        this._animationsOff =3D null;
        this._controls =3D null;
        this._state =3D 0;
    }
Ee.UI.Xaml.Media._MultiStateButton.prototype =3D {
    _state: 0,
    _animationsOn: null,
    _animationsOff: null,
    _controls: null,
   =20
    get_state: Ee$UI$Xaml$Media$_MultiStateButton$get_state,
    set_state: Ee$UI$Xaml$Media$_MultiStateButton$set_state,
   =20
    dispose: Ee$UI$Xaml$Media$_MultiStateButton$dispose
}
Ee.UI.Xaml.Media._MultiStateButton.registerClass('Ee.UI.Xaml.Media._Multi=
StateButton', Ee.UI.Xaml.Media._Button);

Ee.UI.Xaml.Media._ImageList =3D function =
Ee$UI$Xaml$Media$_ImageList(host, imageListName) {
    // Implements the script required to drive a horizontal ImageList.
    // The ImageList is xaml that contains the following structure:
    // TODO: explaination
    Ee.UI.Xaml.Media._ImageList.initializeBase(this, [host, =
imageListName]);
    var control =3D this.get_control();
    if (!control) return;
    control.cursor =3D "Arrow";

    this._scrollAnimationSB =3D control.findName(imageListName + =
"_ScrollAnimationStoryboard");
    if (this._scrollAnimationSB) this._scrollAnimation =3D =
control.findName(imageListName + "_ScrollAnimation");
   =20
    var interval =3D this._scrollAnimation ? =
(this._scrollAnimation.duration.seconds*1000) : 200;
    interval =3D Math.max(interval, 200);
    this._scrollNext =3D new Ee.UI.Xaml.Media._Button(host, =
imageListName + "_ScrollNext", interval, this._scrollNextClick, null, =
this);
	this._scrollPrev =3D new Ee.UI.Xaml.Media._Button(host, imageListName + =
"_ScrollPrevious", interval, this._scrollPrevClick, null, this);
=09
	this._findItems(imageListName);
	this._virtualItems =3D [];
}











    function Ee$UI$Xaml$Media$_ImageList$get_items() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return this._virtualItems;
    }
    function Ee$UI$Xaml$Media$_ImageList$set_items(value) {
        this._virtualItems =3D Array.clone(value);
        this._reset();
        this._assignImages();
    }

    function Ee$UI$Xaml$Media$_ImageList$onItemClick(virtualIndex) {
    }

    function Ee$UI$Xaml$Media$_ImageList$_assignImages() {
        for (var i =3D 0, l =3D this._items.length; i < l; i++) {
            var item =3D this._items[i];
            var offset =3D this._itemOffset + i;
            if (offset < this._virtualItems.length) {
                item.image.Source =3D this._virtualItems[offset];
                item.button.get_control().visibility =3D 0; // visible
                item.button._virtualIndex =3D offset;
            }
            else {
                item.button.get_control().visibility =3D 1; // collapsed
            }
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$_findItems(baseName) {
        var control =3D this.get_control();
        var i =3D 1;
        this._items =3D [];
        var itemName =3D baseName + "_ScrollItem1",
            imageName =3D baseName + "_ScrollItem1_Image",
            item =3D control.findName(itemName),
            image =3D control.findName(imageName);

        while(item) {
            var btn =3D new Ee.UI.Xaml.Media._Button(
                        control.getHost(), itemName, null,
                        this._itemClick, null, this, =
/*requiresSender*/true);
            btn._physicalIndex =3D i-1;
            this._items[this._items.length] =3D { button: btn, image: =
image };
            i++;
            itemName =3D baseName + "_ScrollItem" + i;
            imageName =3D baseName + "_ScrollItem" + i + "_Image";
            item =3D control.findName(itemName);
            image =3D control.findName(imageName);
        }

        if (this._items.length =3D=3D=3D 0) {
            throw Error.invalidOperation("ImageList needs at least one =
scroll item.");
        }

        var firstItem =3D this._items[0].button.get_control();
        this._itemSize =3D firstItem.width;
        //this._itemSpacing =3D (firstItem["Canvas.Left"] - =
firstItem.getParent()["Canvas.Left"]) * 2;
        this._itemSpacing =3D firstItem["Canvas.Left"] * 2;
    }

    function Ee$UI$Xaml$Media$_ImageList$_handleOverflow(direction) {
        // ensures the overflow item is in the right position
       =20
        // determine virtual index of the overflow item
        var layoutIndex =3D direction =3D=3D=3D 1 ? =
(this._items.length-1) : -1;
        var virtualIndex =3D this._itemOffset + layoutIndex;
       =20
        // assign virtual item data to the overflow item
        var overflowItem =3D this._items[this._overflowIndex];
        overflowItem.image.Source =3D this._virtualItems[virtualIndex];
        overflowItem.button._virtualIndex =3D virtualIndex;
       =20
        // position the overflow item
        var button =3D overflowItem.button.get_control();
        button["Canvas.Left"] =3D virtualIndex * (this._itemSize + =
this._itemSpacing) + (this._itemSpacing / 2);
       =20
        // overflow item is no longer an overflow item, advance the =
index
        this._overflowIndex +=3D direction;
        if (this._overflowIndex < 0) {
            this._overflowIndex =3D this._items.length - 1;
        }
        else if (this._overflowIndex >=3D this._items.length) {
            this._overflowIndex =3D 0;
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$_itemClick(sender) {
        // sender given because Button was instantiated with =
requiresSender=3Dtrue
        this.onItemClick(sender._virtualIndex);
    }

    function Ee$UI$Xaml$Media$_ImageList$_reset() {
	    this._itemOffset =3D 0;
	    for (var i =3D 0, l =3D this._items.length; i < l; i++) {
	        var button =3D this._items[i].button;
	        button._virtualIndex =3D i;
    	    button.get_control()["Canvas.Left"] =3D i * (this._itemSize + =
this._itemSpacing) + (this._itemSpacing/2);
	    }
	    this._overflowIndex =3D this._items.length - 1;
	    // ensure scrolled to the beginning
        if (this._scrollAnimation) {
            this._scrollAnimation.To =3D "0";
            this._scrollAnimationSB.begin();
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$_scroll(direction) {
        if (this._scrollAnimation) {
            this._handleOverflow(direction);

            var fromOffset =3D this._itemOffset;
            this._itemOffset +=3D direction;

            this._scrollAnimation.From =3D "-" + (fromOffset * =
(this._itemSize + this._itemSpacing));
            this._scrollAnimation.To =3D "-" + (this._itemOffset * =
(this._itemSize + this._itemSpacing));
            this._scrollAnimationSB.begin();
        }
        else {
            this._itemOffset +=3D direction;
            this._assignImages();           =20
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$_scrollNextClick() {
        if (this._itemOffset < (this._virtualItems.length - =
this._items.length + 1)) {
            this._scroll(1);
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$_scrollPrevClick() {
        if (this._itemOffset > 0) {
            this._scroll(-1);
        }
    }

    function Ee$UI$Xaml$Media$_ImageList$dispose() {
        if (this._scrollNext) this._scrollNext.dispose();
        if (this._scrollPrev) this._scrollPrev.dispose();
        this._scrollNext =3D null;
        this._scrollPrev =3D null;

        if (this._items) {
            for (var i =3D 0, l =3D this._items.length; i < l; i++) {
                var button =3D this._items[i].button;
                button.dispose();
            }
            this._items =3D null;
        }    =20
        this._virtualItems =3D null;
        this._itemSize =3D null;
        this._itemSpacing =3D null;
        this._scrollAnimation =3D null;
        this._scrollAnimationSB =3D null;
        Ee.UI.Xaml.Media._ImageList.callBaseMethod(this, "dispose");
    }
Ee.UI.Xaml.Media._ImageList.prototype =3D {
    _items: null,
    _virtualItems: null,
    _scrollNext: null,
    _scrollPrev: null,
    _scrollAnimation: null,
    _scrollAnimationSB: null,
    _itemSize: 0,
    _itemSpacing: 0,
    _overflowIndex: 0,
   =20
    get_items: Ee$UI$Xaml$Media$_ImageList$get_items,
    set_items: Ee$UI$Xaml$Media$_ImageList$set_items,
   =20
    onItemClick: Ee$UI$Xaml$Media$_ImageList$onItemClick,   =20
   =20
    _assignImages: Ee$UI$Xaml$Media$_ImageList$_assignImages,
   =20
    _findItems: Ee$UI$Xaml$Media$_ImageList$_findItems,
   =20
    _handleOverflow: Ee$UI$Xaml$Media$_ImageList$_handleOverflow,
   =20
    _itemClick: Ee$UI$Xaml$Media$_ImageList$_itemClick,
   =20
    _reset: Ee$UI$Xaml$Media$_ImageList$_reset,
   =20
    _scroll: Ee$UI$Xaml$Media$_ImageList$_scroll,
   =20
    _scrollNextClick: Ee$UI$Xaml$Media$_ImageList$_scrollNextClick,
   =20
    _scrollPrevClick: Ee$UI$Xaml$Media$_ImageList$_scrollPrevClick,

    dispose: Ee$UI$Xaml$Media$_ImageList$dispose
}
Ee.UI.Xaml.Media._ImageList.registerClass('Ee.UI.Xaml.Media._ImageList', =
Ee.UI.Xaml.Media._DomElement);
Ee.UI.Xaml.Media._ChapterArea =3D function =
Ee$UI$Xaml$Media$_ChapterArea(player) {
    this._player =3D player;
    var names =3D Ee.UI.Xaml.Media.PlayerElementName;
    Ee.UI.Xaml.Media._ChapterArea.initializeBase(this, =
[player.get_element(), names.chapterArea]);
    var control =3D this.get_control();
    if (control) {
        this._toggleButton =3D new =
Ee.UI.Xaml.Media._Button(player.get_element(), =
names.chapterToggleButton, null, this._onToggle, null, this);
    }
}





    function Ee$UI$Xaml$Media$_ChapterArea$activate() {
        // activate means there are chapters to be shown, so the chapter =
area should be 'activated', but not necessarily visible.
        // for example, a chapter area that is only visible when the =
mouse is over it. It should be active in that it shows when you
        // hover over it, but not always visible. We use visibility to =
activate/deactivate, the skin defines its own _Hide and _Show
        // animation which we control via the toggle button (or they =
could define a MouseEnter MouseLeave for simply reveal opacity).
        // If there are no chapters for the media, the chapter area is =
deactivated (e.g. so no hover occurs) and the toggle button is
        // hidden (if it exists).
        var c =3D this.get_control();
        if (!c) return;
        c.visibility =3D 0;
        this._toggleButton.setVisible(true);
    }

    function Ee$UI$Xaml$Media$_ChapterArea$deactivate() {
        var c =3D this.get_control();
        if (!c) return;
        c.visibility =3D 1;
        this._toggleButton.setVisible(false);
    }

    function Ee$UI$Xaml$Media$_ChapterArea$dispose() {
        Ee.UI.Xaml.Media._ChapterArea.callBaseMethod(this, "dispose");
        this._player =3D null;
        if (this._toggleButton) this._toggleButton.dispose();
        this._toggleButton =3D null;
    }

    function Ee$UI$Xaml$Media$_ChapterArea$onItemClick(index) {
        this._player.set_currentChapter(this._imageChapters[index]);
    }

    function Ee$UI$Xaml$Media$_ChapterArea$setChapters(chapters) {
        // <param name=3D"chapters" type=3D"Array" mayBeNull=3D"true" =
elementMayBeNull=3D"true">Array of chapters.</param>
        if (!this.get_control()) return;
        var imageArray =3D [];
        // only care about chapters that have images with them
        if (chapters) {
            this._imageChapters =3D [];
            for (var i =3D 0, l =3D chapters.length; i < l; i++) {
                var chapter =3D chapters[i];
                if (chapter.imageUrl) {
                    this._imageChapters[this._imageChapters.length] =3D =
i;
                    imageArray[imageArray.length] =3D chapter.imageUrl;
                }
            }
        }
        this.set_items(imageArray);
    }

    function Ee$UI$Xaml$Media$_ChapterArea$_onToggle() {
        this._visible =3D !this._visible;
        this.setVisible(this._visible);
        var c =3D this.get_control();
        // make sure the chapter area isn't hit testable when its =
supposed to be hidden
        if (c) c.IsHitTestVisible =3D this._visible;
    }
Ee.UI.Xaml.Media._ChapterArea.prototype =3D {
    _player: null,
    _visible: false,
    _toggleButton: null,
   =20
    activate: Ee$UI$Xaml$Media$_ChapterArea$activate,
   =20
    deactivate: Ee$UI$Xaml$Media$_ChapterArea$deactivate,
   =20
    dispose: Ee$UI$Xaml$Media$_ChapterArea$dispose,

    onItemClick: Ee$UI$Xaml$Media$_ChapterArea$onItemClick,
   =20
    setChapters: Ee$UI$Xaml$Media$_ChapterArea$setChapters,
   =20
    _onToggle: Ee$UI$Xaml$Media$_ChapterArea$_onToggle
}
Ee.UI.Xaml.Media._ChapterArea.registerClass('Ee.UI.Xaml.Media._ChapterAre=
a', Ee.UI.Xaml.Media._ImageList);

Ee.UI.Xaml.Media._Slider =3D function Ee$UI$Xaml$Media$_Slider(host, =
nameThumb, nameSlider, valueChangedHandler, handlerOwner) {
    // assumption: the thumb and slider canvases are siblings.
    Ee.UI.Xaml.Media._Slider.initializeBase(this, [host, nameSlider]);
   =20
    this._slider =3D this.get_control();
    this._thumb =3D new Ee.UI.Xaml.Media._DomElement(host, nameThumb);
    this._thumbControl =3D this._thumb.get_control();

    if (!this._thumbControl || !this._slider) {
        return;
    }
    this._highlight =3D new Ee.UI.Xaml.Media._DomElement(host, =
nameSlider + "_Highlight");
    this._highlightControl =3D this._highlight.get_control();
   =20
    this._slider.cursor =3D "Hand";
    this._thumbControl.cursor =3D "Hand";

    this._thumb.bindEvent("mouseLeftButtonDown", null, =
this._thumbMouseLeftButtonDown, this);
    this._thumb.bindEvent("mouseLeftButtonUp", null, =
this._thumbMouseLeftButtonUp, this);
    this._thumb.bindEvent("mouseMove", null, this._thumbMouseMove, =
this);
    this.bindEvent("mouseLeftButtonDown", null, =
this._sliderLeftButtonDown, this);
   =20
    // get to the root canvas and listen to its mouseLeave, so that we =
can ensure we know when
    // we loose mouse capture when the mouse leaves the silverlight host
    this._rootToken =3D =
this._slider.getHost().content.root.addEventListener("mouseLeave", =
Function.createDelegate(this, this._cancelDragging));

    this._isHorizontal =3D (this._slider.width >=3D =
this._slider.height);

    if (this._highlightControl) {
        this._highlightControl[this._isHorizontal ? "width" : "height"] =
=3D 0;
    }

    if (handlerOwner) {
        this._changedHandler =3D Function.createDelegate(handlerOwner, =
valueChangedHandler);
    }
}











    function Ee$UI$Xaml$Media$_Slider$set_enabled(value) {
        if (this.get_enabled() !=3D=3D value) {
            Ee.UI.Xaml.Media._Slider.callBaseMethod(this, "set_enabled", =
[value]);
            // highlight bar should not respond when time is not shown
            this._highlight.set_enabled(value);
            // thumb should fade away when time disabled
            this._thumb.setVisible(value);
            // thumb should not have hand cursor when disabled
            if (this._thumbControl) this._thumbControl.cursor =3D value =
? "Hand" : "Default";
            // slider's position should be 0 when disabled
            if (!value) this.set_value(0);
            // slider should not have hand cursor when disabled
            if (this._slider) this._slider.cursor =3D value ? "Hand" : =
"Default";
        }       =20
    }

    function Ee$UI$Xaml$Media$_Slider$get_enableSeeking() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        return !!this._enableSeeking;
    }
    function Ee$UI$Xaml$Media$_Slider$set_enableSeeking(value) {
        if (this._enableSeeking !=3D=3D value) {
            this._enableSeeking =3D value;
            if (!value) this._cancelDragging();
        }
    }

    function Ee$UI$Xaml$Media$_Slider$get_value() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value type=3D"Number">A number between 0 and 1 representing =
the current position of the slider's thumb.</value>
        if (!this._thumbControl || !this._slider) return 0;

        var val;
        if (this._isHorizontal) {
            //val =3D this._thumbControl["Canvas.Left"] - =
this._slider["Canvas.Left"] + (this._thumbControl.width/2);
            val =3D this._thumbControl["Canvas.Left"] - =
this._slider["Canvas.Left"];
            val =3D val / (this._slider.width - =
this._thumbControl.width);
        }
        else {
            val =3D this._thumbControl["Canvas.Top"] - =
this._slider["Canvas.Top"] + (this._thumbControl.height/2);
            val =3D 1 - (val / this._slider.height);
        }
        // make value accurate to 0.001
        val =3D Math.round(val*1000)/1000;
        return Math.min(1, Math.max(0, val));
    }
    function Ee$UI$Xaml$Media$_Slider$set_value(value) {
        value =3D Math.min(1, Math.max(0, value));
        this._setThumbPosition(value);
    }

    function Ee$UI$Xaml$Media$_Slider$dispose() {
        if (this._highlight) this._highlight.dispose();
        if (this._thumb) this._thumb.dispose();
        this._changedHandler =3D null;
        if (this._rootToken) =
this._slider.getHost().content.root.removeEventListener("mouseLeave", =
this._rootToken);
        this._slider =3D null;
        this._thumb =3D null;
        this._thumbControl =3D null;
        this._rootToken =3D null;
        this._highlight =3D null;
        this._highlightControl =3D null;
        Ee.UI.Xaml.Media._Slider.callBaseMethod(this, 'dispose');        =
       =20
    }

    function Ee$UI$Xaml$Media$_Slider$_cancelDragging() {
        if (this._isDragging) {
            this._isDragging =3D false;
            this._thumbControl.ReleaseMouseCapture();
        }
    }

    function Ee$UI$Xaml$Media$_Slider$_setThumbPosition(value) {
        if (this._thumbControl && this._slider) {
            var loc =3D this._toLocation(value);
            if (this._isHorizontal) {
                this._thumbControl["Canvas.Left"] =3D =
this._slider["Canvas.Left"] + loc - (this._thumbControl.width/2);
                if (this._highlightControl) this._highlightControl.width =
=3D loc + (this._thumbControl.width/2);
            }
            else {
                this._thumbControl["Canvas.Top"] =3D =
this._slider["Canvas.Top"] + loc - (this._thumbControl.height/2);
                if (this._highlightControl) {
                    this._highlightControl["Canvas.Top"] =3D =
this._thumbControl["Canvas.Top"] + (this._thumbControl.height/2);
                    this._highlightControl.height =3D value * =
(this._slider.height - this._thumbControl.height) - =
(this._thumbControl.height/2);
                }
            }
        }
    }

    function Ee$UI$Xaml$Media$_Slider$_sliderLeftButtonDown(sender, =
eventArgs) {
        if (!this._enableSeeking) return false;
        var newValue =3D this._toValue(eventArgs.getPosition(sender));
        this._setThumbPosition(newValue);
        if (this._changedHandler) this._changedHandler();
        if (this._thumbControl) {
            this._isDragging =3D true;
            this._thumbControl.CaptureMouse();
        }
        return true;
    }

    function Ee$UI$Xaml$Media$_Slider$_thumbMouseLeftButtonDown() {
        if (!this._enableSeeking) return false;
        this._isDragging =3D true;
        this._thumbControl.CaptureMouse();
        return true;
    }

    function Ee$UI$Xaml$Media$_Slider$_thumbMouseLeftButtonUp() {
        if (!this._enableSeeking) return false;
        this._isDragging =3D false;
        this._thumbControl.ReleaseMouseCapture();
        if (this._changedHandler) this._changedHandler();
        return true;
    }

    function Ee$UI$Xaml$Media$_Slider$_thumbMouseMove(sender, args) {
        if (this._isDragging) {
            =
this._setThumbPosition(this._toValue(args.getPosition(this._slider)));
            if (this._changedHandler) this._changedHandler();
        }
        return true;
    }

    function Ee$UI$Xaml$Media$_Slider$_toValue(point) {
        // converts a point which is relative to the Slider control's =
position to a logical slider value
        var val;
        if (this._isHorizontal) {
            val =3D (point.X - (this._thumbControl.width / 2)) / =
(this._slider.width - this._thumbControl.width);
        }
        else {
            val =3D (point.Y - (this._thumbControl.height / 2)) / =
(this._slider.height - this._thumbControl.height);
            val =3D 1 - val;
        }
        return Math.min(1, Math.max(0, val));
    }

    function Ee$UI$Xaml$Media$_Slider$_toLocation(value) {
        // converts a logical value into a point which is relative to =
the Slider control's position
        value =3D Math.min(1, Math.max(0, value));
        if (this._isHorizontal) {
            return (value * (this._slider.width - =
this._thumbControl.width)) + (this._thumbControl.width / 2);
        }
        else {
            var range =3D this._slider.height - =
this._thumbControl.height;
            return (range - (value * range)) + =
(this._thumbControl.height / 2);
        }
    }
Ee.UI.Xaml.Media._Slider.prototype =3D {
    _slider: null,
    _thumb: null,
    _thumbControl: null,
    _enableSeeking: true,
    _highlight: null,
    _highlightControl: null,
    _isDragging: false,
    _isHorizontal: true,
    _rootToken: null,

    set_enabled: Ee$UI$Xaml$Media$_Slider$set_enabled,
   =20
    get_enableSeeking: Ee$UI$Xaml$Media$_Slider$get_enableSeeking,
    set_enableSeeking: Ee$UI$Xaml$Media$_Slider$set_enableSeeking,

    get_value: Ee$UI$Xaml$Media$_Slider$get_value,
    set_value: Ee$UI$Xaml$Media$_Slider$set_value,
   =20
    dispose: Ee$UI$Xaml$Media$_Slider$dispose,   =20
   =20
    _cancelDragging: Ee$UI$Xaml$Media$_Slider$_cancelDragging,
   =20
    _setThumbPosition: Ee$UI$Xaml$Media$_Slider$_setThumbPosition,
   =20
    _sliderLeftButtonDown: =
Ee$UI$Xaml$Media$_Slider$_sliderLeftButtonDown,
   =20
    _thumbMouseLeftButtonDown: =
Ee$UI$Xaml$Media$_Slider$_thumbMouseLeftButtonDown,

    _thumbMouseLeftButtonUp: =
Ee$UI$Xaml$Media$_Slider$_thumbMouseLeftButtonUp,

    _thumbMouseMove: Ee$UI$Xaml$Media$_Slider$_thumbMouseMove,
   =20
    _toValue: Ee$UI$Xaml$Media$_Slider$_toValue,
   =20
    _toLocation: Ee$UI$Xaml$Media$_Slider$_toLocation   =20
}
Ee.UI.Xaml.Media._Slider.registerClass('Ee.UI.Xaml.Media._Slider', =
Ee.UI.Xaml.Media._DomElement);
Ee.UI.Xaml.Media._ProgressBar =3D function =
Ee$UI$Xaml$Media$_ProgressBar(host, nameSlider, nameText) {
    // <summary>An element whose width depends on the value.</summary>
    // <param name=3D"host">The Silverlight host.</param>
    // <param name=3D"nameSlider" type=3D"String">name of XAML canvas =
that represents the slider, where the existing width is the 100% =
point</param>
    // <param name=3D"nameText" type=3D"String">Optional name of XAML =
TextBlock where the actual percentage amount should be displayed</param>
    Ee.UI.Xaml.Media._ProgressBar.initializeBase(this, [host, =
nameSlider]);
   =20
    var control =3D this.get_control();
    if (control) {
        this._originalWidth =3D control.width;
        control.width =3D 0;
    }
    if (nameText) {
        this._xamlText =3D new Ee.UI.Xaml.Media._TextBlock(host, =
nameText);
        this._xamlText.set_text("");
    }
}




    function Ee$UI$Xaml$Media$_ProgressBar$get_value() {
        if (arguments.length !=3D=3D 0) throw Error.parameterCount();
        // <value type=3D"Number">Progress value between 0 and =
1.</value>
        var c =3D this.get_control();
        if (!c) return 0;
        return c.width / this._originalWidth;
    }
    function Ee$UI$Xaml$Media$_ProgressBar$set_value(value) {
        var c =3D this.get_control();
        if (c) c.width =3D this._originalWidth * value;
        this._xamlText.set_text("" + Math.floor(value * 100));
    }

    function Ee$UI$Xaml$Media$_ProgressBar$setVisible(value) {
        Ee.UI.Xaml.Media._ProgressBar.callBaseMethod(this, "setVisible", =
[value]);
        if (this._xamlText) this._xamlText.setVisible(value);
    }

    function Ee$UI$Xaml$Media$_ProgressBar$dispose() {
        Ee.UI.Xaml.Media._ProgressBar.callBaseMethod(this, "dispose");
        if (this._xamlText) {
            this._xamlText.dispose();
            this._xamlText =3D null;
        }
    }
Ee.UI.Xaml.Media._ProgressBar.prototype =3D {
    _xamlText: null,
    _originalWidth: 0,
   =20
    get_value: Ee$UI$Xaml$Media$_ProgressBar$get_value,
    set_value: Ee$UI$Xaml$Media$_ProgressBar$set_value,
   =20
    setVisible: Ee$UI$Xaml$Media$_ProgressBar$setVisible,
  =20
    dispose: Ee$UI$Xaml$Media$_ProgressBar$dispose
}
Ee.UI.Xaml.Media._ProgressBar.registerClass('Ee.UI.Xaml.Media._ProgressBa=
r', Ee.UI.Xaml.Media._DomElement);


// EePlayer extends the BasePlayer player class, adding URL parsing and =
mediainfo support
//

Type.registerNamespace('EePlayer');

//
// optional URL parameters
//
EePlayer.UrlParam =3D {
    startTime   :   "startTime",    // specify start time for =
presentation on url in seconds as ...&start=3D5&...
    chapter     :   "chapter",      // start presentation at chapter # =
passed on url...&chapter=3D2&...
    loopCount   :   "loopCount",    // specify # of times to loop =
presentation on url as ...&loop=3D5&...  (-1 means forever)
    mediaUrl    :   "mediaUrl",     // overrides the video source passed =
into the script, plays this video instead
    volume      :   "volume",       // overrides starting volume
    muted       :   "muted",        // mute=3Dtrue mutes volume at start
    duration    :   "duration",     // amount of time to play
    autoplay    :   "autoplay",    // auto start playing presentation =
(default =3D 1 - yes)
    mediainfo   :   "mediainfo"     // media info, URL to JScript file =
with function 'mediainfo' which returns a JSON array (see docs)
};


EePlayer.Player =3D function EePlayer$Player(domElement) {
    EePlayer.Player.initializeBase(this, [domElement]);
    this._fInitialized=3Dfalse;
}

    function EePlayer$Player$initialize() {
        EePlayer.Player.callBaseMethod(this, 'initialize');

        // listen to URL parameters
        this.set_autoPlay( $getArgument(EePlayer.UrlParam.autoplay, =
this.get_autoPlay().toString()) =3D=3D=3D "true" );
        this.set_mediaUrl( $getArgument(EePlayer.UrlParam.mediaUrl, =
this.get_mediaUrl() ) );
        this.set_muted( $getArgument(EePlayer.UrlParam.muted, =
this.get_muted().toString() ) =3D=3D=3D "true" );
        this.set_volume( =
parseFloat($getArgument(EePlayer.UrlParam.volume, this.get_volume() )) =
);
        this.set_timeIndex( =
parseFloat($getArgument(EePlayer.UrlParam.startTime, =
this.get_timeIndex())) );
        this.set_mediainfo( $getArgument(EePlayer.UrlParam.mediainfo, =
this.get_mediainfo()) );
        var chapterArg =3D $getArgument(EePlayer.UrlParam.chapter);
        if (chapterArg!=3D=3D"") {
            this.set_currentChapter(parseInt(chapterArg));
        }

        if (this.get_mediainfo()!=3D=3D"")
            this._initMediainfo();

        this._fInitialized=3Dtrue;
    }




    function EePlayer$Player$set_mediainfo(mediainfo) {
        this._mediainfo =3D mediainfo;
        if (this._fInitialized)
            this._initMediainfo();
    }

    function EePlayer$Player$_initMediainfo() {
        // Load mediainfo from URL or is this a mediainfo JSON array or =
a function that returns
        if (typeof(this._mediainfo)=3D=3D=3D"string") {
            var req =3D new Sys.Net.WebRequest();
            req.set_url(this._mediainfo);
            req.add_completed(Function.createDelegate(this, =
this._loadedMediainfo));
            var executor =3D new Sys.Net.XMLHttpExecutor();
            req.set_executor(executor);
            executor.executeRequest();
            var started =3D executor.get_started();
        }
        else if (typeof(this._mediainfo)=3D=3D=3D"function") {
            this.set_chapters( this._mediainfo().chapters );
            this.set_placeholderImage( =
this._mediainfo().placeholderImage );
            this.set_mediaUrl( this._mediainfo().mediaUrl );
        }
        else if (this._mediainfo.mediaUrl!=3Dnull) {
            this.set_chapters( this._mediainfo.chapters );
            this.set_placeholderImage( this._mediainfo.placeholderImage =
);
            this.set_mediaUrl( this._mediainfo.mediaUrl );
        }
        else {
            throw Error.invalidOperation("unknown type for mediainfo");
        }
    }

    function EePlayer$Player$_loadedMediainfo(executor, eventArgs) {
        if (executor.get_statusText()=3D=3D=3D"OK") {
            try {
                eval("("+executor.get_responseData()+")");
                var mediainfoJSON =3D mediainfo(); // call to your =
provided function...
                this.set_chapters( mediainfoJSON.chapters );
                this.set_placeholderImage( =
mediainfoJSON.placeholderImage );
                this.set_mediaUrl( mediainfoJSON.mediaUrl );
            } catch (e) {
                throw Error.invalidOperation("problem with mediainfo");
            }
        }
    }


    function EePlayer$Player$set_timeIndex(value) {
	    // check for skipping past end of file and raise media ended
        if(this._mediaElement && this._canSeek && =
value>this._naturalduration ) {
		this._raiseEvent("mediaEnded", Sys.EventArgs.Empty);
	}
	else {
		EePlayer.Player.callBaseMethod(this, 'set_timeIndex', [value]);
	}
    }
EePlayer.Player.prototype =3D  {
    initialize: EePlayer$Player$initialize,

    get_mediainfo: function () {
        return this._mediainfo;
    },
    set_mediainfo: EePlayer$Player$set_mediainfo,

    _initMediainfo: EePlayer$Player$_initMediainfo,

    _loadedMediainfo: EePlayer$Player$_loadedMediainfo,


    set_timeIndex: EePlayer$Player$set_timeIndex
}
EePlayer.Player._playerCount =3D 0;
EePlayer.Player._getUniqueName =3D function =
EePlayer$Player$_getUniqueName(baseName) {
    return baseName + EePlayer.Player._playerCount++;
}
EePlayer.Player.registerClass('EePlayer.Player', =
Ee.UI.Xaml.Media.Player);



function $getArgument(strArg, defVal) {
   var urlArgs=3Dwindow.location.search.substring(1);
   var vals =3D urlArgs.split("&");
   var strArgLower =3D strArg.toLowerCase();
   for (var i=3D0;i<vals.length;i++) {
        var nvPair =3D vals[i].split("=3D");
        if (nvPair[0].toLowerCase() =3D=3D=3D strArgLower) {
            return unescape(nvPair[1]);
        }
   }
   if (typeof(defVal)!=3D=3D'undefined') {
        return defVal;
   }
   return "";
}



------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/player.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

Ee.UI.Xaml.Res=3D{
'runtimeErrorWithoutPosition': "Runtime error {2} in control '{0}', =
method {6}: {3}",
'scaleModeRequiresScaleTransform': "When ScaleMode is set to zoom or =
stretch, the root Canvas must have not have a RenderTransform applied, =
or must only have a ScaleTransform.",
'mediaError_NotFound': "Media '{3}' in control '{0}' could not be =
found.",
'runtimeErrorWithPosition': "Runtime error {2} in control '{0}', method =
{6} (line {4}, col {5}): {3}",
'silverlightVersionFormat': "Must be in the format =
'MajorVersion.MinorVersion'.",
'otherError': "{1} error #{2} in control '{0}': {3}",
'cannotChangeXamlSource': "You cannot change the XAML source after =
initialization.",
'parserError': "Invalid XAML for control '{0}'. [{7}] (line {4}, col =
{5}): {3}"
};

Ee.UI.Xaml.Media.Res=3D{
'volumeRange':  "Volume must be a number greater than or equal to 0 and =
less than or equal to 1.",
'mediaFailed':  "Unable to load media '{0}'.",
'noMediaElement':  "The XAML document does not contain a Media =
Element.",
'invalidChapterIndex':  "Must be greater than or equal to 0 and less =
than the length of the chapter's array."
};



/////////////////////////////////////////////////////////////////////////=
//////
//
//  ExtendedPlayer
//
//  This extends the base player class, you may override the base player
//  member functions or add additional player functionality here.=20
//
/////////////////////////////////////////////////////////////////////////=
//////
Type.registerNamespace('ExtendedPlayer');

ExtendedPlayer.Player =3D function(domElement) {
    ExtendedPlayer.Player.initializeBase(this, [domElement]); =20
}

// These are the unscaled XAML sizes of these elements
var g_iPlayerNaturalWidth =3D 638;
var g_iPlayerNaturalChromeHeight =3D 76;

var g_dTicksPerSecond =3D 10000000;

var g_timeSliderChangedCallback =3D null;
var g_playStateChangedCallback =3D null;

var g_onLoadVideoStartPosition =3D null;

ExtendedPlayer.Player.prototype =3D  {
	_onTimeSliderChanged: function(args)=09
	{
        ExtendedPlayer.Player.callBaseMethod(this, =
"_onTimeSliderChanged", [args]);
	    if( g_timeSliderChangedCallback !=3D null )
	    {
	        =
g_timeSliderChangedCallback(this._mediaElement.Position.Seconds, true);
	    }
	},
	onPlayStateChanged: function(args)
	{
        ExtendedPlayer.Player.callBaseMethod(this, "onPlayStateChanged", =
[args]);
        if( g_playStateChangedCallback !=3D null )
	    {
	        g_playStateChangedCallback(this._mediaElement.currentState);
	    }
	}
}
ExtendedPlayer.Player.registerClass('ExtendedPlayer.Player', =
EePlayer.Player);

var expressionPlayerUrl =3D "";
var expressionVideo =3D null;
function get_mediainfo(mediainfoIndex) {
    switch (mediainfoIndex) {       =20

        case 0:
            return  { "mediaUrl": expressionPlayerUrl,
                      "placeholderImage": null,
                      "chapters": [              =20
                                  ] };                                   =
                            =20
                         =20
        default:
             throw Error.invalidOperation("No such mediainfo");
     }
}

function StartPlayer_0(parentEl, viewer)
{
    this.parentEl =3D parentEl;
    this.version =3D viewer.version;
}


StartPlayer_0.prototype =3D {
    Initialize: function (url, sliderChangedCallback, =
playStateChangedCallback)
    {
        expressionPlayerUrl =3D url.Url;
        g_timeSliderChangedCallback =3D sliderChangedCallback;
        g_playStateChangedCallback =3D playStateChangedCallback;
        this._hostname =3D EePlayer.Player._getUniqueName("xamlHost");
        Silverlight.createObjectEx({ source: 'player.xaml?ver=3D' + =
this.version,
            parentElement: this.parentEl,
            id: this._hostname,
            properties: { width: '100%', height: '100%', version: '1.0', =
background: "#ECECEC", isWindowless: 'false' },
            events: { onLoad: Function.createDelegate(this, =
this._handleLoad) }
        });
        this._currentMediainfo =3D 0;

    },
    // Width/Height from player.xaml
    AspectRatio: 638 / 554,
    Height: 0,
    Width: 0,
    OnResize: function (maxHeight, maxWidth)
    {
        var desiredWidth =3D maxWidth =3D=3D undefined ? =
(this.parentEl.offsetWidth - 20) : maxWidth;
        this.Height =3D desiredWidth / this.AspectRatio;
        if (this.Height > maxHeight)
        {
            this.Height =3D maxHeight;
        }
        this.Width =3D this.Height * this.AspectRatio;

        this.Height =3D Math.floor(this.Height);
        this.Width =3D Math.floor(this.Width);

        this.parentEl.style.height =3D this.Height + "px";

        var slEl =3D document.getElementById(this._hostname);
        if (slEl)
        {
            slEl.style.height =3D this.Height + "px";
            slEl.style.width =3D this.Width + "px";
        }
    },
    SetVideoPosition: function (fTime)
    {
        if (expressionVideo)
        {
            expressionVideo.Position =3D CreateTimeSpan(fTime);
        }
        else
        {
            g_onLoadVideoStartPosition =3D fTime;
        }
    },

    GetVideoPosition: function ()
    {
        if (!expressionVideo)
            return 0;
        else
            return expressionVideo.Position.Seconds;
    },

    GetPlayState: function ()
    {
        if (!expressionVideo)
        {
            return "Stopped";
        }
        else
        {
            return expressionVideo.CurrentState;
        }
    },

    SetPlayState: function (playState)
    {
        if (playState =3D=3D "Playing")
            expressionVideo.Play();
        else if (playState =3D=3D "Paused")
            expressionVideo.Pause();
        else if (playState =3D=3D "Stopped")
            expressionVideo.Stop();
    },

    _handleLoad: function (sender)
    {
        expressionVideo =3D sender.content.findName("VideoWindow");
        playerChrome =3D sender.content.findName("PlayerChrome");
        player =3D sender.content.findName("Player");

        this._player =3D $create(ExtendedPlayer.Player,
                                  { // properties
                                      autoPlay: true,
                                      volume: 1.0,
                                      muted: false
                                  },
                                  { // event handlers
                                      mediaOpened: =
Function.createDelegate(this, this._onMediaOpened),
                                      mediaEnded: =
Function.createDelegate(this, this._onMediaEnded),
                                      mediaFailed: =
Function.createDelegate(this, this._onMediaFailed)
                                  },
                                  null, $get(this._hostname));
        this._playNextVideo();
    },
    _onMediaOpened: function (sender, eventArgs)
    {
        // Adjust player aspect ratio for audio-only to display only =
controls
        if (!expressionVideo.NaturalVideoWidth)
        {
            this.AspectRatio =3D g_iPlayerNaturalWidth / =
g_iPlayerNaturalChromeHeight;
            expressionVideo.Visibility =3D "Collapsed";
            playerChrome["Canvas.Top"] =3D 0;
            player.height =3D g_iPlayerNaturalChromeHeight;
        }

        if (g_onLoadVideoStartPosition)
        {
            this.SetVideoPosition(g_onLoadVideoStartPosition);
            g_onLoadVideoStartPosition =3D null;
        }

        g_pViewer.Resize();
    },
    _onMediaEnded: function (sender, eventArgs)
    {
        window.setTimeout(Function.createDelegate(this, =
this._playNextVideo), 1000);
    },
    _onMediaFailed: function (sender, eventArgs)
    {
        // If we fail to connect, wait two seconds and retry.
        setTimeout(
                Function.createDelegate(this, function () { =
this._player.set_mediaUrl(this._player.get_mediaUrl()) }),
                2000
            );
    },
    _playNextVideo: function ()
    {
        var cVideos =3D 1;
        if (this._currentMediainfo < cVideos)
            =
this._player.set_mediainfo(get_mediainfo(this._currentMediainfo++));
    }
}

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/WMPVideo.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

var g_dWmpControlHeight =3D 64;
var g_dWmpAspectRatio =3D (4/3);

var g_dTicksPerSecond =3D 10000000;

// wrapper for WMP player object
function VideoPlayer(el, id, bArchival)
{
    var m_el =3D el;
    var m_contentEl =3D CreateChildElement(m_el, "div", =
"wmpVideoPlayerContent");
    var m_pVideo =3D null;
    var m_pInfo =3D null;
   =20
    var m_sliderChangedCallback =3D null;
    var m_playstateChangedCallback =3D null;

    if (!id) id =3D "VideoPlayer";

    // this is needed by TabViewer for layout
    // Default to 4/3 in case we fail to retrieve native aspect ratio =
from video.
    this.AspectRatio =3D g_dWmpAspectRatio;

    var m_pVideo =3D CreateChildElement(m_contentEl, "object", "", id);
    if (m_pVideo)
    {
        var width =3D m_contentEl.offsetWidth;
        var height =3D Math.floor(width / g_dWmpAspectRatio + =
g_dWmpControlHeight);

        // don't let the width/height ever be 0 as this will cause a =
crash
        m_pVideo.width =3D Math.max(width, 1);
        m_pVideo.height =3D Math.max(height, 1);
        m_pVideo.classid=3D =
"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6";=20
        m_pVideo.stretchToFit =3D "true";
        m_pVideo.invokeURLs =3D "false";

        // make sure we cover all versions when disabling invokeURLs
        if (m_pVideo.Settings)
        {
            m_pVideo.Settings.invokeURLs =3D "false";
        }

        // hide controls for object video player
        if (!bArchival)
        {
            m_pVideo.uiMode =3D "none";
        }

        function OnPositionChange(oldPosition, newPosition)
        {
            if (m_sliderChangedCallback !=3D null)
            {
                m_sliderChangedCallback(newPosition, true);
            }
        }

        function OnPlayStateChange(newState)
        {
            var playState =3D TranslatePlayState(newState);

            if (playState && m_playstateChangedCallback)
            {
                m_playstateChangedCallback(playState);
            }

            if (!bArchival && m_pVideo)
            {
                if (playState =3D=3D "Buffering")
                {
                    m_pVideo.uiMode =3D "mini";
                }
                else
                {
                    m_pVideo.uiMode =3D "none";
                }
            }
        }

        function OnOpenStateChange(openState)
        {
            // If media is open
            if (openState =3D=3D 13)
            {
                this.AspectRatio =3D =
m_pVideo.currentMedia.imageSourceWidth / =
m_pVideo.currentMedia.imageSourceHeight;
                // BUGBUG: We should refactor tabviewer / videoplayers =
such that videoplayer handles vertical centering.
                // Then we can just resize the videoplayer.
                g_pViewer.Resize();
            }
        }

        function OnMediaError(mediaObject)
        {
            setTimeout(function()
            {
                m_pVideo.URL =3D m_pInfo.Url
            }, 2000);
        }

        // set up our event handlers
        m_pVideo.attachEvent("PositionChange", OnPositionChange);
        m_pVideo.attachEvent("PlaystateChange", OnPlayStateChange);
        m_pVideo.attachEvent("MediaError", OnMediaError);
        // retrieve aspect ratio for object video once loaded.
        // archival video is fixed aspect ratio, so don't bother =
listening for event.
        if (!bArchival)
        {
            m_pVideo.attachEvent("OpenStateChange", =
Function.createDelegate(this, OnOpenStateChange));
        }
    }

    // info is a stream definition - create in DeliveryInfo in Viewer.js
    this.Initialize =3D function(info, sliderChangedCallback, =
playStateChangedCallback)
    { =20
        m_pInfo =3D info;
        m_pVideo.URL =3D info.Url;
       =20
        m_sliderChangedCallback =3D sliderChangedCallback;
        m_playstateChangedCallback =3D playStateChangedCallback;
    }
   =20
    this.GetVideoPlayer =3D function()
    {
        return m_pVideo;
    }

    this.SetVideoPosition =3D function(dTime)=20
    {
        if (m_pVideo && m_pVideo.controls)=20
        {
            m_pVideo.controls.currentPosition =3D dTime;
        }
    }

    this.GetVideoPosition =3D function()=20
    {
        if (m_pVideo && m_pVideo.controls)=20
        {
            return m_pVideo.controls.currentPosition;
        }
    }

    this.GetPlayState =3D function()
    {
        return TranslatePlayState(m_pVideo.playState);
    }
   =20
    function TranslatePlayState(playState)
    {
        switch (playState)
        {
            case 1:     return "Stopped";
            case 2:     return "Paused";
            case 3:     return "Playing";
            case 6:     return "Buffering";
            case 7:     return "Buffering";
            default:    return null;
        }
    }

    this.SetPlayState =3D function(playState)
    {
        if (m_pVideo && m_pVideo.controls)
        {
            switch (playState)
            {
                case this.GetPlayState()    : return;
                case "Playing"              : m_pVideo.controls.play(); =
break;
                case "Paused"               : m_pVideo.controls.pause(); =
break;
                case "Stopped"              : m_pVideo.controls.stop(); =
break;
            }
        }
    }

    this.SetFullScreen =3D function(fullScreen)
    {
        try
        {
            m_pVideo.fullScreen =3D fullScreen;
        }
        catch (exception)
        {
        }
    }
       =20
    // used for archival video player
    this.OnResize =3D function(maxHeight, maxWidth)
    {
        var desiredWidth =3D maxWidth =3D=3D undefined ? =
m_contentEl.clientWidth : maxWidth;

        // change our height based on our width
        this.Height =3D desiredWidth / g_dWmpAspectRatio + =
g_dWmpControlHeight;
        if (this.Height > maxHeight)
        {
            this.Height =3D maxHeight;
        }
        this.Width =3D (this.Height - g_dWmpControlHeight) * =
g_dWmpAspectRatio;

        if (m_pInfo !=3D null && m_pInfo.Tag =3D=3D "AUDIO")
        {
            this.Height =3D g_dWmpControlHeight;
        }

        this.Height =3D Math.floor(this.Height);
        this.Width =3D Math.floor(this.Width);

        m_el.style.height =3D this.Height + "px";
        m_contentEl.style.height =3D this.Height + "px";

        if (!m_pVideo)
            return;

        m_pVideo.style.width =3D this.Width + "px";
        m_pVideo.style.height =3D this.Height + "px";
    }
   =20
    // used for object video player
    this.SetSize =3D function(width, height)
    {
        m_el.style.width =3D width + "px";
        m_el.style.height =3D height + "px";
        m_contentEl.style.height =3D height + "px";
               =20
        if( !m_pVideo )
            return;
               =20
        m_pVideo.style.width =3D width + "px";
        m_pVideo.style.height =3D height + "px";=20
    }

    this.UpdateStatus =3D function(pEvent, bUserInitiated)
    {
        if (!m_pVideo) return;

        // synchronize positions - if we are more than the threshold =
away from the
        // archival video then synchronize
        var fTargetObjPos;
        if (m_pInfo.Segments)
        {
            var iTargetSeg =3D 0;
            while (iTargetSeg < m_pInfo.Segments.length && =
m_pInfo.Segments[iTargetSeg].RelativeStart <=3D pEvent.Time)
            {
                iTargetSeg++;
            }
            iTargetSeg--;
            var pTargetSeg =3D m_pInfo.Segments[iTargetSeg];
            fTargetObjPos =3D Math.max(pTargetSeg.Offset + pEvent.Time - =
pTargetSeg.RelativeStart, 0);
        }
        else
        {
            // our target with respect to the archival video
            fTargetObjPos =3D Math.max(pEvent.Time - =
m_pInfo.RelativeStart, 0);
        }

        // only update the position if we are way off or this update was =
initiated by a user action  =20
        var fCurPos =3D this.GetVideoPosition();
        if (bUserInitiated || (Math.abs(fCurPos - fTargetObjPos) > =
g_fOffsetThreshold))
        {
            this.SetVideoPosition(fTargetObjPos);
        }
    }
   =20
    this.SetVisible =3D function(bVisible)
    {
        SetVisible(m_el, bVisible);
    }
}

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/SLVideo.js

// Copyright 2007-2010 Panopto, Inc.
// All rights reserved.  Reuse and redistribution strictly prohibited.

var g_dVideoAspect =3D (640/480);

// silverlight video player
function SilverlightVideoPlayer(el, strId, viewer)
{
    var m_pEl =3D el;

    var m_pViewer =3D viewer;

    var m_pVideo =3D null;

    var m_pBufferingArea =3D null;
    var m_pBufferingText =3D null;
    var m_pBufferingAnimation =3D null;
    var m_bBufferingIndicatorVisible =3D false;
   =20
    var m_pFullScreenMessage =3D null;
    var m_pFullScreenMessageFade =3D null;
    var m_pFullScreenButtons =3D null;
    var m_pFullScreenNativeButton =3D null;
    var m_pFullScreenStretchButton =3D null;
    var m_pFullScreenExitButton =3D null;
   =20
    var m_pInfo =3D null;
   =20
    var m_dVideoWidth =3D null;
    var m_dVideoHeight =3D null;

    var m_bFirstLoad =3D true;

    this.Initialize =3D function(info)
    {
        m_pInfo =3D info;

        // JS prints "null" for null ref
        if(!m_pInfo.xamlRoot) m_pInfo.xamlRoot =3D "";
       =20
        // initialize our silverlight instance with the load callback
        Silverlight.createObjectEx({
            source: m_pInfo.xamlRoot + 'VideoPlayer.xaml?ver=3D' + =
m_pViewer.version,
            parentElement: m_pEl,
            id: strId,
            properties: {
                width: '100%',
                height: '240px',
                background: 'black',
                isWindowless: 'false',
                version: '1.0'
            },
            events: {
                onError: null,
                onLoad: Function.createDelegate(this, Plugin_OnLoad),
                onFullScreenChanged: Function.createDelegate(this, =
Plugin_OnFullScreenChanged)
            },
            context: null
        });
    }

    function Plugin_OnLoad(control, userContext, rootElement)
    {
        // Get pointers to XAML elements
        m_pVideo =3D rootElement.findName("mediaElement");
        m_pBufferingArea =3D rootElement.findName("BufferingArea");
        m_pBufferingText =3D rootElement.findName("BufferingText");
        m_pBufferingAnimation =3D =
rootElement.findName("BufferingArea_Buffering");
        m_pFullScreenMessage =3D =
rootElement.findName("fullScreenMessage");
        m_pFullScreenMessageFade =3D =
rootElement.findName("fullScreenMessageFade");
        m_pFullScreenButtons =3D =
rootElement.findName("fullScreenButtons");
        m_pFullScreenNativeButton =3D =
rootElement.findName("fullScreenNativeButton");
        m_pFullScreenStretchButton =3D =
rootElement.findName("fullScreenStretchButton");
        m_pFullScreenExitButton =3D =
rootElement.findName("fullScreenExitButton");

        // Wire up media event handlers
        m_pVideo.addEventListener("mediaOpened", =
Function.createDelegate(this, MediaElement_MediaOpened));
        m_pVideo.addEventListener("mediaEnded", =
Function.createDelegate(this, MediaElement_MediaEnded));
        m_pVideo.addEventListener("mediaFailed", =
Function.createDelegate(this, MediaElement_MediaFailed));
        m_pVideo.addEventListener("bufferingProgressChanged", =
Function.createDelegate(this, MediaElement_BufferingProgressChanged));
        m_pVideo.addEventListener("currentStateChanged", =
Function.createDelegate(this, MediaElement_StateChanged));

        // Wire up mouse event handlers
        m_pVideo.addEventListener("mouseLeftButtonDown", =
Function.createDelegate(this, MediaElement_MouseLeftButtonDown));
        m_pFullScreenNativeButton.addEventListener("mouseLeftButtonUp", =
Function.createDelegate(this, FullScreenNative));
        m_pFullScreenStretchButton.addEventListener("mouseLeftButtonUp", =
Function.createDelegate(this, FullScreenStretch));
        m_pFullScreenExitButton.addEventListener("mouseLeftButtonUp", =
Function.createDelegate(this, ExitFullScreen));

        DisplayBuffering(true, 0);

        // Set the media element source.
        m_pVideo.Source =3D m_pInfo.Url;
       =20
        m_pVideo.BufferingTime =3D CreateTimeSpan(5);
       =20
        if (m_dVideoWidth && m_dVideoHeight)
        {
            this.SetSize(m_dVideoWidth, m_dVideoHeight);
        }

        if (m_bFirstLoad)
        {
            m_pFullScreenMessage.Visibility =3D "Visible";
            m_pFullScreenMessageFade.Begin();
           =20
            m_bFirstLoad =3D false;
        }
    }

    function IsLoadingState(playState)
    {
        switch (playState)
        {
            case "Playing":
            case "Paused":
            case "Stopped":
                {
                    return false;
                }
            default:
                {
                    return true;
                }
        }
    }

    function MediaElement_BufferingProgressChanged()
    {
        var progress =3D m_pVideo.bufferingProgress;
        var percent =3D Math.round(progress * 100);
        if ((percent >=3D 100) || !IsLoadingState(this.GetPlayState()))
        {
            DisplayBuffering(false);
        }
        else
        {
            DisplayBuffering(true, percent);
        }
    }

    function DisplayBuffering(enabled, percent)
    {
        if (enabled)
        {
            if (!m_bBufferingIndicatorVisible)
            {
                m_pBufferingText.Visibility =3D "Visible";
                m_pBufferingArea.Visibility =3D "Visible";
                m_bBufferingIndicatorVisible =3D true;

                m_pBufferingAnimation.Begin();
           }

            m_pBufferingText.Text =3D percent.toString();
        }
        else if (m_bBufferingIndicatorVisible)
        {
            m_pBufferingText.Visibility =3D "Collapsed";
            m_pBufferingArea.Visibility =3D "Collapsed";
            m_bBufferingIndicatorVisible =3D false;

            m_pBufferingAnimation.Stop();
        }
    }

    function MediaElement_StateChanged()
    {
        var playState =3D this.GetPlayState();
        if (IsLoadingState(playState))
        {
            DisplayBuffering(true, 0);
        }
        else
        {
            DisplayBuffering(false);
        }

        if (m_pInfo.stateChangedCallback)
        {
            m_pInfo.stateChangedCallback(playState);
        }
    }

    // Layout full screen buttons and if returning from full screen, =
ensure media element fills plugin client area.
    function Plugin_OnFullScreenChanged(sender)
    {
        if (!m_pVideo) return;
       =20
        var isFullScreen =3D sender.GetHost().content.fullScreen;

        // Entering FS mode
        if (isFullScreen)
        {
            m_pFullScreenMessage.Visibility =3D "Collapsed";
            m_pFullScreenButtons.Visibility =3D "Visible";
        }
        // Returning from FS mode
        else
        {
            m_pFullScreenButtons.Visibility =3D "Collapsed";
           =20
            try
            {
                m_pVideo["Margin"] =3D "0";

                m_pVideo.Width =3D m_dVideoWidth;
                m_pVideo.Height =3D m_dVideoHeight;
            }
            catch (error)
            {
            }
        }
    }

    // This is needed by TabViewer for layout.
    // Default to constant in case we fail to retrieve aspect from =
video.
    this.AspectRatio =3D g_dVideoAspect;

    function MediaElement_MediaOpened(sender)
    {
        this.AspectRatio =3D m_pVideo.NaturalVideoWidth / =
m_pVideo.NaturalVideoHeight;
        // BUGBUG: We should refactor tabviewer / videoplayers such that =
videoplayer handles vertical centering.
        // Then we can just resize the videoplayer.
        g_pViewer.Resize();
    }

    function MediaElement_MediaEnded(sender)
    {
        // If we have a callback, call it
        if (m_pInfo.mediaEndedCallback)
        {
            m_pInfo.mediaEndedCallback();
        }
    }

    // If we fail to connect to the publishing point, try again every 2 =
seconds.
    function MediaElement_MediaFailed(sender)
    {
        // If we have a callback, call it
        if (m_pInfo.mediaFailedCallback)
        {
            m_pInfo.mediaFailedCallback();
        }
        // Otherwise just retry the current URL after a delay.
        else
        {
            setTimeout(function()
            {
                m_pVideo.Source =3D m_pInfo.Url;
            },
            2000);
        }
    }

    // Makeshift double-click handler
    var bMediaElementClick =3D false;
    function MediaElement_MouseLeftButtonDown(sender)
    {
        if (bMediaElementClick)
        {
            var content =3D sender.GetHost().content;
            if (content.fullScreen)
            {
                ExitFullScreen.call(this, sender);
            }
            else
            {
                FullScreenStretch.call(this, sender);
            }
        }
        else
        {
            bMediaElementClick =3D true;
            setTimeout(function() { bMediaElementClick =3D false; }, =
500);
        }
    }

    function FullScreenNative(sender) { FullScreen.call(this, =
"nativePixels", sender); }
    function FullScreenStretch(sender) { FullScreen.call(this, =
"stretch", sender); }
    function FullScreen(mode, sender)
    {
        var content =3D sender.GetHost().content;
       =20
        content.fullScreen =3D true;

        var screenWidth =3D content.actualWidth;
        var screenHeight =3D content.actualHeight;

        if (mode =3D=3D "nativePixels")
        {
            var videoWidth =3D Math.min(m_pVideo.NaturalVideoWidth, =
screenWidth);
            var videoHeight =3D videoWidth / this.AspectRatio;

            if (videoHeight > screenHeight)
            {
                videoHeight =3D screenHeight;
                videoWidth =3D videoHeight * this.AspectRatio;
            }

            m_pVideo["Margin"] =3D ((screenWidth - videoWidth) / 2) + =
"," + ((screenHeight - videoHeight) / 2);

            m_pVideo.Width =3D videoWidth;
            m_pVideo.Height =3D videoHeight;
        }
        else
        {
            m_pVideo["Margin"] =3D "0";

            m_pVideo.Width =3D screenWidth;
            m_pVideo.Height =3D screenHeight;
        }
    }

    function ExitFullScreen(sender)
    {
        var content =3D sender.GetHost().content;

        content.fullScreen =3D false;
    }

    this.SetVisible =3D function( bVisible )
    {
        SetVisible( m_pEl, bVisible );
    }

    this.SetSource =3D function(url)
    {
        m_pVideo.Source =3D url;
    }
   =20
    this.SetVideoPosition =3D function( fTime )
    {
        if( fTime < m_pVideo.NaturalDuration.Seconds )
        {
            m_pVideo.Position =3D CreateTimeSpan(fTime);
        }
    }
   =20
    this.GetVideoPosition =3D function()
    {
        if( !m_pVideo )
            return 0;
        else
            return m_pVideo.Position.Seconds;
    }
   =20
    this.GetPlayState =3D function()
    {
        var state =3D null;
       =20
        if(m_pVideo)
        {
            try
            {
                state =3D m_pVideo.CurrentState;
            }
            catch(error)
            {
            }
        }
       =20
        return state;
    }

    this.SetPlayState =3D function(playState)
    {
        if (m_pVideo && (this.GetPlayState() !=3D playState))
        {
            try
            {
                if (playState =3D=3D "Playing")
                {
                    m_pVideo.Play();
                }
                else if (playState =3D=3D "Paused")
                {
                    m_pVideo.Pause();
                }
            }
            catch (error)
            {
            }
        }
    }

    this.UpdateStatus =3D function(pEvent, bUserInitiated)
    {
        if( !m_pVideo )
            return;
     =20
        // synchronize positions - if we are more than the threshold =
away from the
        // archival video then synchronize
        var fTargetObjPos;
        if( m_pInfo.Segments )
        {
            var iTargetSeg =3D 0;
            while( iTargetSeg < m_pInfo.Segments.length && =
m_pInfo.Segments[iTargetSeg].RelativeStart <=3D pEvent.Time )
            {
                iTargetSeg++;
            }
            iTargetSeg--;
            var pTargetSeg =3D m_pInfo.Segments[iTargetSeg];
            fTargetObjPos =3D Math.max( pTargetSeg.Offset + pEvent.Time =
- pTargetSeg.RelativeStart, 0 );=20
        }
        else
        {
            // our target with respect to the archival video
            fTargetObjPos =3D Math.max( pEvent.Time - =
m_pInfo.RelativeStart, 0 );   =20
        }
       =20
        try
        {
            var fCurPos =3D m_pVideo.Position.Seconds;
            if( bUserInitiated || (Math.abs(fCurPos - fTargetObjPos) > =
g_fOffsetThreshold) )
            {
                this.SetVideoPosition( fTargetObjPos );
            }
            var curPlayState =3D this.GetPlayState();
            if(pEvent.PlayState !=3D curPlayState)
            {
                this.SetPlayState(pEvent.PlayState);
            }
        }
        catch(error)
        {
        }
    }
   =20
    this.SetSize =3D function(width, height)
    {
        m_dVideoWidth =3D width;
        m_dVideoHeight =3D height;
       =20
        m_pEl.style.width =3D width + "px";
        m_pEl.style.height =3D height + "px";
       =20
        var slPlugin =3D document.getElementById(strId);
        if( slPlugin )
        {
            slPlugin.style.height =3D height + "px";
            slPlugin.style.width =3D width + "px";
        }
       =20
        if( m_pVideo )
        {
            try
            {
                m_pVideo.Width =3D m_dVideoWidth;
                m_pVideo.Height =3D m_dVideoHeight;
            }
            catch(error)
            {
            }  =20
        }
    }
}


// helper functions
function CreateTimeSpan(fSeconds)
{
    // hooray, javascript
    function pad(int)
    {
        return int =3D (int < 10) ? '0' + int : int;
    }

    // surely there is some built-in way to do this
    var iHours =3D Math.floor(fSeconds / 3600);
    var iMinutes =3D Math.floor((fSeconds % 3600) / 60);
    var seconds =3D fSeconds % 60;
    seconds =3D seconds.toFixed(2);
    return pad(iHours) + ":" + pad(iMinutes) + ":" + pad(seconds);
}

------=_NextPart_000_0027_01CB9AC0.148993B0
Content-Type: application/x-js
Content-Transfer-Encoding: quoted-printable
Content-Location: http://coursecast/Panopto/Cache/e7e78e6e-184f-45d1-8517-f88e0dd9bfe44fc75095-1a16-9e68-f6a4-fb981bf05bf6/Pages/Viewer/DetectAcrobat.js

=EF=BB=BF// Adapted from: =
http://support.adobe.com/devsup/devsup.nsf/docs/52970.htm

function detectPDF()
{
    if (window.ActiveXObject)
    {
        var bControlInstalled =3D false;

        // Detect Acrobat Version 7+
        try
        {
            if (new ActiveXObject("AcroPDF.PDF.1"))
            {
                bControlInstalled =3D true;
            }
        }
        catch (e) { }

        // Detect Acrobat version <=3D 6
        if (!bControlInstalled)
        {
            for (x =3D 1; x < 10; x++)
            {
                try
                {
                    if (eval("new ActiveXObject('PDF.PdfCtrl." + x + =
"');"))
                    {
                        bControlInstalled =3D true;
                        break;
                    }
                }
                catch (e) { }
            }
        }
    }
    else
    {
        bControlInstalled =3D detectPlugin('Adobe', 'Acrobat');
    }

    return bControlInstalled;
}

function detectPlugin() {
	// allow for multiple checks in a single pass
	var daPlugins =3D detectPlugin.arguments;
	// consider pluginFound to be false until proven true
	var pluginFound =3D false;
	// if plugins array is there and not fake
	if (navigator.plugins && navigator.plugins.length > 0) {
		var pluginsArrayLength =3D navigator.plugins.length;
		// for each plugin...
		for (pluginsArrayCounter=3D0; pluginsArrayCounter < =
pluginsArrayLength; pluginsArrayCounter++ ) {
			// loop through all desired names and check each against the current =
plugin name
			var numFound =3D 0;
			for(namesCounter=3D0; namesCounter < daPlugins.length; =
namesCounter++) {
				// if desired plugin name is found in either plugin name or =
description
				if( =
(navigator.plugins[pluginsArrayCounter].name.indexOf(daPlugins[namesCount=
er]) >=3D 0) ||=20
					=
(navigator.plugins[pluginsArrayCounter].description.indexOf(daPlugins[nam=
esCounter]) >=3D 0) ) {
					// this name was found
					numFound++;
				}  =20
			}
			// now that we have checked all the required names against this one =
plugin,
			// if the number we found matches the total number provided then we =
were successful
			if(numFound =3D=3D daPlugins.length) {
				pluginFound =3D true;
				// if we've found the plugin, we can stop looking through at the =
rest of the plugins
				break;
			}
		}
	}
	return pluginFound;
} // detectPlugin

------=_NextPart_000_0027_01CB9AC0.148993B0--
