﻿function createSilverlight()
{  
    Sys.Silverlight.createObject(
        "plugin.xaml",                      // Source property value.
        parentElement,                      // DOM reference to hosting DIV tag.
        "myControl",                        // Unique control id value.
        {                                   // Control properties.
            width:'1024',                   // Width of rectangular region of control in pixels.
            height:'530',                   // Height of rectangular region of control in pixels.
            inplaceInstallPrompt:true,     // Determines whether to display in-place install prompt if invalid version detected.
            background:'white',             // Background color of control.
            isWindowless:'false',           // Determines whether to display control in Windowless mode.
            framerate:'24',                 // MaxFrameRate property value.
            version:'0.9'                   // Control version to use.
        },
        {
            onError:null,                   // OnError property value -- event handler function name.
            onLoad:null                     // OnLoad property value -- event handler function name.
        },
        null);                              // Context value -- event handler function name.
}
