

function checkPlugIn (vol) {
	target_flash_Ver = vol;
	
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

	if ( plugin ) {

		//plugin version check
		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]; 
		}

		FlashCanPlay = PluginVersion >= target_flash_Ver;

	}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {

		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & target_flash_Ver)))\n');
		document.write('</SCR' + 'IPT\> \n');

	}



}

function dispContent (flashDataObj,  NO_flashDataObj) {
	checkPlugIn(flashDataObj.swfVer);
	
	if (typeof(FlashCanPlay) == "undefined") FlashCanPlay = false;

	if ( FlashCanPlay ) {
		swfName = flashDataObj.swfName;
		swfWidth = flashDataObj.swfWidth;
		swfHeight = flashDataObj.swfHeight;
		swfBgColor = flashDataObj.swfBgColor;
		custom_embed(swfName, swfWidth, swfHeight, swfBgColor);
	} else{
		dispImage(NO_flashDataObj);
	}
}

function custom_embed(swfName, swfWidth, swfHeight, swfBgColor){
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+target_flash_Ver+",0,0,0' width=" + swfWidth + " height=" + swfHeight + ">");
	document.write("<param name=movie value=" + swfName + ">");
	document.write("<param name=bgcolor value=" + swfBgColor + ">");
	document.write("<param name=quality value=high>");
	document.write("<param name=wmode value=opaque>");
	document.write("<param name=menu value=false>");
	document.write("<embed src=" + swfName + " menu=false quality=high    pluginspage='http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' bgcolor=" + swfBgColor +" width=" + swfWidth + "  height=" + swfHeight + "></embed>"); 
	document.write("</object>");
}


function dispImage(NO_flashDataObj) {
	document.write(NO_flashDataObj);
}