/*
Name: Flash_js.aspx - Flash Related JS Functions
*/
/*
Method: Flash_CheckVersion
Description: Pass in the version of flash you require.
Returns true if that version or newer is installed.
Note: Code based on macromedia article on flash detection
http://www.macromedia.com/support/director/ts/documents/playerdetection.htm
Code By: SG
*/
function Flash_CheckVersion(intVersion){
// Check browsers that support mimetypes
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]
&& navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
{
if (navigator.plugins && navigator.plugins["Shockwave Flash"]
&& (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf("."))
!= - 1) {
var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
var version = parseInt(versionString);
if(version>=intVersion){
blnReturnValue=true;
}else{
blnReturnValue=false;
}
}
}else{
// Check microsoft IE
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.userAgent.indexOf("Windows")>=0)){
document.write(' \n');
if(blnReturnValue!=true){
blnReturnValue=false;
}
}else{
// Flags 0 for browsers such as netscape 4.x
blnReturnValue=false;
}
}
return blnReturnValue;
}
/*
Method: CreateControl
Description: Pass in the properties of the flash you want to display.
writes out the flash object and embed tags.
Gets around displaying active content in IE.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp
Code By: BA
*/
function CreateControl(strMajorVersion, strWidth, strHeight, strFlashFile, strFlashVars, bolIsTransparent, strBGColor, strName)
{
if(bolIsTransparent)
{
document.write('');
}
else
{
document.write('');
}
}
function WriteControl(strFlashTag)
{
document.write(strFlashTag);
}
function FlashFix()
{
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
objects[i].outerHTML = objects[i].outerHTML;
}
}