flash_versions = 20;

var flash = new Object();
flash.installed=false;
flash.version='0.0';

if (navigator.plugins && navigator.plugins.length) {
  for (x=0; x < navigator.plugins.length; x++) {
    if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
      flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
      flash.installed = true;
      break;
    }
  }
}

else if (window.ActiveXObject) {
  for (x = 2; x <= flash_versions; x++) {
    try {
      oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
      if(oFlash) {
        flash.installed = true;
        flash.version = x + '.0';
      }
    }
    catch(e) {}
  }
}

flash.ver = Array();
for(i = 4; i <= flash_versions; i++) {
  eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
}

function getmood(version,flashname,vars,wmode,theHeight,width,altpicture,lang){

  ua = navigator.userAgent.toLowerCase();
  isSaf = (ua.indexOf('safari') != - 1);

  if (flash.ver[version] && flashname!="" && theHeight!="" && width!=""){
    ShowFlash = true;
  }else {
	ShowFlash = false;
  }

  if (ShowFlash) {
    document.write('<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ');
    document.write('codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ');
    document.write('WIDTH=\"'+width+'\" HEIGHT=\"'+theHeight+'\" id=\"pxd\" ALIGN=\"\"> ');
    document.write('<param name=movie VALUE=\"'+flashname+vars+'\" /> ');
    document.write('<param name=quality VALUE=high /> ');
    document.write('<param name=\"scale\" value=\"noscale\" /> ');
    document.write('<param name=\"wmode\" value=\"'+wmode+'\" /> ');
    document.write('<param=\"bgcolor\" value=\"#FFF\" /> ');
    document.write('<EMBED src=\"'+flashname+vars+'\" quality=\"high\" scale=\"noscale\" wmode=\"'+wmode+'\" ');
    document.write('bgcolor=\"#FFF\"  WIDTH=\"'+width+'\" HEIGHT=\"'+theHeight+'\" NAME=\"pxd\" ALIGN=\"\" ');
    document.write('TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED> ');
    document.write('</OBJECT>');    
    
  } else {
	if (altpicture == 'flashdownload') {
      var text;
      if(lang==1) text="Um dieses Flash sehen zu können, <br />benötigen Sie einen Flash Player ab Version 7.";
      else text="To view this Flash, <br />you need to install Flash Player version 7 or higher.";
      document.write('<div style="width: '+width+'px; height:'+theHeight+'px"><div id="noflash" style="width: '+width+'px; height:'+theHeight+'px"><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="images/flashplayer.gif" alt="Flashplayer herunterladen" title="Flashplayer herunterladen" border="0"></a><br/>'+text+'</div></div>');
    } else {
      document.write('<a href=\"#\"><img src=\"'+altpicture+'\" alt=\"\" border=\"0\" width=\"'+width+'\" height=\"'+theHeight+'\"></a>');
    }  
  }
  
}