/*flash plug-in check JS 20050128 Edited for MARUKO WEBSITE.*/
//
var flashVersion=false;
var nn=(navigator.appName.charAt(0)=="N");
var n6=(document.getElementById && nn) || false;
var ie=(document.all && !nn) || false;
var mac=(navigator.userAgent.indexOf("Mac")!=-1) || false;
var ver=""+navigator.appVersion;
var fno=ver.indexOf(" ");
var macChecked=0;
var opera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
ver=eval(ver.substring(0,fno));
if (ie && !opera && !mac)
	{
		var flashVersion=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();
        	flashVersion=Math.floor(flashVersion / 0x10000);
	}
if (!flashVersion)
		{
			if (nn && !document.plugins) flashVersion=false;
			else if ((nn || n6) && navigator.plugins) {
				var plugin = ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ?
				navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0 );
				flashVersion = parseInt(plugin.description.match(/\d+\.\d+/));
			} else if (opera && navigator.plugins) {
				var plugin = ( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ?
				navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0 );
				flashVersion = parseInt(plugin.description.match(/\d+\.\d+/));
			}
			else flashVersion=false;
		}
if (ie && mac) window.onload=chkMac;
		
function chkMac()
	{
		if (window["sample"]) flashVersion=((window["sample"].FlashVersion() & 0xffff0000) >> 16);
		macChecked=1;
		result();
	}
	
//this function should be inserted into head tag//
//The variable "flashVersion" is relevant to the version of Flash accepted.//
function result()
	{
		if (mac && ie && macChecked==0) return;
		if (!flashVersion) location.replace("noflash.html");
		if (flashVersion<=8) location.replace("noflash.html");
}