function createSilverlight()
{	
    var rope = new Rope();   
	Silverlight.createObjectEx({
		source: 'Scene.xaml',
		parentElement: document.getElementById('SilverlightPlugInHost'),
		id: 'SilverlightPlugIn',
		properties: {
			width: '800',
			height: '400',
			background:'#ffffff',
            isWindowless: 'false',
			version: '1.0'
		},
		events: {
		    onError: null,			
			onLoad: Silverlight.createDelegate(rope, rope.onLoad)                    
		},		
		context: null 
	});
	
	checkWind.onclick = Silverlight.createDelegate(rope, rope.toggleWind)
}

if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
	return function() {
        return method.apply(instance, arguments);
    }
}


