﻿//FLASHプラグインチェック
var contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var PluginVersion = words[i]; 
	    }
	var FlashCanPlay = (PluginVersion >= contentVersion);
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');//FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}


var flashurl = ["/cn/image/ols4000.swf"];
flashurl = flashurl[Math.floor(Math.random() * 1)];

function mov_write(){
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="630" height="200"><param name="quality" value="high"><PARAM NAME="menu" VALUE="false"><PARAM NAME="devicefont" VALUE="true">');
document.write('<param name="movie" value="' + flashurl + '">');
document.write('<param name="wmode" value="opaque" / >');
document.write('<embed src="' + flashurl + '" quality="high" menu="false" devicefont="true" swLiveConnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="630" height="200"></embed>');
document.write('</object>');}

function img_write(){
	document.write('<a href="/cn/product/ols4000/index.cfm"><img src="/cn/image/ols4000.jpg" alt="3D测量激光共焦显微镜 LEXT OLS4000" title="3D测量激光共焦显微镜 LEXT OLS4000" width="630" height="200" border="0"></a>');
}

nn4_check = navigator.userAgent.indexOf('Mozilla/4.7')>=0;

if(nn4_check >= 1){
	img_write();
}else if(FlashCanPlay == true){
	mov_write();
}else{
	img_write();
}