var flashCompatibility = false;
var pluginVersion      = 0;
    MSDetect           = false;

if (navigator.mimeTypes && navigator.mimeTypes.length) {
  x = navigator.mimeTypes['application/x-shockwave-flash'];
  if (x && x.enabledPlugin) flashCompatibility = false;
  else flashCompatibility = true;
} else {
  MSDetect = true;
}
if (navigator.plugins && navigator.plugins.length > 0) {
  if (navigator.plugins["Shockwave Flash"]){
    var plugDesc = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0,plugDescLength=plugDesc.length; i < plugDescLength; ++i) {
      if (isNaN(parseInt(plugDesc[i]))) {
        continue;
      }
      this.pluginVersion = plugDesc[i];
    }
  }
}

function getMoodObj(swfPath,altImgPath) {
  var moodContent = '';
  if (pluginVersion >= 6) {
    moodContent = '<object '
      + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
      + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,30,0" '
      + 'width="415" '
      + 'height="173">'
      + '<param name="src"     value="' + swfPath + '">'
      + '<param name="quality" value="high">'
      + '<param name="bgcolor" value="#ffffff">'
      + '<param name="menu"    value="false">'
      + '<embed src="' + swfPath + '" '
      + 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" '
      + 'width="415" '
      + 'height="173" '
      + 'bgcolor="#ffffff" '
      + 'quality="high" '
      + 'menu="false" '
      + 'type="application/x-shockwave-flash">'
      + '</embed></object>'; 
  } else {
    moodContent = '<img src="' + altImgPath + '" width="415" height="173">';
  }
  return moodContent;
}
