///////////////////////////////////////////////////////////////////////////////
//
//  default.html.js
//
//
// © 2007 Microsoft Corporation. All Rights Reserved.
//
// This file is licensed as part of the Silverlight 1.0 SDK, for details look
// here: http://go.microsoft.com/fwlink/?LinkID=89144&clcid=0x409
//
///////////////////////////////////////////////////////////////////////////////

function createSilverlight()
{
	var scene = new slPad();
	Sys.Silverlight.createObjectEx({
		source: "Scene.xaml",
		parentElement: document.getElementById("SilverlightControlHost"),
		id: "SilverlightControl",
		properties: {
			width: "100%",
			height: "100%",
			version: "0.9",
			background: "#FF333333",
			isWindowless: true
		},
		events: {
			onLoad: Sys.Silverlight.createDelegate(scene, scene.handleLoad)
		}
	});
}

if (!window.Sys)
	window.Sys = {};
	
if (!window.Silverlight) 
	window.Silverlight = {};

Sys.Silverlight.createDelegate = function(instance, method) {
	return function() {
        return method.apply(instance, arguments);
    }
}