//==========================================================
//	html サブウィンドウを中央に開く
//==========================================================
function PopWnd(mypage, myname, w, h, scroll)
{
	var win_x = ( screen.availWidth - w) / 2;
	var win_y = ( screen.availHeight - h) / 2;
	win_detail = 'left=' + win_x
	             + ',top=' + win_y
	             + ',width=' + 10
	             + ',height=' + 10
	             + ',menubar=no'		// メニューバー
	             + ',toolbar=no'		// ツールバー
	             + ',location=no'		// アドレスバー
	             + ',status=no'		// ステータスバー
	             + ',scrollbars=' + scroll	// スクロールバー(yes,no,auto)
	             + ',resizable=yes';	// サイズ変更
	win = window.open( mypage, myname, win_detail);
	win.moveTo( win_x, win_y);
	win.resizeTo( w, h);
	if ( parseInt( navigator.appVersion) >= 4) { win.window.focus(); }
}

//==========================================================
//	html サブウィンドウを左上に開く
//==========================================================
function PopWndXY(mypage, myname, x, y, w, h, scroll)
{
	var win_x = x;
	var win_y = y;
	win_detail = 'left=' + win_x
	             + ',top=' + win_y
	             + ',width=' + 10
	             + ',height=' + 10
	             + ',menubar=no'		// メニューバー
	             + ',toolbar=no'		// ツールバー
	             + ',location=no'		// アドレスバー
	             + ',status=no'		// ステータスバー
	             + ',scrollbars=' + scroll	// スクロールバー(yes,no,auto)
	             + ',resizable=yes';	// サイズ変更
	win = window.open( mypage, myname, win_detail);
	win.moveTo( win_x, win_y);
	win.resizeTo( w, h);
	if ( parseInt( navigator.appVersion) >= 4) { win.window.focus(); }
}

//==========================================================
//	image サブウィンドウを中央に開く
//==========================================================
function ImgPopWnd(myimage, mytitle, myname, w, h, imgW, imgH, scroll)
{
	if ( w <= 0) { w = screen.availWidth + w }
	if ( h <= 0) { h = screen.availHeight + h }
	var win_x = ( screen.availWidth - w) / 2;
	var win_y = ( screen.availHeight - h) / 2;

	win_detail = 'left=' + win_x
	             + ',top=' + win_y
	             + ',width=' + 10
	             + ',height=' + 10
	             + ',menubar=no'		// メニューバー
	             + ',toolbar=no'		// ツールバー
	             + ',location=no'		// アドレスバー
	             + ',menubar=no'		// メニューバー
	             + ',status=no'		// ステータスバー
	             + ',scrollbars=' + scroll	// スクロールバー(yes,no,auto)
	             + ',resizable=yes';	// サイズ変更
	win = window.open( myimage, myname, win_detail);
	win.moveTo( win_x, win_y);
	win.resizeTo( w, h);
	win.document.open();
	win.document.writeln( '<html>');
	win.document.writeln( '<head>');
	win.document.writeln( '<title>' + mytitle + '</title>');
	win.document.writeln( '<meta http-equiv="imagetoolbar" content="no">');
	win.document.writeln( '</head>');
	win.document.writeln( '<body oncontextmenu="return false">');
	win.document.writeln( '<div align="center">');
	win.document.writeln( '<a href="javascript:window.close();">');
	win.document.writeln( '<img src="' + myimage + '" border="0" width="' + imgW + '" height="' + imgH + '" alt="">');
	win.document.writeln( '<p>');
	win.document.writeln( '<img src="http://www.webericsson.jp/img/close01.gif" border="0" width="95" height="20" alt="閉じる">');
	win.document.writeln( '</a>');
	win.document.writeln( '</div>');
	win.document.writeln( '</body>');
	win.document.writeln( '</html>');
	win.document.close();
	if ( parseInt( navigator.appVersion) >= 4) { win.window.focus(); }
}

//==========================================================
//	image 表示拡大
//==========================================================
function ImgZoomWnd(myimage, mytitle, myname, w, h, WidS, HeiS, WidL, HeiL)
{
	if ( w <= 0) { w = screen.availWidth + w }
	if ( h <= 0) { h = screen.availHeight + h }
	var win_x = ( screen.availWidth - w) / 2;
	var win_y = ( screen.availHeight - h) / 2;

	win_detail = 'left=' + win_x
	             + ',top=' + win_y
	             + ',width=' + 10
	             + ',height=' + 10
	             + ',menubar=no'		// メニューバー
	             + ',toolbar=no'		// ツールバー
	             + ',location=no'		// アドレスバー
	             + ',menubar=no'		// メニューバー
	             + ',status=no'		// ステータスバー
	             + ',scrollbars=yes'	// スクロールバー(yes,no,auto)
	             + ',resizable=yes';	// サイズ変更
	win = window.open( myimage, myname, win_detail);
	win.moveTo( win_x, win_y);
	win.resizeTo( w, h);
	win.document.open();
	win.document.writeln( '<html>');
	win.document.writeln( '<head>');
	win.document.writeln( '<title>' + mytitle + '</title>');
	win.document.writeln( '<meta http-equiv="imagetoolbar" content="no">');
	win.document.writeln( '<script language="JavaScript">');
	win.document.writeln( '<!--');
	win.document.writeln( 'function PhotoZoom(WidS, HeiS, WidL, HeiL)');
	win.document.writeln( '{');
	win.document.writeln( 'if (Photo.name == "S")');
	win.document.writeln( '{');
	win.document.writeln( 'Photo.name="L"');
	win.document.writeln( 'Photo.width = WidL;');
	win.document.writeln( 'Photo.height = HeiL;');
	win.document.writeln( '}');
	win.document.writeln( 'else');
	win.document.writeln( '{');
	win.document.writeln( 'Photo.name="S"');
	win.document.writeln( 'Photo.width = WidS;');
	win.document.writeln( 'Photo.height = HeiS;');
	win.document.writeln( '}');
	win.document.writeln( '}');
	win.document.writeln( '-->');
	win.document.writeln( '</script>');
	win.document.writeln( '</head>');
	win.document.writeln( '<body oncontextmenu="return false" style="margin: 5px;">');
	win.document.writeln( '<div align="center">');
	win.document.writeln( '<img src=' + myimage + ' id="Photo" name="S" border="0" align="top" width=' + WidS + ' height=' + HeiS + ' alt="">');
	win.document.writeln( '<p style="margin: 1px"></p>');
	win.document.writeln( '<a href="javascript:PhotoZoom(' + WidS + ',' + HeiS + ',' + WidL + ',' + HeiL + ');">');
	win.document.writeln( '<img src="http://www.webericsson.jp/img/zoom.gif" border="0" width="42" height="10" alt="拡大／縮小">');
	win.document.writeln( '</a>');
	win.document.writeln( '<p style="margin: 5px"></p>');
	win.document.writeln( '<a href="javascript:window.close();">');
	win.document.writeln( '<img src="http://www.webericsson.jp/img/close01.gif" border="0" width="95" height="20" alt="閉じる">');
	win.document.writeln( '</a>');
	win.document.writeln( '</div>');
	win.document.writeln( '</body>');
	win.document.writeln( '</html>');
	win.document.close();
	if ( parseInt( navigator.appVersion) >= 4) { win.window.focus(); }
}

//==========================================================
//	画像ダウンロード用ウィンドウを中央に開く
//==========================================================
function ImgDlWnd(myimage, mytitle, myname, w, h)
{
	var win_w = screen.availWidth;
	var win_h = screen.availHeight;
	var win_x = 0;
	var win_y = 0;

	win_detail = 'left=' + win_x
	             + ',top=' + win_y
	             + ',width=' + 10
	             + ',height=' + 10
	             + ',scrollbars=yes'	// スクロールバー(yes,no,auto)
	             + ',resizable=yes';	// サイズ変更
	win = window.open( myimage, myname, win_detail);
	win.moveTo( win_x, win_y);
	win.resizeTo( win_w, win_h);
	win.document.open();
	win.document.writeln( '<html>');
	win.document.writeln( '<head>');
	win.document.writeln( '<title>' + mytitle + '</title>');
	win.document.writeln( '</head>');
	win.document.writeln( '<body style="margin: 1px;">');
	win.document.writeln( '<img src="' + myimage + '" border="0" width="' + w + '" height="' + h + '" alt="">');
	win.document.writeln( '</body>');
	win.document.writeln( '</html>');
	win.document.close();
	if ( parseInt( navigator.appVersion) >= 4) { win.window.focus(); }
}

//==========================================================
//	FLASH swfファイルの表示
//==========================================================
function WriteFlash(myswf, myname, prmcmd, w, h)
{
	document.writeln( '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + w + '" HEIGHT="' + h + '" id="' + myname + '" ALIGN="">');
	if ( '' == prmcmd)
	{
		document.writeln( '<PARAM NAME=movie VALUE="' + myswf + '">');
	}
	else
	{
		document.writeln( '<PARAM NAME=movie VALUE="' + myswf + '?' + prmcmd + '">');
	}
	document.writeln( '<PARAM NAME=quality VALUE=high>');
	document.writeln( '<PARAM NAME=bgcolor VALUE=#000000>');
	document.writeln( '<EMBED src="'  + myswf + '" quality=high bgcolor=#000000  WIDTH="' + w + '" HEIGHT="' + h + '" NAME="' + myname + '" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.writeln( '</OBJECT>');
}

//==========================================================
//	プルダウンメニュー
//==========================================================
function pullDown(Target, IsView)
{
	if( true == IsView)
	{
		Target.style.visibility = "visible";
	}
	else
	{
		Target.style.visibility = "hidden";
	}
}
