﻿///////////////////////////////////////////////////////////////////////////////
//
//  Silverlight.supportedUserAgent.js   	version 2.0.40211.0
//
//  This file is provided by Microsoft as a helper file for websites that
//  incorporate Silverlight Objects. This file is provided under the Microsoft
//  Public License available at 
//  http://code.msdn.microsoft.com/SLsupportedUA/Project/License.aspx.  
//  You may not use or distribute this file or the code in this file except as 
//  expressly permitted under that license.
// 
//  Copyright (c) Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// supportedUserAgent:
//
// NOTE: This function is strongly tied to current implementations of web 
// browsers. The implementation of this function will change over time to 
// account for new Web browser developments. Visit 
// http://code.msdn.microsoft.com/SLsupportedUA often to ensure that you have
// the latest version.
//
// Determines if the client browser is supported by Silverlight. 
//
//  params:
//   version [string] 
//         determines if a particular version of Silverlight supports
//         this browser. Acceptable values are "1.0" and "2.0"
//   userAgent [string]
//         optional. User Agent string to be analized. If null then the
//         current browsers user agent string will be used.
//
//  return value: boolean
//
///////////////////////////////////////////////////////////////////////////////
if (!window.Silverlight) { window.Silverlight = {} } Silverlight.supportedUserAgent = function (h, j) { try { var a = null; if (j) { a = j } else { a = window.navigator.userAgent } var f = { OS: "Unsupported", Browser: "Unsupported" }; if (a.indexOf("Windows NT") >= 0 || a.indexOf("Mozilla/4.0 (compatible; MSIE 6.0)") >= 0) { f.OS = "Windows" } else { if (a.indexOf("PPC Mac OS X") >= 0) { f.OS = "MacPPC" } else { if (a.indexOf("Intel Mac OS X") >= 0) { f.OS = "MacIntel" } else { if (a.indexOf("Linux") >= 0) { f.OS = "Linux" } } } } if (f.OS != "Unsupported") { if (a.indexOf("MSIE") >= 0) { if (navigator.userAgent.indexOf("Win64") == -1) { if (parseInt(a.split("MSIE")[1]) >= 6) { f.Browser = "MSIE" } } } else { if (a.indexOf("Firefox") >= 0) { var b = a.split("Firefox/")[1].split("."); var i = parseInt(b[0]); if (i >= 2) { f.Browser = "Firefox" } else { var d = parseInt(b[1]); if ((i == 1) && (d >= 5)) { f.Browser = "Firefox" } } } else { if (a.indexOf("Safari") >= 0) { f.Browser = "Safari" } } } } var c = (!(f.OS == "Unsupported" || f.Browser == "Unsupported" || (f.OS == "Windows" && f.Browser == "Safari") || (f.OS.indexOf("Mac") >= 0 && f.Browser == "MSIE"))); if (h == "2.0") { return ((c && (f.OS != "MacPPC" && f.OS != "Linux"))) } else { if (h == "1.0") { return (c && (a.indexOf("Windows NT 5.0") < 0)) } else { return (c) } } } catch (g) { return false } };