///////////////////////////////////////////////////////////////////////////////
//
//  default.xaml.js
//

function createSilverlight()
{
    var scene = new Clock();
    Silverlight.createObjectEx({
        source:'xaml/clock.xaml',
        parentElement: AgControl1Host,
        id:'AgControl1',
        properties: {
            width:'250',
            height:'150',
            background:'#00000000',
            isWindowless: 'true',
            framerate:'30',
            version:'0.8' },
        events: { 
            onError: 'errorHandle', onLoad: Silverlight.createDelegate(scene, scene.handleLoad) 
        },
        context:null });
}
if (!window.Sys)
    window.Sys = {};
    
if (!window.Silverlight) 
    window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
    return function() {
        return method.apply(instance, arguments);
    }
}
