﻿//ブラウザ判定
function isWin () { return (navigator.appVersion.indexOf ("Win") != -1); }
function isMac () { return (navigator.appVersion.indexOf ("Mac") != -1); }
function isIE () { return (navigator.appName.indexOf ("Explorer") != -1); }
function isNS () { return (navigator.appName.indexOf ("Netscape") != -1); }
function isFF () { return (window.navigator.userAgent.indexOf("Firefox") >= 0); }
function isWinIE () { return (isWin () && isIE ()); }
function isWinNS () { return (isWin () && isNS ()); }
function isMacIE () { return (isMac () && isIE ()); }
function isMacNS () { return (isMac () && isNS ()); }
function isW3CDOM () { return (document.getElementById ? true : false); }
function isMSDOM () { return (document.all ? true : false); }
function isNCDOM () { return (document.layers ? true : false); }
function isDOM () { return (isW3CDOM () || isMSDOM () || isNCDOM ()); }

//Flashプラグイン判定
function getFlashPlayerVersion() {
	if (navigator.plugins) with (navigator) {
		var s = "application/x-shockwave-flash";
		if (mimeTypes && mimeTypes [s] && mimeTypes [s].enabledPlugin){
			nFlashPlayerVersion = navigator.plugins ["Shockwave Flash"].description.match (/\d+/);
		}
	}
	return parseInt (nFlashPlayerVersion);
}

var nFlashPlayerVersion = 0;
if (isWinIE ()){
	document.write ('<scr' + 'ipt type="text/vbscript" language="VBScript"\>\nPrivate i, b\nOn Error Resume Next\nFor i = 8 To 1 Step -1\nb = (IsObject (CreateObject ("ShockwaveFlash.ShockwaveFlash." & i)))\nIf b Then \nnFlashPlayerVersion = i\nExit For\nEnd If\nNext\n</scr' + 'ipt\>');
}

//Flash描画
function printMovie(id,src,base,width,height,flashvars){
	var http_https = window.location.protocol;
	if(http_https != "https:"){
		http_https="http:";
	}
	var content = "";
	content += '<object id="' + id + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
	content += ' codebase="' + http_https +'//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
	content += ' width="' + width + '" height="' + height + '">';
	content += '<param name="movie" value="'+ src + '">';
	if(base) content += '<param name="base" value="'+ base + '">';
	content += '<param name="quality" value="high">';
	content += '<param name="wmode" value="opaque">';
	if(flashvars) content += '<param name="flashvars" value="' + flashvars + '">';
	content += '<param name="menu"	value="false"><param name="allowScriptAccess" value="sameDomain"><param name="WMOD" value="window">'
	content += '<embed id="' + id +'"';
	content += ' src="' + src +'"';
	content += ' width="' + width + '" height="' + height + '"';
	if(base) content += ' base="' + base +'"';
	content += ' quality="high"';
	if(flashvars) content += ' flashvars="' + flashvars + '"';
	content += ' menu="false" swLiveConnect="true" wmode="opaque"';
	content += ' allowScriptAccess="sameDomain" ';
	content += ' type="application/x-shockwave-flash"';
	content += ' pluginspage="' + http_https +'//www.macromedia.com/go/getflashplayer">';
	content += '</embed></object>';
	document.write(content);
}

//以下DreamWeaver標準ビルトイン-----------------------------------------------------------

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}