fb.js 1.4 KB

1234567891011121314151617181920212223242526
  1. try{(function(){function init(){var flashEl=document.getElementById('cFlashDiv');var isFlash=checkFlash();if(isFlash){var addHtml=flashHTML();flashEl.innerHTML=addHtml;};}
  2. function flashHTML(){var isIE=checkIE();var result='';if(isIE){result=''
  3. +'<object '
  4. +'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
  5. +'width="1" height="1" id="BAIDU_CLB_ac_o_flash" title="BAIDU_CLB_ac_o_flash" align="middle"> '
  6. +'<param name="allowScriptAccess" value="samedomain" />'
  7. +'<param name="movie" value="c.swf?v=3">'
  8. +'<param name="quality" value="high">'
  9. +'<param name="wmode" value="transparent" >'
  10. +'</object>';}
  11. else{result=''
  12. +'<embed wmode="transparent" src="c.swf?v=3" '
  13. +'" quality="high" name="BAIDU_CLB_ac_o_flash_embed" '
  14. +'id="BAIDU_CLB_ac_o_flash" '
  15. +'swliveconnect="true" quality="high" '
  16. +'width="1" height="1" '
  17. +'align="middle" '
  18. +'allowScriptAccess="samedomain" '
  19. +'hasPriority="false" '
  20. +'type="application/x-shockwave-flash" >';}
  21. return result;}
  22. function checkIE(){var ua=navigator.userAgent;var reg=window['RegExp'];if(/msie (\d+\.\d)/i.test(ua)){return true;}
  23. return false;}
  24. function checkFlash(){var isIE=checkIE();if(isIE){var swf=new ActiveXObject('ShockwaveFlash.ShockwaveFlash');if(swf){return true;}}else{if(navigator.plugins&&navigator.plugins.length>0&&navigator.plugins["Shockwave Flash"]){return true;}}
  25. return false;}
  26. init();})();}catch(e){}