/**
 * swfobject.execute.js
 * @version	1.0.0.0 - 0:02 2009/01/31
 * @see		SWFObject JavaScript API documentation
 * 			http://code.google.com/p/swfobject/wiki/api
 * @usage	swfobject.embedSWF(
				swfURL:String,
				replaceElementId:String,
				width:String,
				height:String,
				playerVersion:String,
				expressInstallSwfUrl:String,
				flashvars:Object,
				params:Object,
				attributes:Object
			);
 */

(function() {
	
	var swfurl        = './f/index.swf';
	var elementId     = 'flashcontent';
	var swfwidth      = '720';
	var swfheight     = '672';
	var playerversion = '9.0.45';
	
	// Express Install を使わずに代替コンテンツを表示する場合は null
	var expressInstall = null;
	// var expressInstall = './lib/swfobject2.2/expressInstall.swf';

	var flashvars = {};

	var params = {
		// allowScriptAccess: 'always',
		base: '.',
		bgcolor: '#ffffff',
		menu: 'false',
		quality: 'high',
		wmode: 'transparent',
		scale: 'noScale',
		salign: 'TL'
	};

	var attributes = {
		// id: elementId;
		// name: elementId;
	};
	
	/**
	 * Flashが再生可能な場合の処理
	 */
	if (swfobject.hasFlashPlayerVersion(playerversion)) Kaas.load.css('css/fullscreen.css');
	swfobject.embedSWF(swfurl, elementId, swfwidth, swfheight, playerversion, expressInstall, flashvars, params, attributes);
	
	/**
	 * FF用 height: 100%の時、swfobjectがうまく動かないバグフィックス
	var resized = function() {
		document.getElementById(elementId).setAttribute('height', windowSize().height);
	};
	
	var windowSize = function() {
		var w = {};
		w.width = window.innerWidth || document.body.clientWidth;
		w.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
		return w;
	};
	
	Kaas.ready(function() {
		if (Kaas.browser.Gecko) {
			resized();
			window.onresize = resized;
		}
	});
	 */

})();
