var factoryWin = null;
function openfactoryWin(url) {
	var width = 510;
	var height = 320;
	factoryWin = openWin(factoryWin, 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 el = document.getElementById("aFactory");

	el.onmouseover = function() {
		var elImg = document.getElementById("Image9");
		elImg.src = "images/koujou_iriguti_on.gif";
	}

	el.onmouseout = function() {
		var elImg = document.getElementById("Image9");
		elImg.src = "images/koujou_iriguti.gif";
	}

}

/** 
 * 指定された要素に対して、イベントリスナーを定義する
 **/
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);

