function get_browser()
{
    checkOP = window.opera;            // OP
    checkN6 = document.getElementById; // N6
    checkIE = document.all;            // IE
    checkN4 = document.layers;         // N4

    if(checkOP) {
        return "OP6";  // Opera 6 or above
    } else if(checkIE) {
        return "IE4";  // Internet Explorer 4.0 or above
    } else if(checkN6) {
		userAgent = navigator.userAgent;
		if(userAgent.indexOf("Safari") >= 0) {
			return "SA1";  // Safari 1.X
		}
        return "NS6";  // Netscape 6 or above
    } else if(myN4) {
        return "NN4";  // Netscape Navigator 4 to 5
    } else {
        if(navigator.appName == "Netscape") {
            return "NS";
        } else if(navigator.appName == "Microsoft Internet Explorer") {
            return "IE";
        }
    }

    return "UNKNOWN";
}

function get_os()
{
	platform = navigator.platform;
	
	if(platform >= "Win") {
		return "WIN";
	} else if(platform >= "Mac") {
		return "MAC";
	}
	
	return "UNKNOWM";
}



function set_background_image(layerName, image)
{
	br = get_browser();
	
	if(br=="NS6" || br=="SA1") {
		document.getElementById(layerName).style.backgroundImage = 'url(' + image + ')';
	} else if(br=="IE4" || br=="OP6") {
		document.all(layerName).style.backgroundImage = 'url(' + image + ')';
	} else if(br == "NN4") {
		document.layers[layerName].background.src = image;
	}
}


function document_out(id_str, out_str)
{
    br = get_browser();

    if(br=="IE4" || br=="OP6"){           // IE4の時の表示
        document.all(id_str).innerHTML = out_str;
    } else if (br == "NN4") {    // NN4の時の表示
        document.layers[id_str].document.open();
        document.layers[id_str].document.write(out_str);
        document.layers[id_str].document.close();
    } else if (br=="NS6" || br=="SA1") {    // NS6の時の表示
        document.getElementById(id_str).innerHTML = out_str;
    }
}



function openImgWindow(imgURL, imgWidth, imgHeight, captionStr, captionStr2, winHeight)
{
    tableWidth = imgWidth + 280;

    winWidth = tableWidth + 20;
	if(winHeight == 0) {
        winHeight = imgHeight + 20 + 30;
	}

	if(get_browser() == "SA1") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
		newWin.moveTo(10, 10);
	} else {
		if(bStandalone) {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
			newWin.moveTo(-5, -24);
		} else {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
			newWin.moveTo(10, 10);
		}
	}
    
	
    newWin.document.open();
    newWin.document.writeln("<html><head>");
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln('<title>Image</title>');
    newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
	if(bStandalone) {
		newWin.document.writeln('body { background-image:url("'+top_dir+'/../back.gif"); }');
		newWin.document.writeln('div.body { margin:0px; padding:10px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
		newWin.document.writeln('      width:'+winWidth+'px; height:'+winHeight+'px; }');
	} else {
		newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; }');
		newWin.document.writeln('div { margin:0px; padding:0px; }');
	}
    newWin.document.writeln('p { font-family:"ＭＳ Ｐゴシック", "ヒラギノ角ゴ Pro W3", sans-serif;');
	if(get_os() == "MAC") {
		newWin.document.writeln('    letter-spacing:0px;');
	} else {
		newWin.document.writeln('    letter-spacing:1px;');
	}
	newWin.document.writeln('    margin:0px; margin-left:5px; font-size:12px; line-height:18px; text-align:justify; text-justify:newspaper; }');
	newWin.document.writeln('img.close_btn { cursor:pointer; }');
    newWin.document.writeln('-->');
    newWin.document.writeln('</style>');
	if(bStandalone) {
		standaloneModeWindow(newWin);
	}
    newWin.document.writeln('</head><body><center>');
	newWin.document.writeln('<div class="body">');
    newWin.document.writeln('<table width="'+tableWidth+'">');
    newWin.document.writeln('<tr><td valign="top" align="left" width="'+imgWidth+'"><img src="'+imgURL+'" width="'+imgWidth+'" height="'+imgHeight+'"/></td>');
    newWin.document.writeln('<td valign="top" width="280">');
    newWin.document.writeln('<p>'+captionStr+'</p>');
    newWin.document.writeln('<br><p style="text-align:right;">');
    newWin.document.writeln(captionStr2+'</p>');
    newWin.document.writeln('</td></tr>');
    newWin.document.writeln('<tr><td></td>');
	newWin.document.writeln('<td align="right" valign="bottom"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></td>');
    newWin.document.writeln("</tr></table>");
	newWin.document.writeln('</div>');
    newWin.document.writeln("</center></body></html>");
    newWin.document.close();
}



function openImgWindowL(imgURL, imgWidth, imgHeight, captionStr, captionStr2, winHeight)
{
    tableWidth = imgWidth;

    winWidth = tableWidth + 20;
	if(winHeight == 0) {
        winHeight = imgHeight + 20 + 30;
	}

	if(get_browser() == "SA1") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
		newWin.moveTo(10, 10);
	} else {
		if(bStandalone) {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
			newWin.moveTo(-5, -24);
		} else {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
			newWin.moveTo(10, 10);
		}
	}
	
    newWin.document.open();
    newWin.document.writeln("<html><head>");
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln('<title>Image</title>');
    newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
	if(bStandalone) {
		newWin.document.writeln('body { background-image:url("'+top_dir+'/../back.gif"); }');
		newWin.document.writeln('div.body { margin:0px; padding:10px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
		newWin.document.writeln('      width:'+winWidth+'px; height:'+winHeight+'px; }');
	} else {
		newWin.document.writeln('body { margin:0px; padding:0px; padding.top:5px; }');
		newWin.document.writeln('div { margin:0px; padding:0px; }');
	}
    newWin.document.writeln('p { font-family:"ＭＳ Ｐゴシック", "ヒラギノ角ゴ Pro W3", sans-serif;');
	if(get_os() == "MAC") {
		newWin.document.writeln('    letter-spacing:0px;');
	} else {
		newWin.document.writeln('    letter-spacing:1px;');
	}
	newWin.document.writeln('    margin:0px; margin-left:5px; font-size:12px; line-height:18px; text-align:justify; text-justify:newspaper; }');
	newWin.document.writeln('img.close_btn { cursor:pointer; }');
    newWin.document.writeln('-->');
    newWin.document.writeln('</style>');
	//if(bStandalone) {
	//	standaloneModeWindow(newWin);
	//}
    newWin.document.writeln('</head><body><center>');
	newWin.document.writeln('<div class="body">');
    newWin.document.writeln('<table width="'+tableWidth+'">');
    newWin.document.writeln('<tr><td valign="top" align="center" width="'+imgWidth+'" colspan="2"><img src="'+imgURL+'" width="'+imgWidth+'" height="'+imgHeight+'"/></td></tr>');
    newWin.document.writeln('<tr><td valign="top"><p>'+captionStr+' '+captionStr2+'</p></td>');
    newWin.document.writeln('<td align="right" valign="bottom" height="30"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></td>');
    newWin.document.writeln("</tr></table>");
	newWin.document.writeln('</div>');
    newWin.document.writeln("</center></body></html>");
    newWin.document.close();
}



function openMovWindow(movURL, movWidth, movHeight, captionStr, captionStr2, winHeight)
{
	protocol = location.protocol;
	
	os = get_os();	
	if(os == "MAC") {
		movHeight = movHeight + 72;
	} else {
		movHeight = movHeight + 69;
	}

    tableWidth = movWidth + 280;

    winWidth = tableWidth + 20;
	tmpHeight = movHeight + 20 + 30;
	if(winHeight < tmpHeight) {
        winHeight = tmpHeight;
	}

	if(get_browser() == "SA1") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
		newWin.moveTo(10, 10);
	} else {
		if(bStandalone) {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
			newWin.moveTo(-5, -24);
		} else {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
			newWin.moveTo(10, 10);
		}
	}

    newWin.document.open();
    newWin.document.writeln("<html><head>");
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln("<title>Movie</title>");
	newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
	if(bStandalone) {
		newWin.document.writeln('body { background-image:url("'+top_dir+'/../back.gif"); }');
		newWin.document.writeln('div.body { margin:0px; padding:10px; border-style:inset; border-width:2px; background-color:#000000; color:#FFFFFF;');
		newWin.document.writeln('      width:'+winWidth+'px; height:'+winHeight+'px; }');
	} else {
		newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; background-color:#000000; color:#FFFFFF; }');
		newWin.document.writeln('div { margin:0px; padding:0px; }');
	}
    newWin.document.writeln('p { font-family:"ＭＳ Ｐゴシック", "ヒラギノ角ゴ Pro W3", sans-serif; color:#FFFFFF;');
	if(os == "MAC") {
		newWin.document.writeln('    letter-spacing:0px;');
	} else {
		newWin.document.writeln('    letter-spacing:1px;');
	}
	newWin.document.writeln('    margin:0px; margin-left:5px; font-size:12px; line-height:18px; text-align:justify; text-justify:newspaper; }');
	newWin.document.writeln('img.close_btn { cursor:pointer; }');
    newWin.document.writeln('-->');
	newWin.document.writeln('</style>');
	//if(bStandalone) {
	//	standaloneModeWindow(newWin);
	//}
    newWin.document.writeln('</head><body><center>');
	newWin.document.writeln('<div class="body">');
    newWin.document.writeln('<table width="'+tableWidth+'">');
    newWin.document.writeln('<tr><td valign="top" align="left" width='+movWidth+'">');
	
	newWin.document.writeln('<object id="WindowsMedia" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"');
	if(protocol == "http:") {
	    newWin.document.writeln('        codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"');
    	newWin.document.writeln('        standby="Loading Microsoft Windows Media Player components..."');
	}
    newWin.document.writeln('        type="application/x-oleobject" width='+movWidth+' height='+movHeight+'>');
    newWin.document.writeln('    <param name="FileName" value="'+movURL+'">');
    newWin.document.writeln('    <param name="AnimationatStart" value="true">');
    newWin.document.writeln('    <param name="TransparentatStart" value="true">');
    newWin.document.writeln('    <param name="ControlType" value="2">');
    newWin.document.writeln('    <param name="AutoStart" value="true">');
    newWin.document.writeln('    <param name="ShowStatusBar" value="1">');
    newWin.document.writeln('    <embed type="application/x-mplayer2"');
    newWin.document.writeln('        pluginspage="'+protocol+'//www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"');
    newWin.document.writeln('        src="'+movURL+'"');
    newWin.document.writeln('        Name="WindowsMedia"');
    newWin.document.writeln('        ShowControls="1"');
    newWin.document.writeln('        ShowDisplay="0"');
    newWin.document.writeln('        ShowStatusBar="1"');
    newWin.document.writeln('		 width='+movWidth+' height='+movHeight+'>');
    newWin.document.writeln('    </embed>');
    newWin.document.writeln('</object></td>');
		
    newWin.document.writeln('<td valign="top" width="280">');
    newWin.document.writeln('<p>'+captionStr+'</p>');
	newWin.document.writeln('<br><p style="text-align:right;">');
    newWin.document.writeln(captionStr2+'</p>');
    newWin.document.writeln('</td></tr>');
    newWin.document.writeln('<tr><td></td>');
	newWin.document.writeln('<td align="right" valign="bottom"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></td>');
    newWin.document.writeln("</tr></table>");
	newWin.document.writeln('</div>');
    newWin.document.writeln("</center></body></html>");
    newWin.document.close();
}



function putDCR(win, dcrURL, dcrWidth, dcrHeight, bgcolor)
{
	protocol = location.protocol;
	
	win.document.writeln('<object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000"');
	win.document.writeln('        codebase="'+protocol+'//download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"');
	win.document.writeln('        width="'+dcrWidth+'" height="'+dcrHeight+'" id="shockwave-dcr" align="">');
    win.document.writeln('   <param name="src" value="'+dcrURL+'">');
    win.document.writeln('   <param name="swStretchStyle" value="fill">');
    win.document.writeln('   <param name="bgColor" value="'+bgcolor+'">');
    win.document.writeln('   <embed src="'+dcrURL+'" bgcolor="'+bgcolor+'" width="'+dcrWidth+'" height="'+dcrHeight+'" name="shockwave-dcr" align=""');
	win.document.writeln('          swRemote="swSaveEnabled=false swVolume=true swRestart=true swPausePlay=true swFastForward=true swContextMenu=false"');
	win.document.writeln('          swStretchStyle="fill" type="application/x-director"');
	win.document.writeln('          pluginspage="'+protocol+'//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveDirector"></embed>');
    win.document.write('</object>');
}

function openDcrWindow(dcrURL, dcrWidth, dcrHeight, captionStr, captionStr2)
{
    tableWidth = dcrWidth + 280;

    winWidth = tableWidth + 20;
    winHeight = dcrHeight + 20 + 30;

	if(get_browser() == "SA1") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
		newWin.moveTo(10, 10);
	} else {
		if(bStandalone) {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
			newWin.moveTo(-5, -24);
		} else {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
			newWin.moveTo(10, 10);
		}
	}

    newWin.document.open();
    newWin.document.writeln('<html><head>');
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln('<title>Interactive</title>');
    newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
	if(bStandalone) {
		newWin.document.writeln('body { background-image:url("'+top_dir+'/../back.gif"); }');
		newWin.document.writeln('div.body { margin:0px; padding:10px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
		newWin.document.writeln('      width:'+winWidth+'px; height:'+winHeight+'px; }');
	} else {
		newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; }');
		newWin.document.writeln('div { margin:0px; padding:0px; }');
	}
    newWin.document.writeln('p { font-family:"ＭＳ Ｐゴシック", "ヒラギノ角ゴ Pro W3", sans-serif;');
	if(get_os() == "MAC") {
		newWin.document.writeln('    letter-spacing:0px;');
	} else {
		newWin.document.writeln('    letter-spacing:1px;');
	}
	newWin.document.writeln('    margin:0px; margin-left:5px; font-size:12px; line-height:18px; text-align:justify; text-justify:newspaper; }');
	newWin.document.writeln('img.close_btn { cursor:pointer; }');
    newWin.document.writeln('-->');
    newWin.document.writeln('</style>');
	//if(bStandalone) {
	//	standaloneModeWindow(newWin);
	//}
    newWin.document.writeln('</head><body><center>');
	newWin.document.writeln('<div class="body">');
    newWin.document.writeln('<table width="'+tableWidth+'">');
    newWin.document.writeln('<tr><td valign="top" align="left" width='+dcrWidth+'">');
		putDCR(newWin, dcrURL, dcrWidth, dcrHeight, "#ffffff");
	newWin.document.writeln('</td>');
    newWin.document.writeln('<td valign="top" width="280">');
    newWin.document.writeln('<p>'+captionStr+'</p>');
    newWin.document.writeln('<br><p style="text-align:right;">');
    newWin.document.writeln(captionStr2+'</p>');
    newWin.document.writeln('</td></tr>');
    //newWin.document.writeln('<tr><td></td><td align="right" valign="bottom"><form><input value="CLOSE" type="submit" style="font-size:12px;" onclick="window.close();"/></form></td>');
	newWin.document.writeln('<tr><td></td><td align="right" valign="bottom"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></td></tr>');
    newWin.document.writeln("</table>");
	newWin.document.writeln('</div>');
    newWin.document.writeln("</center></body></html>");
    newWin.document.close();
}



function putSWF(win, swfURL, swfWidth, swfHeight, bgcolor)
{
	protocol = location.protocol;
	
    win.document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	win.document.writeln('        codebase="'+protocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	win.document.writeln('        width="'+swfWidth+'" height="'+swfHeight+'" id="flash" align="">');
    win.document.writeln('   <param name="movie" value="'+swfURL+'">');
    win.document.writeln('   <param name="quality" value="high">');
    win.document.writeln('   <param name="bgcolor" value="'+bgcolor+'">');
    win.document.writeln('   <embed src="'+swfURL+'" quality="high" bgcolor="'+bgcolor+'" width="'+swfWidth+'" height="'+swfHeight+'" name="flash-swf" align=""');
	win.document.writeln('          type="application/x-shockwave-flash" pluginspage="'+protocol+'//www.macromedia.com/go/getflashplayer"></embed>');
    win.document.write('</object>');
}

function putSWF2(win, swfURL, swfWidth, swfHeight, bgcolor, name)
{
	protocol = location.protocol;
	
	browser = get_browser();
	if(browser == "IE4") {
		browser = "IE";
	} else {
		browser = "OTHERS";
	}
	
    win.document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	win.document.writeln('        codebase="'+protocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	win.document.writeln('        width="'+swfWidth+'" height="'+swfHeight+'" id="'+name+'" align="">');
    win.document.writeln('   <param name="movie" value="'+swfURL+'">');
    win.document.writeln('   <param name="quality" value="high">');
    win.document.writeln('   <param name="bgcolor" value="'+bgcolor+'">');
	win.document.writeln('   <param name="FlashVars" value="browser='+bgcolor+'">');
    win.document.writeln('   <embed src="'+swfURL+'" quality="high" bgcolor="'+bgcolor+'" width="'+swfWidth+'" height="'+swfHeight+'" name="'+name+'" align="" FlashVars="browser='+browser+'"');
	win.document.writeln('          type="application/x-shockwave-flash" pluginspage="'+protocol+'//www.macromedia.com/go/getflashplayer"></embed>');
    win.document.write('</object>');
}

function openSwfWindow(swfURL, swfWidth, swfHeight, captionStr, captionStr2)
{
    tableWidth = swfWidth + 280;

    winWidth = tableWidth + 20;
    winHeight = swfHeight + 20 + 30;

	if(get_browser() == "SA1") {
		newWin = window.open("", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
		newWin.moveTo(10, 10);
	} else {
		if(bStandalone) {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
			newWin.moveTo(-5, -24);
		} else {
			newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+winWidth+",height="+winHeight);
			newWin.moveTo(10, 10);
		}
	}

    newWin.document.open();
    newWin.document.writeln('<html><head>');
	newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
	newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
	newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
	newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    newWin.document.writeln('<title>Interactive</title>');
    newWin.document.writeln('<style type="text/css">');
    newWin.document.writeln('<!--');
	if(bStandalone) {
		newWin.document.writeln('body { background-image:url("'+top_dir+'/../back.gif"); }');
		newWin.document.writeln('div.body { margin:0px; padding:10px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
		newWin.document.writeln('      width:'+winWidth+'px; height:'+winHeight+'px; }');
	} else {
		newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; }');
		newWin.document.writeln('div { margin:0px; padding:0px; }');
	}
    newWin.document.writeln('p { font-family:"ＭＳ Ｐゴシック", "ヒラギノ角ゴ Pro W3", sans-serif;');
	if(get_os() == "MAC") {
		newWin.document.writeln('    letter-spacing:0px;');
	} else {
		newWin.document.writeln('    letter-spacing:1px;');
	}
	newWin.document.writeln('    margin:0px; margin-left:5px; font-size:12px; line-height:18px; text-align:justify; text-justify:newspaper; }');
	newWin.document.writeln('img.close_btn { cursor:pointer; }');
    newWin.document.writeln('-->');
    newWin.document.writeln('</style>');
	//if(bStandalone) {
	//	standaloneModeWindow(newWin);
	//}
    newWin.document.writeln('</head><body><center>');
	newWin.document.writeln('<div class="body">');
    newWin.document.writeln('<table width="'+tableWidth+'">');
    newWin.document.writeln('<tr><td valign="top" align="left" width='+swfWidth+'">');
	    putSWF(newWin, swfURL, swfWidth, swfHeight, "#ffffff");
	newWin.document.writeln('</td>');
    newWin.document.writeln('<td valign="top" width="280">');
    newWin.document.writeln('<p>'+captionStr+'</p>');
    newWin.document.writeln('<br><p style="text-align:right;">');
    newWin.document.writeln(captionStr2+'</p>');
    newWin.document.writeln('</td></tr>');
    //newWin.document.writeln('<tr><td></td><td align="right" valign="bottom"><form><input value="CLOSE" type="submit" style="font-size:12px;" onclick="window.close();"/></form></td>');
	newWin.document.writeln('<tr><td></td><td align="right" valign="bottom"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></td></tr>');
    newWin.document.writeln("</table>");
	newWin.document.writeln('</div>');
    newWin.document.writeln("</center></body></html>");
    newWin.document.close();
}



function openNewWindow(newURL, newWidth, newHeight)
{
	if(bStandalone) {
		newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
		newWin.moveTo(-5, -24);
		
		newWin.document.open();
    	newWin.document.writeln('<html><head>');
		newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
		newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
		newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
		newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    	newWin.document.writeln('<title>New Window</title>');
    	newWin.document.writeln('<style type="text/css">');
    	newWin.document.writeln('<!--');
			newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; background-image:url("'+top_dir+'/../back.gif"); }');
			newWin.document.writeln('iframe { margin:0px; padding:0px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
			newWin.document.writeln('      width:'+newWidth+'px; height:'+newHeight+'px; }');
			newWin.document.writeln('div.close_btn { margin:0px; padding:0px; padding.top:10px; text-align:right; width:'+newWidth+'px; }');
			newWin.document.writeln('img.close_btn { cursor:pointer; }');
    	newWin.document.writeln('-->');
    	newWin.document.writeln('</style>');
		newWin.document.writeln('</head><body><center>');
		newWin.document.writeln('<iframe scrolling="no" src="'+newURL+'"></iframe>');
		newWin.document.writeln('<div class="close_btn"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></div>');
		newWin.document.writeln("</center></body></html>");
    	newWin.document.close();
	} else {
	    newWin = window.open(newURL, "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+newWidth+",height="+newHeight);
    	newWin.moveTo(10, 10);
	}
}

function openNewWindowWithSB(newURL, newWidth, newHeight)
{
	if(bStandalone) {
		newWin = window.open("./", "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width="+screen.width+",height="+screen.height);
		newWin.moveTo(-5, -24);
		
		newHeight = screen.height - 50;
		
		newWin.document.open();
    	newWin.document.writeln('<html><head>');
		newWin.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS">');
		newWin.document.writeln('<meta http-equiv="Content-Style-Type" content="text/css">');
		newWin.document.writeln('<meta http-equiv="Content-Script-Type" content="text/javascript">');
		newWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
    	newWin.document.writeln('<title>New Window</title>');
    	newWin.document.writeln('<style type="text/css">');
    	newWin.document.writeln('<!--');
			newWin.document.writeln('body { margin:0px; padding:0px; padding.top:10px; background-image:url("'+top_dir+'/../back.gif"); }');
			newWin.document.writeln('iframe { margin:0px; padding:0px; border-style:inset; border-width:2px; background-color:#FFFFFF;');
			newWin.document.writeln('      width:'+newWidth+'px; height:'+newHeight+'px; }');
			newWin.document.writeln('div.close_btn { margin:0px; padding:0px; padding.top:10px; text-align:right; width:'+newWidth+'px; }');
			newWin.document.writeln('img.close_btn { cursor:pointer; }');
    	newWin.document.writeln('-->');
    	newWin.document.writeln('</style>');
		newWin.document.writeln('</head><body><center>');
		newWin.document.writeln('<iframe scrolling="yes" src="'+newURL+'"></iframe>');
		newWin.document.writeln('<div class="close_btn"><img class="close_btn" src="'+top_dir+'/global_objs/media/close_btn.gif" width="52" height="19" onclick="window.close();"/></div>');
		newWin.document.writeln("</center></body></html>");
    	newWin.document.close();
	} else {
	    newWin = window.open(newURL, "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+newWidth+",height="+newHeight);
    	newWin.moveTo(10, 10);
	}
	
    //newWin = window.open(newURL, "", "toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+newWidth+",height="+newHeight);
    //newWin.moveTo(10, 10);
}



function launchTerra(fly_file)
{
	os = get_os();
	if(os != "WIN") {
		alert("申し訳ありませんが、\n3D遊覧（Terra Explorer）はWindowsでしかご利用頂けません。");
		return false;
	}
	
	browser = get_browser();
	if(browser != "IE4") {
		alert("申し訳ありませんが、\n3D遊覧（Terra Explorer）はMicrosoft Internet Explorerのみを対象としております。");
		return false;
	}
	
	window.open("http://www.skylinesoft.com/interactive/detect/detectTe.asp?fly="+fly_file,"__detectTe", "height=1,width=1,toolbar=0,titlebar=0,status=0,menubar=0,scrollbars=0,left=10000,top=10000,screenX=10000,screenY=10000");
}

function checkTerra()
{
	os = get_os();
	if(os != "WIN") {
		alert("申し訳ありませんが、\n3D遊覧（Terra Explorer）はWindowsでしかご利用頂けません。");
		return false;
	}
	
	browser = get_browser();
	if(browser != "IE4") {
		alert("申し訳ありませんが、\n3D遊覧（Terra Explorer）はMicrosoft Internet Explorerのみを対象としております。");
		return false;
	}
	
	return true;
}



function checkMeMePlayer()
{
	os = get_os();
	if(os != "WIN") {
		alert("申し訳ありませんが、\nMeMe PlayerはWindowsでしかご利用頂けません。");
		return false;
	}
	
	browser = get_browser();
	if(browser != "IE4") {
		alert("申し訳ありませんが、\nMeMe PlayerはMicrosoft Internet Explorerのみを対象としております。");
		return false;
	}
	
	return true;
}



function standaloneModeWindow(win)
{
	win.document.writeln('<script language="javascript">');
	win.document.writeln('<!--');
	win.document.writeln('    function changeFocus() {');
	win.document.writeln('        window.focus();');
	win.document.writeln('    }');
	win.document.writeln('    window.onload = changeFocus;');
	win.document.writeln('    window.onblur = changeFocus;');
	win.document.writeln('//-->');
	win.document.writeln('</script>');
}
