///////////////////////////////////////////////////////////////////////////////
//
//  installcreatesilverlight.js   			version 1.0
//
//  This file is provided by Microsoft as a helper file for websites that
//  incorporate Silverlight Objects. This file is provided under the Silverlight 
//  SDK 1.0 license available at http://go.microsoft.com/fwlink/?linkid=94240.  
//  You may not use or distribute this file or the code in this file except as 
//  expressly permitted under that license.
// 
//  Copyright (c) 2007 Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
if(!window.Silverlight)
    window.Silverlight={};

Silverlight.InstallAndCreateSilverlight = function(version, SilverlightDiv, installExperienceDiv, installPromptDivId, createSilverlightDelegate, param)
{
	if (Silverlight.isInstalled(version))
	{
		createSilverlightDelegate(param);
	}
	else
	{
		if (installExperienceDiv && SilverlightDiv)
		{
			SilverlightDiv.innerHTML = installExperienceDiv.innerHTML;
		}

		if (installPromptDivId)
		{
			var installPromptDiv = document.getElementById(installPromptDivId);
			if (installPromptDiv)
			{
				installPromptDiv.innerHTML = Silverlight.createObject(null, null, null, { version: version, inplaceInstallPrompt: true }, {}, null);
			}
		}
	}
}