home *** CD-ROM | disk | FTP | other *** search
- //<script>
- // Windows Media Player - Copyright 2000 Microsoft Corporation.
-
- function InitOCXSkin()
- {
- InitVisualizations();
-
- // IE Bug: We do this so that we don't have to change the size synchronously
- // from the OnLoad event...
-
- svLayoutSize.moveTo( svLayoutSize.left, svLayoutSize.top, 10 );
- }
-
- function InitVisualizations()
- {
- if (osMediaOpen == player.OpenState)
- {
- if (player.currentMedia.ImageSourceWidth > 0)
- {
- svVisual.visible=false;
- svVideo.visible=true;
- }
- else
- {
- svVideo.visible=false;
- svVisual.visible=mediacenter.showEffects;
- }
- }
- else
- {
- svVideo.visible=false;
- svVisual.visible=false;
- }
- }
-
- function OnPlayStateChangeViz()
- {
- InitVisualizations();
- AutoSize();
- }
-
- function OnOpenStateChangeViz()
- {
- OnPlayStateChangeViz();
- }
-
- function AutoSize()
- {
- if (osMediaOpen == player.OpenState)
- {
- if (player.currentMedia.ImageSourceWidth > 0)
- {
- // Resize layout to match the video size
- view.height = player.currentMedia.ImageSourceHeight + svTransport.height + svBanner.height;
-
- // clip to the transport controls width
- if ((0 == svTransport.width) || (player.currentMedia.ImageSourceWidth > svLayoutSize.width))
- {
- view.width = player.currentMedia.ImageSourceWidth;
- }
- else
- {
- view.width = svLayoutSize.width;
- }
- }
- else
- {
- // Resize layout to original size
- view.width = svLayoutSize.width;
- view.height = svLayoutSize.height;
- }
- }
- }
-
- function CheckForAdBanner(media)
- {
- var oldHeight = svBanner.height;
- if (media.getItemInfo('BannerURL') != '')
- {
- AdBanner.image="WMPImage_AdBanner";
- svBanner.height=AdBanner.height;
- AdBanner.tabStop=true;
- }
-
- else
- {
- svBanner.height=0;
- AdBanner.tabStop=false;
- }
- if (svBanner.height!=oldHeight)
- {
- svVideo.height = view.height - svTransport.height - svBanner.height;
- svVisual.height = view.height - svTransport.height - svBanner.height;
- svBanner.top = svVideo.top + svVideo.height;
- }
- }
-
- function OnBannerClick()
- {
- if (player.openState==osMediaOpen)
- {
- var strTargetURL = player.currentmedia.getItemInfo("BannerInfoURL");
- if ( strTargetURL != "")
- {
- player.launchURL(strTargetURL);
- }
- }
- }
-
- function OnBannerMouseOver()
- {
- if (player.openState==osMediaOpen)
- {
- if ( player.currentmedia.getItemInfo("BannerInfoURL") != "")
- {
- AdBanner.cursor = "hand";
- }
- else
- {
- AdBanner.cursor = "system";
- }
- }
- }
-
-