﻿var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var flashOK = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('flashOK = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}



function showFlash(divId, swfFile, width, height, alt, useMap, altText) {
    var divString = "";
    if (flashOK && (swfFile.indexOf(".swf") != -1)) {
        divString += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
        divString += '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ';
        divString += ' ID="banner" WIDTH="' + width + '" HEIGHT="' + height + '" ALIGN="">';
        divString += ' <PARAM NAME=movie VALUE="' + swfFile + '"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>  '; 
        divString += ' <param name="wmode" value="transparent" /> ';
        divString += '  <param name="scale" value="noscale" />';
		divString += ' <param name="salign" value="lt" />';
        divString += ' <EMBED src="' + swfFile + '" scale="noscale" salign="lt" wmode="transparent" quality=high  bgcolor=#FFFFFF  ';
        divString += ' swLiveConnect=FALSE WIDTH="' + width + '" HEIGHT="' + height + '" NAME="banner" ';
        divString += ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
        divString += ' </EMBED>';
        divString += ' </OBJECT>';
    } 
    else {
		if (altText + "" == "undefined") {
			if (useMap.indexOf(".") == -1) 
			{
				var useMapString = (useMap + "" != "undefined") ? "usemap='#" + useMap + "'" : "";
				divString += '<IMG SRC="' + alt + '" WIDTH="' + width + '" HEIGHT="' + height + '" BORDER="0" ' + useMapString + '>';
			}
			else
			{
				divString += '<a href="' + useMap + '"><IMG SRC="' + alt + '" WIDTH="' + width + '" HEIGHT="' + height + '" BORDER="0" ' + useMapString + '></a>';
			}
        }
        else
        {
			divString = altText;
        }
    }
    document.getElementById(divId).innerHTML = divString;
}