if (!window.Microsoft) var Microsoft = {}; if (!Microsoft.Mtps) Microsoft.Mtps = {}; if (!Microsoft.Mtps.Silverlight) Microsoft.Mtps.Silverlight = {}; if (!Microsoft.Mtps.Silverlight.SplashScreensLoaded) Microsoft.Mtps.Silverlight.SplashScreensLoaded = new Array(); Microsoft.Mtps.Silverlight.SplashScreenProgress = 0.3; Microsoft.Mtps.Silverlight.OnSourceDownloadProgressChanged = function(sender, e) { Microsoft.Mtps.Silverlight.SourceDownloadProgressChanged(sender, (e.progress ? e.progress : e.get_progress())); } Microsoft.Mtps.Silverlight.SetProgress = function(host, progress) { Microsoft.Mtps.Silverlight.SplashScreensLoaded[host] = ' ' + Math.round(progress * 1000); } Microsoft.Mtps.Silverlight.SourceDownloadProgressChanged = function(sender, progress) { var host = sender.GetHost(); var xLoadingArea = sender.findName('xLoadingArea'); var xProgressBarSize = sender.findName('xProgressBarSize'); var xProgressBarSizeWidth = sender.findName('xProgressBarSizeWidth'); var xProgressBar2Size = sender.findName('xProgressBar2Size'); var xProgressBar2SizeWidth = sender.findName('xProgressBar2SizeWidth'); var xProgressBar2SizeLeft = sender.findName('xProgressBar2SizeLeft'); var xProgressBarContainer = sender.findName('xProgressBarContainer'); var xProgressBar = sender.findName('xProgressBar'); var xProgressBar2 = sender.findName('xProgressBar2'); var xProgressBarText = sender.findName('xProgressBarText'); // determine the max progress progress = progress * Microsoft.Mtps.Silverlight.SplashScreenProgress; // Set the progress to get for the SL client Microsoft.Mtps.Silverlight.SetProgress(host, progress); // Update the bars & text var progressBarMaxWidth = xProgressBarContainer.ActualWidth - 2; xProgressBarSizeWidth.Value = Math.round(progressBarMaxWidth * progress); xProgressBarSize.Begin(); xProgressBar2SizeWidth.Value = Math.round((1 - progress) * progressBarMaxWidth); xProgressBar2SizeLeft.Value = Math.round((progressBarMaxWidth * progress)) + 2; xProgressBar2Size.Begin(); xProgressBarText.Text = Math.round(progress * 100) + ' percent'; Microsoft.Mtps.Silverlight.AlignRight(xProgressBarText, xLoadingArea); Microsoft.Mtps.Silverlight.SetProgress(sender.GetHost(), progress); } Microsoft.Mtps.Silverlight.OnSourceDownloadComplete = function(sender, e) { var xProgressBarContainer = sender.findName('xProgressBarContainer'); var xProgressBar = sender.findName('xProgressBar'); var progressBarMaxWidth = xProgressBarContainer.ActualWidth - 2; } MCWCSilverlightOnSplashScreenLoaded = Microsoft.Mtps.Silverlight.OnSplashScreenLoaded = function(sender) { var host = sender.GetHost(); host.OnSourceDownloadProgressChanged = Microsoft.Mtps.Silverlight.OnSourceDownloadProgressChanged; host.OnSourceDownloadComplete = Microsoft.Mtps.Silverlight.OnSourceDownloadComplete; var width = host.offsetWidth / 1; var height = host.offsetHeight / 1; var xLayoutRoot = sender.findName('xLayoutRoot'); xLayoutRoot.Width = width; xLayoutRoot.Height = height; var xLoadingArea = sender.findName('xLoadingArea'); xLoadingArea.Opacity = 0; Microsoft.Mtps.Silverlight.AlignCenter(xLoadingArea, xLayoutRoot); Microsoft.Mtps.Silverlight.AlignMiddle(xLoadingArea, xLayoutRoot); Microsoft.Mtps.Silverlight.SourceDownloadProgressChanged(sender, 0); var xLoadingShow = sender.findName('xLoadingShow'); xLoadingShow.Begin(); var xLoadingProgress = sender.findName('xLoadingProgress'); xLoadingProgress.Begin(); } Microsoft.Mtps.Silverlight.AlignRight = function(child, parent) { child.SetValue('Canvas.Left', parent.Width - child.ActualWidth); } Microsoft.Mtps.Silverlight.AlignCenter = function(child, parent) { child.SetValue('Canvas.Left', Math.round((parent.Width / 2.0) - (child.ActualWidth / 2.0))); } Microsoft.Mtps.Silverlight.AlignMiddle = function(child, parent) { child.SetValue('Canvas.Top', Math.round((parent.Height /2.0) - (child.ActualHeight / 2.0))); } Microsoft.Mtps.Silverlight.IsSplashScreenLoaded = function(plugin) { return Microsoft.Mtps.Silverlight.SplashScreensLoaded[plugin]; }; document.write(' Get Microsoft Silverlight ');