saw = screen.availWidth; // スクリーンの有効な縦幅
sah = screen.availHeight; // スクリーンの有効な縦幅
w_max = Math.floor(saw*0.9);
h_max = Math.floor(sah*0.9);

w_pic = 1032;
h_pic = 728+50;

flag = 0;

if ( h_pic <= h_max ) {
	h_win = h_pic;
} else {
	h_win = h_max;
	flag = 1; // 縦スクロール発生
}

if ( ( w_pic <= w_max ) && ( flag == 1 ) ) {
	w_win = w_pic+17;
	//w_win = w_pic+18;
	//w_win = w_pic+20;
} else if ( ( w_pic <= w_max ) && ( flag == 0 ) ) {
	w_win = w_pic;
} else {
	w_win = w_max;
}

function openSubWin() {
	theURL    = "magi_anthology/index.html";
	winName = "magi_anthology";
	features  = "width=" + w_win + ",height=" + h_win + ",scrollbars=yes,resizable=yes";

	// 各変数の生成を確認するアラート
	//alert ("theURL    = " + theURL + "\nwinName = " + winName + "\nfeatures  = " + features);

	window.open(theURL,winName,features);
}

