//<======	Event handler array	======>
	//任意のイベントが発生した場合に、登録したメソッドをすべて実行する
	function EventFunction(e){
		if ((e) && (e.type) && (EventFunction[e.type])){	//for Moz
			var etype = e.type;
			//alert("e.type = " + e.type);
			for (var i = 0; i < EventFunction[etype].length; i++){
				EventFunction[etype][i]();
			}
		}else if ((typeof(event) == "object") && (event) && (event.type) && (EventFunction[event.type])){	//for IE			
			var etype = event.type;	//for Mac IE 5
			//alert("event.type = " + event.type);
			for (var i = 0; i < EventFunction[etype].length; i++){
				EventFunction[etype][i]();
			}
		}

		//配列の最後に任意のイベントのメソッドを追加登録する。
		//eventType = ["load" | "focus" | "click" ...]
		//例：EventFunction.addFunc("load",onloadInit);
		//例：EventFunction.addFunc("click",clickEvent);
		EventFunction.addFunc = function (eventType,funcName){
			if (! EventFunction[eventType]){
				EventFunction[eventType] = new Array();
			}

			EventFunction[eventType][EventFunction[eventType].length] = funcName;
		}

		return this;
	}

		new EventFunction();
		
		/*	memo
			window.onclick = EventFunction;	//moz OK , IE6 NG
			document.onclick = EventFunction;	//moz OK , IE6 OK
		*/
		window.onload = EventFunction;
//</======	onload	======>

//別窓オープン
function openWin(obj,w,h,winName){
	var attr = "resizable=1,scrollbars=1,location=1,status=1,toolbar=1,directories=1,menubar=1";
	if(w){
		attr += ",width=" + w;
	}

	if(h){
		attr += ",height=" + h;
	}

	if (! winName){
		winName = "_blank";
	}
	
	var uri = '';
	if (obj.href) {
		uri = obj.href;
	} else if (typeof(obj) == 'string') {
		uri = obj;
	}
	
	var win = window.open(uri,winName,attr);
	win.focus();
	return false;
}

//roll over image
//Ex : <img src="1.gif" onmouseover="swapImg(this,'2.gif')" width="80" height="80" alt="">
function swapImg(obj,path){
	if(this.defSrc){
		(this.src == this.defSrc)?(this.src=this.swapSrc):(this.src =this.defSrc);
	}else if((! obj.defSrc) && (obj.src)){
		obj.defSrc = obj.src;
		obj.swapSrc = obj.src = path;
		obj.onmouseout = obj.onmouseover = swapImg;
	}
}

//--------debug用---------------------------------------------
//オブジェクトの全てのプロパティを表示する。(for debug) Ex : showAllProp(document);
function showAllProp(obj){
	var str = "";

	for(var i in obj){
		str += i + " : " + obj[i] + "<br />\n";
	}

	//alert(str);
	var win=window.open("",'newwin');
	win.document.write(str);
}
