///////////////////////////////////////////////////////////////////////////////
//
//  CreateSilverlight.js   version 0.9
//
//  This file is provided by Microsoft as a helper file for websites that
//  incorporate Silverlight Objects. The default parameters below comply with 
//  Silverlight v1.0 Beta, which exposes 0.9 as its version number.     
//  This file is provided as is.
// 
// © 2007 Microsoft Corporation. All Rights Reserved.
//
// This file is licensed as part of the Silverlight 1.0 SDK
// , for details look here: http://go.microsoft.com/fwlink/?LinkID=89144&clcid=0x409
//
///////////////////////////////////////////////////////////////////////////////


// JScript source code

//contains calls to silverlight.js, examples are below

function createSilverlight()
{  
                                                               
    Silverlight.createObjectEx(
        {source: 'SimpleLabel.xml'
            , parentElement:  document.getElementById('theDiv')
            , id:'theHost'
            , properties:{width:'700'
                    , height:'700'
                    , background:'White'
                    , isWindowless:'false'
                    , framerate:'24'
                    , version:'0.90.0'}
            , events: {onError:null, onLoad: handleLoad}
            , context:null
         });
    
}
function handleLoad(sender,args,root)
{
    // DragLabel
    var _dde = new RHPConsulting.SilverlightDragDropExtender();
    _dde.Initialize(root.findName("DragLabel"), root.findName("DragHandle"));
    _dde.set_Opacity(0.5);
    
    // DragLabel1
    var _dde = new RHPConsulting.SilverlightDragDropExtender();
    _dde.Initialize(root.findName("DragLabel1"), root.findName("DragHandle1"));
    _dde.set_Opacity(0.5);
 
}

if (!window.Silverlight) 
	window.Silverlight = {};

Silverlight.createDelegate = function(instance, method) {
	return function() {
        return method.apply(instance, arguments);
    }
}
