// JScript source code

//contains calls to silverlight.js, examples are below

//setting the alpha-channel in the 'background' parameter drastically affects the cost of rendering
function ltCreateSilverlight(xamlFile, parentElement, pluginID, height, width, background)
{
    Silverlight.createObject(
        xamlFile, 
        parentElement, 
        pluginID,
        {
            width: width,
            height: height,
            inplaceInstallPrompt: true,
            background: background,
            isWindowless:'false',
            framerate:'24',
            version:'1.0'
        },
        {
            onError:null,
            onLoad:null
        },
        null
    );
        
}

function createMySilverlightPlugin()
{  
    Silverlight.createObject(
        'xaml/myxaml.xaml',             // Source property value.
        parentElement,                  // DOM reference to hosting DIV tag.
        "mySilverlightPlugin",          // Unique plug-in ID value.
        {                               // Per-instance properties.
            width:'400',                // Width of rectangular region of 
                                        // plug-in area in pixels.
            height:'400',               // Height of rectangular region of 
                                        // plug-in area in pixels.
            inplaceInstallPrompt:false, // Determines whether to display 
                                        // in-place install prompt if 
                                        // invalid version detected.
            background:'gray',
            isWindowless:'false',       // Determines whether to display plug-in 
                                        // in Windowless mode.
            framerate:'24',             // MaxFrameRate property value.
            version:'1.0'               // Silverlight 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.
}



