function createSilverlight()
{
    Silverlight.createObjectEx({
        source: "xaml/plugin.xml",
        parentElement: document.getElementById("wpfeControl1Host"),
        id: "wpfeControl1",
        properties: {
            width: "1000",
            height: "700",
            version: "0.9",
            background: "black"
        },
        events: {
            onError: 'errorHandle', onLoad:root_Loaded},  
        initParams:null,
        context:null});
    
}

if (!window.Sys)
    window.Sys = {};
    
if (!window.Silverlight) 
    window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
    return function() {
        return method.apply(instance, arguments);
    }
}
