$(function(){
	// Check Flash ----------------
	checkFlash();	
});

//------------------------------------------------------------
// Function
//------------------------------------------------------------

// swf出力JavaScript
function swfwrite(swffile, width, height, classid, codebase, id, quality, bgcolor, loop, menu){
	var workSWF = '<object classid="' + classid + '" '
		+ 'width="' + width + '" height="' + height + '"'
		+ 'codebase="' + codebase + '">'
		+ '<param name="movie" value="' + swffile + '" />'
		+ '<param name="quality" value="' + quality + '" />'
		+ '<param name="bgcolor" value="' + bgcolor + '" />'
		+ '<embed src="' + swffile + '" quality="' + quality + '" bgcolor="' + bgcolor + '" '
		+ 'width="' + width + '" height="' + height + '" name="' + id + '" align="" '
		+ 'play="true"'
		+ 'loop="' + loop + '"'
		+ 'menu="' + menu + '"'
		+ 'quality="' + quality + '"'
		+ 'allowScriptAccess="sameDomain"'
		+ 'type="application/x-shockwave-flash"'
		+ 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
		+ '<\/embed>'
		+ '<\/object>';
	document.write(workSWF);
}

// Flash version & plugin check
function checkFlash() {
	var requiredMajorVersion = 8;
	var requiredMinorVersion = 0;
	var requiredRevision = 0;
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if(!hasRightVersion) {
		//$('#headerFlash').load('noflash.html');
		$('#headerFlash').html('<p class="f2">当サイトを快適にご覧頂くために、最新のFlashプラグインのダウンロードをお勧めします。<a href="http://www.adobe.com/go/getflashplayer" target="_blank">ダウンロードはこちら</a></p>');
	}	
}

