//alt??¨º??a¨º?
var sPop = null;
document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { font-family: Tahoma, Verdana; background-color: #AFDED9; border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=80)}");
document.write(".popmenu {position: absolute; background-color: #e9ffd8; border: 1 solid #fed070; padding-left: 5; padding-top: 3; padding-bottom: 3; padding-right: 3; width: 70; line-height:150%}; filter: Alpha(Opacity=80)}");
document.write("</style>");
document.write("<div id='popLayer' style='position:absolute;z-index:1000' class='cPopText'></div>");
document.write("<div id=popMenu class=popmenu style='display:none;position:absolute;z-index:1000' onmouseout='hideSelf(this)'></div>");

function showpopuptext() {
	var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" }
        if(o.title!=null && o.title!="") { o.pop=o.title;o.title="" }
	if(o.pop!=sPop) {
		sPop=o.pop;
		if(sPop==null || sPop=="") {
			popLayer.style.visibility="hidden";	
		} else {
			if(o.dyclass!=null) popStyle=o.dyclass 
			else popStyle="cPopText";
			popLayer.style.visibility="visible";
			showit();
		}
	}
}

function showit() {
	popLayer.className=popStyle;
	//popLayer.innerHTML=sPop.replace(/<(.*)>/g,"&lt;$1&gt;").replace(/\n/g,"<br>");;
	popLayer.innerHTML=sPop;
	popWidth=popLayer.clientWidth;
	popHeight=popLayer.clientHeight;
	if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
		else popLeftAdjust=0;
	if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
		else popTopAdjust=0;
	popLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
	popLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
}
document.onmouseover=showpopuptext;

//popmenu??¨º??a¨º?
var popup_menu = null;
document.onclick = new Function("showPopupMenu(null)")
function getPos(el,sProp) {
	var iPos = 0;
	while (el!=null) {
		iPos+=el["offset" + sProp];
		el = el.offsetParent;
	}
	return iPos;
}

function showPopupMenu(el, m, ihtml) {
	if (m) {
		m.style.display='';
		m.style.pixelLeft = getPos(el,"Left") + el.offsetWidth - 1;
		m.style.pixelTop = getPos(el,"Top");
		m.innerHTML  = ihtml;
	}
	if ((m!=popup_menu) && (popup_menu)) popup_menu.style.display = 'none';
	popup_menu = m;
}

function hidePopupMenu(el, m) {
	if (el && m && m.style.display=='') {
		if ((document.body.scrollLeft + window.event.x > el.offsetLeft) 
				&& (document.body.scrollLeft + window.event.x < el.offsetLeft + el.offsetWidth) 
				&& (document.body.scrollTop + window.event.y > el.offsetTop) 
				&& (document.body.scrollTop + window.event.y < el.offsetTop + el.offsetHeight)
				|| (document.body.scrollLeft + window.event.x > m.offsetLeft)                
				&& (document.body.scrollLeft + window.event.x < m.offsetLeft + m.offsetWidth) 
				&& (document.body.scrollTop + window.event.y > m.offsetTop)
				&& (document.body.scrollTop + window.event.y < m.offsetTop + m.offsetHeight)) {
		} else {
			m.style.display = 'none';
		}
	}
}

function hideSelf(m) {	
	if (m.style.display=='') {
		if ((document.body.scrollLeft + window.event.x >= m.offsetLeft)                
		&& (document.body.scrollLeft + window.event.x <= m.offsetLeft + m.offsetWidth) 
		&& (document.body.scrollTop + window.event.y >= m.offsetTop)
		&& (document.body.scrollTop + window.event.y <= m.offsetTop + m.offsetHeight)) {
		} else {
			m.style.display = 'none';
		}
	}
}

function dn() {
	return;
}
