﻿var PlotSize = { Width:665, Height:450 };

function CreateSilverlightTrackPlugin( hostElement )
{  
    var now = new Date();

    Silverlight.createObject(
    
        GetApplicationRoot() +    // Source property value.
        "/Viz/PlotXaml.aspx" + 
        location.search + "&rand=" + now.getTime(),
                    
        hostElement,                       // DOM reference to hosting DIV tag.
        "TrackSilverlightPlugin",         // Unique plug-in ID value.
        {                               // Per-instance properties.
            width:PlotSize.Width+'',                // Width of rectangular region of 
                                        // plug-in area in pixels.
            height:PlotSize.Height+'',               // 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:'#FFFFFF',       // Background color of plug-in.
           
            isWindowless:'true',       // 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:LoadTrackData             // OnLoad property value -- 
                                        // event handler function name.
        },
        null);                          // Context value -- event handler function name.
}




