﻿var _cuWmvContainer;var _cuPlayerBackgroundContainer;var _cuPlayerTop;var _cuPlayerLeft;var _cuPlayerFlashXMargin=-20;var _cuPlayerFlashYMargin=-8;var _cuPlayerWroteProductInstall=false;var requiredMajorVersion=9;var requiredMinorVersion=0;var requiredRevision=124;var hasProductInstall=DetectFlashVer(6,0,65);var hasRequestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);var _cuPlayerAlternateContent='<div id="dvFlashAlternate">Hello, in order to view this content you need to install <a href=http://www.adobe.com/go/getflash/>Adobe Flash Player</a></div>';function _cuPlayerFindPosition(oElement){if(typeof(oElement.offsetParent)!="undefined"){for(var posX=0,posY=0;oElement;oElement=oElement.offsetParent){posX+=oElement.offsetLeft;posY+=oElement.offsetTop}return[posX,posY]}else{return[oElement.x,oElement.y]}}function _cuPlayerResetPosition(top,left){var oldTop=0;var oldLeft=0;if(top){_cuPlayerTop=top}if(left){_cuPlayerLeft=left}var container=document.getElementById("cuPlayerPlayerContainer");_cuPlayerResetElementPosition(_cuPlayerTop,_cuPlayerLeft,container,_cuWmvContainer);_cuWmvContainer.style.zIndex=0}function _cuPlayerResetElementPosition(top,left,relativeTo,target){var oldTop=0;var oldLeft=0;var posArr=new Array();if(relativeTo){posArr=_cuPlayerFindPosition(relativeTo);oldLeft=posArr[0];oldTop=posArr[1]}target.style.top=oldTop+top+"px";target.style.left=oldLeft+left+"px"}function _cuPlayerHideObject(){_cuWmvContainer.style.display="none"}function _cuPlayerShowObject(){_cuWmvContainer.style.display="block"}function _cuPlayerMakePlayerObject(width,height){_cuWmvContainer=document.getElementById("cuPlayerWMVContainer");_cuPlayerTop=0;_cuPlayerLeft=0;_cuPlayerResetPosition();_cuWmvContainer.width=width+"px";_cuWmvContainer.height=height+"px";_cuWmvContainer.style.width=width+"px";_cuWmvContainer.style.height=height+"px";_cuVolVar=50;_cuMuteVar=false;_cuPlayerName="cuWmvPlayer";_cuWmvContainer.innerHTML=_cuPlayerGetPlayerHTML(0,0,width,height,"cuPlayerWMVContainer");window.onresize=_cuPlayerResetPosition}function _cuPlayerGetPlayerHTML(top,left,width,height,videoContainerId){var html="";html+='<div id="'+videoContainerId+'" style="width:'+width+"px;height:"+height+"px;position:absolute;top:"+top+"px;left:"+left+'px;z-index:0;" ><OBJECT id="cuWmvPlayer" width="'+width+'px" height="'+height+'px"';if(_cuPlayerIsFireFox()){html+='type="application/x-ms-wmp"'}else{html+='CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"'}html+=">";html+='    <param name="name" value="cuWmvPlayer">';html+='    <param name="uiMode" value="none">';html+='    <param name="ShowStatusBar" value="false">';html+='    <param name="ShowDisplay" value="false">';html+='    <param name="autostart" value="false">';html+='    <param name="enableContextMenu" value="false">';html+='    <param name="volume" VALUE="'+_cuVolVar+'">';html+='    <param name="mute" VALUE="'+_cuMuteVar+'">';if(_cuPlayerIsFireFox()){html+='    <PARAM name="windowlessVideo" value="false">'}else{html+='    <PARAM name="windowlessVideo" value="true">'}html+='    <PARAM name="SendPlayStateChangeEvents" value="True">';html+=" </OBJECT></div>";return html}function _cuPlayerIsFireFox(){if(navigator.userAgent.indexOf("Firefox")>=0||navigator.userAgent.indexOf("Chrome")>=0||navigator.userAgent.indexOf("Opera")>=0){return true}return false}function _cuPlayerMoveMe(elementId,x,y){if(x<=$(window).width()&&y<=$(window).height()){x=_cuPlayerFixX(x);y=_cuPlayerFixY(y);$("#"+elementId).css("top",y+"px").css("left",x+"px");$("#"+elementId).focus()}}function _cuPlayerFixX(x){return x+_cuPlayerFlashXMargin}function _cuPlayerFixY(y){return y+_cuPlayerFlashYMargin}function _cuPlayerAddPlayer(src,width,height,id,serverID,dispatcher,globalSprite,wmode,cssClass,bgcolor){if(wmode=="transparentOnPossiable"){wmode=_cuCanDoTransparentOverVideo()?"transparent":"window"}if(hasProductInstall){if(hasRequestedVersion){AC_FL_RunContent("src",src,"width",width,"height",height,"align","middle","id",id,"quality","high","bgcolor",bgcolor,"name",id,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer","play","true","loop","false","allowFullScreen","true","class",cssClass,"FlashVars","HTMLObjectID="+id+"&pageID="+pageID+"&serverID="+serverID+"&componentID="+componentID+"&configURL="+configURL+"&isDispatcher="+dispatcher+"&isGlobalSprite="+globalSprite+"","wmode",wmode)}else{if(_cuPlayerWroteProductInstall==true){return}_cuPlayerWroteProductInstall=true;var MMPlayerType=(isIE==true)?"ActiveX":"PlugIn";var MMredirectURL=window.location;document.title=document.title.slice(0,47)+" - Flash Player Installation";var MMdoctitle=document.title;AC_FL_RunContent("src","EnhancedPlayer/Resources/playerProductInstall","FlashVars","MMredirectURL="+MMredirectURL+"&MMplayerType="+MMPlayerType+"&MMdoctitle="+MMdoctitle+"","width",width,"height",height,"align","middle","id",id,"quality","high","bgcolor","#869ca7","name",id,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer")}}else{if(_cuPlayerWroteProductInstall==true){return}_cuPlayerWroteProductInstall=true;document.write(_cuPlayerAlternateContent)}}function _cuPlayerGetPageIDFromURL(){var queryParams=_cuPlayerGetQueryParams();if(queryParams.pageid!=null){return queryParams.pageid}return null}function _cuPlayerGetComponentIDFromURL(){var queryParams=_cuPlayerGetQueryParams();if(queryParams.componentid!=null){return queryParams.componentid}return null}function _cuPlayerGetQueryParams(){var _queryString=window.location.search.substring(1);var allParams={};var _params={};try{if(_queryString!=null&&_queryString.length>0){allParams=_queryString.split("&");for(var i=0,index=-1;i<allParams.length;i++){var keyValuePair=allParams[i];if((index=keyValuePair.indexOf("="))>0){var paramKey=keyValuePair.substring(0,index);var paramValue=keyValuePair.substring(index+1);if(paramKey!=null){paramKey=paramKey.toLowerCase()}_params[paramKey]=paramValue}}}}catch(er){}return _params}function _cuPlayerMakePlayerBackgroundImageObject(width,height,top,left,imageURL){var container=document.getElementById("cuPlayerPlayerContainer");if(_cuPlayerBackgroundContainer==null){_cuPlayerBackgroundContainer=document.getElementById("cuPlayerWMVBack");if(_cuPlayerBackgroundContainer==null){_cuPlayerBackgroundContainer=document.createElement("DIV");_cuPlayerBackgroundContainer.setAttribute("class","flashcontentPlayerBackground");document.appendChild(_cuPlayerBackgroundContainer)}}_cuPlayerResetElementPosition(top,left,container,_cuPlayerBackgroundContainer);_cuPlayerBackgroundContainer.width=width+"px";_cuPlayerBackgroundContainer.height=height+"px";_cuPlayerBackgroundContainer.style.width=width+"px";_cuPlayerBackgroundContainer.style.height=height+"px";if(imageURL!=null&&imageURL.length>0){_cuPlayerBackgroundContainer.innerHTML='<img src="'+imageURL+'" width="'+width+'" height="'+height+'" border="0"/>'}}function _cuCanDoTransparentOverVideo(){var userAgent=navigator.userAgent;if(userAgent.indexOf("MSIE")!=-1){return true}return false}var oldWidth=1;function _cuShowElement(elementID){var elem=document.getElementById(elementID);if(elem!=null&&elem.width<=1){elem.width=oldWidth}}function _cuHideElement(elementID){var elem=document.getElementById(elementID);if(elem!=null&&elem.width>1){oldWidth=elem.width;elem.width="1"}};