if(typeof skcommon == 'undefined'){
	skcommon = {};
}
skcommon.get_flash_version = (function(){
  var version='0.0.0';
  if(navigator.plugins && navigator.mimeTypes['application/x-shockwave-flash']){
    var plugin=navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
    if (plugin && plugin.description) {
      version=plugin.description.replace(/^[A-Za-z\s]+/, '').replace(/(\s+r|\s+b[0-9]+)/, ".");
    }
  } else { // in the case of Win IE
    var x = '';
    try {
      var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
      x = axo.GetVariable("$version");
    } catch(e) {
      try {
        // for ver.6
        axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
        x = "WIN 6,0,21,0";
        /*
         * GetVariable() crashes player version 6.0.22-29, and
         * players which have those versions throws when access 
         * to AllowScriptAccess
         */
        axo.AllowScriptAccess = "always";
        x = axo.GetVariable("$version");
      } catch(e) {
        if (!x.match(/^WIN/)) {
          try {
            // for 4.x,5.x
            axo = null;
            axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
            // version 3 player throws when you call GetVariale().
            x = axo.GetVariable("$version");
          } catch(e) {
            if (axo) {
              // for 3.x
              x = "WIN 3,0,18,0";
            } else {
              try {
                // for 2.x
                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                x = "WIN 2,0,0,11";
              } catch(e) {
                x = "WIN 0,0,0,0";
              }
            }
          }
        }
      }
    }
    // convert ActiveX version string to our version string like '9.0.28'
    version=x.replace(/^WIN /,'').replace(/,[0-9]+$/,'').replace(/,/g,'.');
  }
  // check version string format
  // Quicktime enabled Safari returns a description in natural language
  if (version.match(/^[0-9]+\.[0-9]+\.[0-9]+$/)) {
    return version;
  } else {
    return '0.0.0';
  }
})();

(function(){
	if(!skcommon.get_flash_version.match(/^(9.)/)){
		document.getElementById('header-alert').style.width = '920px';
		document.getElementById('header-alert').style.border = 'solid 1px #999';
		document.getElementById('header-alert').style.color = '#F60';
		document.getElementById('header-alert').style.backgroundColor = '#FFD';
		document.getElementById('header-alert').style.padding = '9px 18px';
		document.getElementById('header-alert').style.overflow = 'hidden';
		document.getElementById('header-alert').style.margin = '0 auto 10px auto';
		document.getElementById('header-alert').style.fontWeight = 'bold';
		document.getElementById('header-alert').style.textAlign = 'center';
		document.getElementById('header-alert').innerHTML = '<span style="color:#666;">为了更好享受视听客，建议下载最新版本的Flash播放器。<br /><br />请进入<a style="color:#F60;" href="http://www.adobe.com/cn/" title="下载Adobe Flash播放器">中文版Adobe网站</a>，点击 <img src="/images/cn/media/get_adobe_flash_player.gif" /> 图标，下载最新版本的Flash播放器。</span>'
	}
})();