function createSilverlight()
{
	var scene = new configMgr.Page();
	Silverlight.createObjectEx({
		source: "/global/systemcenter/configurationmanager/en/us/RichMedia/demo/Page.xaml",
		parentElement: document.getElementById("923ff4cb-351e-43c3-b013-0b22d8fd915f"),
		id: "SilverlightControl",
		properties: {
			width: "750",
			height: "570",
			version: "1.0",
			isWindowLess:"true"

		},
		events: {
			onLoad: Silverlight.createDelegate(scene, scene.handleLoad)
		}
	});
}


if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
	return function() {
		return method.apply(instance, arguments);
	}
}

handleLoad: function(control, userContext, rootElement) 
{
this.downloader = control.createObject("downloader");  
this.downloader.addEventListener("completed",  Silverlight.createDelegate(this, this.handleFontDownloaded));
  this.downloader.open("GET", "SegoeSB.ttf");  this.downloader.send();
}

// Event handler for the Completed event.
function onCompleted(sender, eventArgs)
{
    // Retrieve the TextBlock object.
    var myTextBlock = sender.findName("myTextBlock");

    // Add the font files in the downloaded object to the TextBlock's type face collection.
    myTextBlock.setFontSource(sender);

    // Set the FontFamily property to the friendly name of the font.
    myTextBlock.fontFamily = "Showcard Gothic";

    myTextBlock.text = "Showcard Gothic";
}

window.onload = function(){
createSilverlight();
}