function is_flash () {
  if (navigator) {
    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
      return true;
    }
    if (navigator.plugins && navigator.plugins["Shockwave Flash"]) {
      return true;
    }
    try {
      var a = new ActiveXObject ("ShockWaveFlash.ShockWaveFlash");
      return true;
    } catch (x) {
    }
  }
  return false;
}

