function createSilverlight(sourcePath, elemId, w, h)
{
	var scene = new SilverlightTest.Scene();
	Silverlight.createObjectEx({
		source: sourcePath,
		parentElement: document.getElementById(elemId),
		id: elemId,
		properties: {
			width: String(w),
			height: String(h),
			background:'#00000000',
            isWindowless: 'true',
			version: '2.0.31005.0'
		},
		events: {
		    onError: null,
			onLoad: Silverlight.createDelegate(scene, scene.handleLoad)
		},		
		context: null 
	});
}

if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
	return function() {
        return method.apply(instance, arguments);
    }
}