﻿//if (!window.Server.App)
//	window.Server.App = {};

//Server.App.SplashScreen = function() 
//{
//}

//Server.App.SplashScreen.prototype =
//{
//	handleLoad: function(plugIn, userContext, rootElement) 
//	{
//		this.plugIn = plugIn;
//		
//		// Sample button event hookup: Find the button and then attach event handlers
//		// this.button = rootElement.children.getItem(0);	
//		
//		// this.button.addEventListener("MouseDown", Silverlight.createDelegate(this, this.handleMouseDown));
//	}
//	
//	// Sample event handler
//	//handleMouseDown: function(sender, eventArgs) 
//	//{
//	//}
//}


function onSourceDownloadProgressChanged(sender, eventArgs) 
{
    //sender.findName("progressText").Text = Math.round((eventArgs.progress * 100)) + "% downloaded ...";

    var rectBar = sender.findName("rectBar");
    var rectBorder = sender.findName("rectBorder");

    if (eventArgs.progress)
        rectBar.Width = eventArgs.progress * rectBorder.Width;
    else 
        rectBar.Width = eventArgs.get_progress() * rectBorder.Width; 
}

