/* ====================================================================
 Name        : addEvent
 Description : WINDOW ONLOADのバッティング回避
==================================================================== */
function addEvent(elm,listener,fn) {
	try {
		elm.addEventListener(listener,fn,false);
	} catch(e) {
		elm.attachEvent("on"+listener,fn);
	}
}


/* ====================================================================
 Name        : closeWin
 Description : サブウインドウを閉じる
==================================================================== */
function closeWin() {
	var nvua = navigator.userAgent;
	 if(nvua.indexOf('MSIE') >= 0) {
		if(nvua.indexOf('MSIE 5.0') == -1) {
			top.opener = '';
		}
	 }
	 else if(nvua.indexOf('Gecko') >= 0) {
		top.name = 'CLOSE_WINDOW';
		wid = window.open('','CLOSE_WINDOW');
	 }
	 top.close();
}



