// Flash Player プラグインチェック
var plugCheck = true;
	var MM_contentVersion = 7;
	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 MM_PluginVersion = words[i]; 
		    }
		var MM_FlashCanPlay = MM_PluginVersion >= MM_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('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
	if ( ! MM_FlashCanPlay ) {
		plugCheck = false;
	}

function swfOnOff() {
	if (plugCheck == false) {
		document.getElementById('fla').style.display='none';
	}else{
		document.getElementById('nonFla').style.display='none';
	}
}


(function() {

    window.onload   = onWindowResize;
    window.onresize = onWindowResize;

    var FLASH_MIN_WIDTH  = 1024;
    var FLASH_MIN_HEIGHT  = 752;

    function onWindowResize() {
        var window_width =  ( window.innerWidth ) ? window.innerWidth :
                            ( document.documentElement ) ? document.documentElement.clientWidth :
                            ( document.body )            ? document.body.clientWidth : 0;
        var window_height =  ( window.innerHeight ) ? window.innerHeight :
                            ( document.documentElement ) ? document.documentElement.clientHeight :
                            ( document.body )            ? document.body.clientHeight : 0;

        var flashwrapper = document.getElementById("fla");

        if ( flashwrapper ) {
            var targetWidth = window_width;
            var targetHeight = window_height;

            if ( window_width < FLASH_MIN_WIDTH ) {
                targetWidth = FLASH_MIN_WIDTH + "px";
            }
            else {
                targetWidth = "100%";
            }
            flashwrapper.style.width = targetWidth;

            if ( window_height < FLASH_MIN_HEIGHT ) {
                targetHeight = FLASH_MIN_HEIGHT + "px";
            }
            else {
                targetHeight = "100%";
            }
            flashwrapper.style.height = targetHeight;
        }
    }
}());







