﻿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, innerHTML) {
    var divString = "";
    if (flashOK) {
        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=scale VALUE=exactfit> <PARAM NAME=bgcolor VALUE=#FFFFFF>  '; 
        divString += ' <EMBED src="' + swfFile + '" quality=high scale=exactfit bgcolor=#FFFFFF  ';
        divString += ' swLiveConnect=FALSE WIDTH="' + width + '" HEIGHT="' + height + '" NAME="banner" ALIGN=""';
        divString += ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
        divString += ' </EMBED>';
        divString += ' </OBJECT>';
    } 
    else {
		if (innerHTML + "" == "undefined") 
		{
			var useMapString = (useMap + "" != "undefined") ? "usemap='#" + useMap + "'" : "";
			divString += '<IMG SRC="' + alt + '" WIDTH="' + width + '" HEIGHT="' + height + '" BORDER="0" ' + useMapString + '>';
        }
        else
        {
			divString = innerHTML;
        }
    }
    document.getElementById(divId).innerHTML = divString;
}

function openWindow(url, name, width, height) 
{
	window.open(url, name, 'width=' + width + ',height=' + height + ',resizable=no,scrollbars=yes,menubar=no');
}