function isWin () { return (navigator.appVersion.indexOf ("Win") != -1); }
function isIE () { return (navigator.appName.indexOf ("Explorer") != -1); }
function isWinIE () { return (isWin () && isIE ()); }
function isMac () { return (navigator.appVersion.indexOf("Macintosh") != -1);}
function isSafari () { return (navigator.appVersion.indexOf("Safari") != -1);}
function isMacSafari () { return (isMac () && isSafari ()); }
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\>');


//-------------------------------------------------------------------------------------

//↓開くファイルのみ引数で渡す

function opeWin(f){ winName1 = window.open(f,'winName1','WIDTH=720,HEIGHT=580,SCROLLBARS=1'); winName1.focus(); }
function openMobile(f){ mobileWin = window.open(f,'mobileWin','WIDTH=440,HEIGHT=580,SCROLLBARS=1'); mobileWin.focus(); }
function openBook(f){ bookWin = window.open('book/index.html','bookWin','WIDTH=768,HEIGHT=560,SCROLLBARS=0,RESIZABLE=0'); document.getElementById('flash').style.display='none'; document.getElementById('openBook').style.display='block'; bookWin.focus(); }

function setBook(){
	if(navigator.userAgent.indexOf("Wii") == -1 && getFlashPlayerVersion() >= 8){
			document.write (
				'<DIV STYLE="top:1px; left: 0px; position: absolute;"><A HREF="book/index.html" TARGET="_blank" onClick="openBook(); return false;"><IMG SRC="img/btn_mikuji.gif" WIDTH="252" HEIGHT="81" ALT="お告げをさずける不思議な本　魔法の本みくじ" CLASS="hover"></A></DIV>'
				);
	}
}

function backTop(){
	document.getElementById('flash').style.display='block';
	document.getElementById('openBook').style.display='none';
}



