var myBrowser;
if(navigator.platform){
	myBrowser=new myBrowser((document.getElementById != null),(navigator.platform.indexOf('Win32') != -1),(navigator.appName.indexOf('Microsoft') != -1));
}
function myBrowser(version,platform,type){
	this.version=version;	//trueかfalse,DOM使用可能ブラウザ(IE4以上,NN6以上)ならtrue
	this.platform=platform;	//trueかfalse,Win32ならtrue
	this.type=type;		//trueかfalse,IEならtrue
}

var MM_contentVersion = 6;//Setting to Version 6
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');
}

function openFullScr(){
	if(screen.width >= 1024 && screen.height >= 768){//モニタ解像度1024*768以上ならば実行
	if(MM_FlashCanPlay){//Flash Player Ver.6を持っていればウィンドウを開く
		var myUrl = "main.html";
		if(myBrowser.type){ //IEの場合
			if(myBrowser.platform){ //WIN IEの場合
				var thisWinWidth=screen.availwidth;
				var thisWinHeight=screen.availHeight;
				newwin=window.open(myUrl,"_blank","fullscreen=1,scrollbars=0,resizable=0,location=0,menubar=0,status=0,left=0,top=0");//no title bar
				newwin.resizeTo(thisWinWidth,thisWinHeight);
				//newwin.document.body.scroll = "no";
				//newwin.document.body.scroll = false;
			}else{ //Mac IEの場合
				var thisWinWidth=screen.width-12;
				var thisWinHeight=screen.availHeight;
				newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
				newwin.resizeTo(thisWinWidth,thisWinHeight);
			}
		}else{
			if( navigator.userAgent.indexOf("Safari") != -1){//Safari
				var thisWinWidth=screen.width;
				var thisWinHeight=screen.height-46;
				window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
				newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
				newwin.moveTo(0,0);
			}else{//NS
				var thisWinWidth=screen.availWidth-12;
				var thisWinHeight=screen.availHeight-30;
				window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
			newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
				newwin.moveTo(0,0);
			}
		}
	}else{
		alert("Flash Version");
		window.location='noplugin.html';
	}
	
	}else{
		alert("monitor resolution");
		window.location='noplugin.html';
	}
}

function FlashOpen(){
	var widthNum='100%';
	var heightNum='100%';
	if(screen.width < 1024 || screen.height < 768){
		widthNum=1024;
		heightNum=768;
	}
	document.write('<table border="0" cellspacing="0" cellpadding="0" width="'+widthNum+'" height="'+heightNum+'" id="basearea"><tr>');
	document.write('<td width="'+widthNum+'" valign="middle" align="center"> ');
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	document.write(' WIDTH="'+widthNum+'" HEIGHT="'+heightNum+'" id="main" ALIGN="">');
	document.write(' <PARAM NAME=movie VALUE="main3.swf');
	document.write('"> <PARAM NAME=menu VALUE=false><PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=noscale><PARAM NAME=bgcolor VALUE=#F1E3C9><EMBED src="main3.swf');
	document.write('" menu=false quality=high scale=noscale bgcolor=#F1E3C9 WIDTH="'+widthNum+'" HEIGHT="'+heightNum+'" NAME="main" ALIGN=""');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
	document.write('</td></tr></table>');
}

function windowclose(){
	window.close();
}