function showPopup(popupID,popupwidth){
	var popupObj = popuplist[popupID];
	popupObj.style.position="absolute";

	if( navigator.appName == "Microsoft Internet Explorer" || event.x == undefined ){
		popupObj.style.top=event.y + document.body.scrollTop;
		popupObj.style.left=event.x + document.body.scrollLeft;
	}else{
		popupObj.style.top=event.y - pageYOffset;
		popupObj.style.left=event.x - pageXOffset;
	}

	popupObj.style.height=10;
	popupObj.style.width=popupwidth;
	popupObj.style.visibility="visible";
}

function hidePopup(popupID){
	var popupObj = popuplist[popupID];
	popupObj.style.top=0;
	popupObj.style.left=0;
	popupObj.style.height=0;
	popupObj.style.width=0;
	popupObj.style.visibility="hidden";
}

var popuplist = new Array();

//ポップアップに使用するレイヤー一覧を配列に格納する
function initPopup(list_popupID){
	for(i=0;i<list_popupID.length;i++){
		var popupID = list_popupID[i];
		var popupObj = getObj(popupID);
		popuplist[popupID] = popupObj;
	}
}

function getObj(id){
	var obj = document.all.item(id);
	if( obj == undefined || obj == null ){
		obj = document.getElementByID(id);
	}
	if( obj == undefined || obj == null ){
		obj = document.getElementByTagName("div")[id];
	}
	return obj;
}
