//プラグイン検索を行う
function checkPlugin(mimeType, comNames){
	
	var comNames;
	
	comNames = [].concat(comNames);
	
	if(navigator.userAgent.indexOf('MSIE')==-1){
		return !!navigator.mimeTypes[mimeType];
	}
	
	for(var i=comNames.length-1 ; comNames[i] ; i-- ){
		try{
			new ActiveXObject(comNames[i]);
			return true;
		}catch(e){
		}
	}
	
	return false;
}

//Flashプラグイン検索を行い、プラグインが無い場合は画像を表示
function checkFlash(swfPath, imgFile) {
	
	var tag = "";
	
	
	if ( checkPlugin('application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash') ) {
		// プラグインあり
		AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','594','height','194','src',swfPath,'quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie',swfPath );
	} else {
		// プラグインなし
		tag = '<img src="';
		tag += imgFile;
		tag += '"/>';
		document.write(tag);
	}
	
}
