///////////////////////////////////////////////////////////////////////////////
//
//  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 VideoLibrary();
	Silverlight.createObjectEx(
	{
		source: "dox/dynamic/Scene.xaml.axd",
		parentElement: document.getElementById("SilverlightControlHost"),
		id: "SilverlightControl",
		properties: {
			width: "496px",
			height: "485px",
			version: "1.0",
			isWindowless:"true",
            background:"#00FFFFFF",
			inplaceInstallPrompt:true,     // Determines whether to display in-place install prompt if invalid version detected.
            enableHtmlAccess: true
		},
		events: 
		{   
		   onError: "OnErrorEventHandler", // Set the onError Handler
           onLoad: Silverlight.createDelegate(scene, scene.handleLoad)
		}
	});
}

//if (!window.Sys) 
//	window.Sys = {};
	
if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
   return function() {
      return method.apply(instance, arguments);
   }
}