var methodWin = null;
function openMethodWin(url) {
	var width = 640;
	var height = 480;
	methodWin = openWin(methodWin, url, "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no", width, height);
}

var productWin = null;
function openMethodWin(url) {
	var width = 640;
	var height = 600;
	productWin = openWin(productWin, url, "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no", width, height);
}


function openWin(win, url, winname, param, width, height) {
	if (win) {
		win.close();
	}

	//ウインドウの表示サイズを取得する
	var sWidth = screen.width;
	var sHeight = screen.height;

	//画面の中央に表示するため、XY座標を算出する
	var left = (sWidth - parseInt(width, 10)) / 2;
	var top = (sHeight - parseInt(height, 10)) / 2;

	win = window.open(url, winname, param + ",screenX=" + left + ",screenY=" + top + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height);
	win.focus();

	return win;
}


function init() {
	var elTopMenu = document.getElementById("topMenu");
	if (elTopMenu) {
		elTopMenu.style.display = "none";
	}
}

/** 
 * 指定された要素に対して、イベントリスナーを定義する
 **/
function addListener(el, eventType, fnc, cap) {
	if (el.addEventListener) {
		el.addEventListener(eventType, fnc, cap);
	} else if (el.attachEvent) {
		el.attachEvent("on" + eventType, fnc);
	}
}

addListener(window, "load", init, false);
