if(!window.VideoPlayer){window.VideoPlayer={}}VideoPlayer=function(a){this.source="/silverlight/vplayer/video_player.xap";this.version="2.0.31005.0";this.container=a.container;this.defaultWidth=400;this.defaultHeight=300;this.width=(a.width)?a.width:this.defaultWidth;this.height=(a.height)?a.height:this.defaultHeight;this.thumbnail=(a.thumbnail)?a.thumbnail:"";this.clip=(a.clip)?a.clip:"";this.streamServer=(a.streamServer)?a.streamServer:"http://wmstream.pbid.com";this.streamInstance=(a.streamInstance)?a.streamInstance:"";this.mediaSource=(a.mediaSource)?a.mediaSource:"";this.color=(a.color)?a.color:"#999999";this.background=(a.background)?a.background:"#cccccc";this.adaptive=(a.adaptive)?a.adaptive:false;this.autoPlay=(a.autoPlay)?a.autoPlay:false;this.writePlayer()};VideoPlayer.INSTALL_REQUIRED="install";VideoPlayer.UPGRADE_REQUIRED="upgrade";VideoPlayer.RESTART_REQUIRED="restart";VideoPlayer.INSTALLING="installing";VideoPlayer.NOT_SUPPORTED="notSupported";VideoPlayer.prototype.writePlayer=function(){var a="install";var g={source:this.source,properties:{width:this.width,height:this.height,version:this.version,background:this.background,alt:a},initParams:"mediaSource="+this.mediaSource+",streamServer="+this.streamServer+",streamInstance="+this.streamInstance+",clip="+this.clip+",thumbnail="+this.thumbnail+",color="+this.color+",background="+this.background+",autoplay="+this.autoPlay+",adaptive="+this.adaptive};var f={install:"<p>The media you are trying to play requires that you update your Web browser with Microsoft Silverlight.</p>",upgrade:"<p>The media you are trying to play requires an updated version of Microsoft Silverlight.</p>",installing:"<p>The update is installing. Please wait for the installation to complete, then restart your Web browser. </p>",restart:"<p>The update is almost done. Please restart the Web browser to view the video.</p>",notSupported:"<p>This browser doesn't support Silverlight, sorry!</p>"};var d=document.getElementById(this.container);if(!d){alert("Silverlight could not find a DOM element with id '"+this.container+"'.");return}g.parentElement=null;var b=Silverlight.createObjectEx(g);if(b==a){if(!Silverlight.installControls){Silverlight.installControls=[]}Silverlight.installControls.push(this);d.innerHTML='<div class="slInstall"><div class="slInstallPosition"><div class="slInstallContent"><div class="slInstallTitle">Please install Silverlight 2</div><div class="slInstallDescription"></div><div class="slInstallButton"><a href="javascript:Silverlight.getSilverlight(\''+this.version+'\');"><img width="216" height="39" src="/silverlight/vplayer/button.png" /></a></div></div></div></div>';this.root=d;var e=this.root.getElementsByTagName("*");for(var c=0;c<e.length;c++){this[e[c].className]=e[c]}this.state=VideoPlayer.UPGRADE_REQUIRED;this.update=function(h){if(!h){h=this.state}this.state=h;this.slInstallDescription.innerHTML=f[h];if(this.thumbnail!=""){this.slInstall.style.background="#000000 url("+this.thumbnail+") no-repeat scroll left center"}}}else{d.innerHTML=b}};if(!window.Silverlight){window.Silverlight={}}Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(k){if(k==undefined){k=null}var n=false;var a=null;try{var g=null;var m=false;if(window.ActiveXObject){try{g=new ActiveXObject("AgControl.AgControl");if(k===null){n=true}else{if(g.IsVersionSupported(k)){n=true}}g=null}catch(j){m=true}}else{m=true}if(m){var h=navigator.plugins["Silverlight Plug-In"];if(h){if(k===null){n=true}else{var b=h.description;if(b==="1.0.30226.2"){b="2.0.30226.2"}var c=b.split(".");while(c.length>3){c.pop()}while(c.length<4){c.push(0)}var d=k.split(".");while(d.length>4){d.pop()}var l;var f;var i=0;do{l=parseInt(d[i]);f=parseInt(c[i]);i++}while(i<d.length&&l===f);if(l<=f&&!isNaN(l)){n=true}}}}}catch(j){n=false}return n};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else{setTimeout(Silverlight.WaitForInstallCompletion,3000)}}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else{if(window.navigator.mimeTypes){var d=navigator.mimeTypes["application/x-silverlight-2"];var a=navigator.mimeTypes["application/x-silverlight-2-b2"];var b=navigator.mimeTypes["application/x-silverlight-2-b1"];var c=b;if(a){c=a}if(!d&&(b||a)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else{if(d&&c){if(d.enabledPlugin&&c.enabledPlugin){if(d.enabledPlugin.description!=c.enabledPlugin.description){if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}}}}}}if(!Silverlight.disableAutoStartup){if(window.removeEventListener){window.removeEventListener("load",Silverlight.__startup,false)}else{window.detachEvent("onload",Silverlight.__startup)}}};if(!Silverlight.disableAutoStartup){if(window.addEventListener){window.addEventListener("load",Silverlight.__startup,false)}else{window.attachEvent("onload",Silverlight.__startup)}}Silverlight.createObject=function(a,j,c,h,l,f,g){var m=new Object();var d=h;var k=l;m.version=d.version;d.source=a;m.alt=d.alt;if(f){d.initParams=f}if(d.isWindowless&&!d.windowless){d.windowless=d.isWindowless}if(d.framerate&&!d.maxFramerate){d.maxFramerate=d.framerate}if(c&&!d.id){d.id=c}delete d.ignoreBrowserVer;delete d.inplaceInstallPrompt;delete d.version;delete d.isWindowless;delete d.framerate;delete d.data;delete d.src;delete d.alt;if(Silverlight.isInstalled(m.version)){for(var b in k){if(k[b]){if(b=="onLoad"&&typeof k[b]=="function"&&k[b].length!=1){var i=k[b];k[b]=function(n){return i(document.getElementById(c),g,n)}}var e=Silverlight.__getHandlerName(k[b]);if(e!=null){d[b]=e;k[b]=null}else{throw"typeof events."+b+" must be 'function' or 'string'"}}}slPluginHTML=Silverlight.buildHTML(d)}else{slPluginHTML=Silverlight.buildPromptHTML(m)}if(j){j.innerHTML=slPluginHTML}else{return slPluginHTML}};Silverlight.buildHTML=function(c){var b=[];b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(c.id!=null){b.push(' id="'+Silverlight.HtmlAttributeEncode(c.id)+'"')}if(c.width!=null){b.push(' width="'+c.width+'"')}if(c.height!=null){b.push(' height="'+c.height+'"')}b.push(" >");delete c.id;delete c.width;delete c.height;for(var a in c){if(c[a]){b.push('<param name="'+Silverlight.HtmlAttributeEncode(a)+'" value="'+Silverlight.HtmlAttributeEncode(c[a])+'" />')}}b.push("</object>");return b.join("")};Silverlight.createObjectEx=function(c){var b=c;var a=Silverlight.createObject(b.source,b.parentElement,b.id,b.properties,b.events,b.initParams,b.context);if(b.parentElement==null){return a}};Silverlight.buildPromptHTML=function(a){var d="";var c=Silverlight.fwlinkRoot;var b=a.version;if(a.alt){d=a.alt}else{if(!b){b=""}d="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";d=d.replace("{1}",b);d=d.replace("{2}",c+"108181")}return d};Silverlight.getSilverlight=function(c){if(Silverlight.onGetSilverlight){Silverlight.onGetSilverlight()}var a="";var e=String(c).split(".");if(e.length>1){var d=parseInt(e[0]);if(isNaN(d)||d<2){a="1.0"}else{a=e[0]+"."+e[1]}}var b="";if(a.match(/^\d+\056\d+$/)){b="&v="+a}Silverlight.followFWLink("114576"+b)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(b){var e;var d="";if(b==null){return null}for(var a=0;a<b.length;a++){e=b.charCodeAt(a);if(((e>96)&&(e<123))||((e>64)&&(e<91))||((e>43)&&(e<58)&&(e!=47))||(e==95)){d=d+String.fromCharCode(e)}else{d=d+"&#"+e+";"}}return d};Silverlight.default_error_handler=function(b,a){var c;var e=a.ErrorType;c=a.ErrorCode;var d="\nSilverlight error message     \n";d+="ErrorCode: "+c+"\n";d+="ErrorType: "+e+"       \n";d+="Message: "+a.ErrorMessage+"     \n";if(e=="ParserError"){d+="XamlFile: "+a.xamlFile+"     \n";d+="Line: "+a.lineNumber+"     \n";d+="Position: "+a.charPosition+"     \n"}else{if(e=="RuntimeError"){if(a.lineNumber!=0){d+="Line: "+a.lineNumber+"     \n";d+="Position: "+a.charPosition+"     \n"}d+="MethodName: "+a.methodName+"     \n"}}alert(d)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--){window["__slEvent"+a]=null}Silverlight._silverlightCount=0;if(window.removeEventListener){window.removeEventListener("unload",Silverlight.__cleanup,false)}else{window.detachEvent("onunload",Silverlight.__cleanup)}};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string"){a=b}else{if(typeof b=="function"){if(Silverlight._silverlightCount==0){if(window.addEventListener){window.addEventListener("onunload",Silverlight.__cleanup,false)}else{window.attachEvent("onunload",Silverlight.__cleanup)}}var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else{a=null}}return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(b,a){var d=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else{if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else{if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost())){d=true}}else{d=true}}}}catch(c){}return d};Silverlight.IsVersionAvailableOnLoad=function(a){var c=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost())){c=true}}catch(b){}return c};Silverlight.__verifySilverlight2UpgradeSuccess=function(b){var f=false;var a="2.0.31005";var d=null;try{if(b.IsVersionSupported(a+".99")){d=Silverlight.onRequiredVersionAvailable;f=true}else{if(b.IsVersionSupported(a+".0")){d=Silverlight.onRestartRequired}else{d=Silverlight.onUpgradeRequired}}if(d&&!Silverlight.__installationEventFired){d();Silverlight.__installationEventFired=true}}catch(c){}return f};if(!window.Silverlight){window.Silverlight={}}Silverlight.supportedUserAgent=function(h,j){try{var a=null;if(j){a=j}else{a=window.navigator.userAgent}var f={OS:"Unsupported",Browser:"Unsupported"};if(a.indexOf("Windows NT")>=0||a.indexOf("Mozilla/4.0 (compatible; MSIE 6.0)")>=0){f.OS="Windows"}else{if(a.indexOf("PPC Mac OS X")>=0){f.OS="MacPPC"}else{if(a.indexOf("Intel Mac OS X")>=0){f.OS="MacIntel"}else{if(a.indexOf("Linux")>=0){f.OS="Linux"}}}}if(f.OS!="Unsupported"){if(a.indexOf("MSIE")>=0){if(navigator.userAgent.indexOf("Win64")==-1){if(parseInt(a.split("MSIE")[1])>=6){f.Browser="MSIE"}}}else{if(a.indexOf("Firefox")>=0){var b=a.split("Firefox/")[1].split(".");var i=parseInt(b[0]);if(i>=2){f.Browser="Firefox"}else{var d=parseInt(b[1]);if((i==1)&&(d>=5)){f.Browser="Firefox"}}}else{if(a.indexOf("Safari")>=0){f.Browser="Safari"}}}}var c=(!(f.OS=="Unsupported"||f.Browser=="Unsupported"||(f.OS=="Windows"&&f.Browser=="Safari")||(f.OS.indexOf("Mac")>=0&&f.Browser=="MSIE")));if(h=="2.0"){return((c&&(f.OS!="MacPPC"&&f.OS!="Linux")))}else{if(h=="1.0"){return(c&&(a.indexOf("Windows NT 5.0")<0))}else{return(c)}}}catch(g){return false}};Silverlight.onGetSilverlight=function(){for(var a in Silverlight.installControls){Silverlight.installControls[a].update(VideoPlayer.INSTALLING)}};Silverlight.onRestartRequired=function(){for(var a in Silverlight.installControls){Silverlight.installControls[a].update(VideoPlayer.RESTART_REQUIRED)}};Silverlight.onUpgradeRequired=function(){for(var a in Silverlight.installControls){Silverlight.installControls[a].update(VideoPlayer.UPGRADE_REQUIRED)}};Silverlight.onInstallRequired=function(){for(var a in Silverlight.installControls){Silverlight.installControls[a].update(VideoPlayer.INSTALL_REQUIRED)}};function updateSilverlightState(){if(Silverlight.supportedUserAgent()){for(var a in Silverlight.installControls){Silverlight.installControls[a].update()}}else{for(var a in Silverlight.installControls){Silverlight.installControls[a].update(VideoPlayer.NOT_SUPPORTED)}}}updateSilverlightState();