/******************************************************************************
  Crossday Discuz! Board - Common Modules for Discuz!
  Modified by: Crossday Studio (http://crossday.com)
  Based upon:  http://www.cnzzz.com
*******************************************************************************/

var sPop = null;
var postSubmited = false;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { font-family: Tahoma, Verdana; font-size: 9pt;  visibility: hidden; filter: Alpha(Opacity=80)}");

document.write("</style>");
document.write('<div id="popLayer" style="position:absolute;z-index:1000" class="cPopText"></div>');


function showPopupText(evt) {
	var popLayer=document.getElementById("popLayer");
	//var o=window.event.srcElement;
	if(evt == null)
	evt = window.event; // For IE
	var o=evt.srcElement?evt.srcElement:evt.target;
	MouseX=evt.clientX;
	MouseY=evt.clientY;
	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() {
	var popLayer=document.getElementById("popLayer");
	popLayer.className=popStyle;
	popLayer.innerHTML='<table border="1" bordercolor="#999999" cellspacing="0" cellpadding="5" bgcolor="#FFFFE1"><tr><td>'+sPop+'</td></tr></table>';;
	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;
