///////////////////////////////////////////////////////////////////////////////
//
//  installexperiencehtml.js   			version 1.0
//
//  This file is provided by MediaCorp Technologies as a standard Silverlight installation experience
//  for all sites that is using Silverlight
// 
//  Copyright (c) 2008 MediaCorp Technologies. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////

doInstallExperienceHtml=function	()
{

	//Create our install experience html
	var installExperienceHTML='';   //Need to assign variable to empty string otherwise will get js undefined error
	installExperienceHTML +='<div id="InstallPromptDiv" class="divInstallPrompt"></div>';
	installExperienceHTML +='<div id="PostInstallGuidance" class="divPostInstallGuidance"></div>';

	//calls installandcreatesilverlight method to instantiate silverlight once it is installed
	Silverlight.InstallAndCreateSilverlight
	(
		'1.0', 
		$('divSilverlightVideoHost'), 
		installExperienceHTML,
		'InstallPromptDiv',
		createSilverlight
	);
			
	//place text below the install medallion to inform the users what to do after installation
	var postInstallGuidance = $('PostInstallGuidance');
		
	if (postInstallGuidance)
	{
		if (Silverlight.ua.Browser=="MSIE")
		{
			if (Silverlight.available)
			{
				postInstallGuidance.innerHTML="Please restart your browser after installation.";
			}
			else
			{
				postInstallGuidance.innerHTML= "";
			}
		}
		else if (Silverlight.ua.Browser=="Firefox" || Silverlight.ua.Browser=="Safari")
		{
			postInstallGuidance.innerHTML="Please restart your browser after installation.";
		}
		else
		{
			postInstallGuidance.innerHTML="Your browser may not be supported by Microsoft Silverlight.<br />Please visit http://www.microsoft.com/silverlight/system-requirements.aspx for more information.";
		}
	}
}