//***********默认设置定义.*********************
tPopWait=25;//停留tWait毫秒后显示提示。
tPopShow=3000;//显示tShow毫秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;

document.write("<div id='zzzpopLayer' style='position:absolute;z-index:1000;'></div>");

function showtbale(snei){
var nei='';

nei=nei+"<table width='10' border='0' cellpadding='0' cellspacing='0'>"
nei=nei+"  <tr> "
nei=nei+"    <td height='20' colspan='4' valign='top'><table width='100%' border='0' cellpadding='0' cellspacing='0'>"
nei=nei+"        <tr> "
nei=nei+"          <td width='100%' height='20' valign='middle' id='tbl' align='left'>&nbsp;<img src='fimg/4.gif' width='16' height='11'>&nbsp;&nbsp;</td>"
nei=nei+"        </tr>"
nei=nei+"     </table></td>"
nei=nei+"  </tr>"
nei=nei+"  <tr> "
nei=nei+"    <td width='5' height='4' valign='top'><img src='fimg/1up.gif' width='5' height='4'></td>"
nei=nei+"    <td width='100%' valign='top' background='fimg/2up.gif'><img src='fimg/2up.gif' width='1' height='4'></td>"
nei=nei+"    <td width='7' valign='top'><img src='fimg/3up.gif' width='7' height='4'></td>"
nei=nei+"    <td></td>"
nei=nei+"  </tr>"
nei=nei+"  <tr> "
nei=nei+"    <td height='20' valign='middle' background='fimg/1middle.gif'></td>"
nei=nei+"    <td bgcolor='#F0FAFF' style='font-size: 9pt;' nowrap>"+snei+"</td>"
nei=nei+"    <td background='fimg/3middle.gif'></td>"
nei=nei+"    <td></td>"
nei=nei+"  </tr>"
nei=nei+"  <tr> "
nei=nei+"    <td height='5' valign='top'><img src='fimg/1down.gif' width='5' height='4'></td>"
nei=nei+"    <td valign='top' background='fimg/2down.gif'><img src='fimg/5.gif' width='60' height='5' align='right'></td>"
nei=nei+"    <td valign='top'><img src='fimg/3down.gif' width='7' height='4'></td>"
nei=nei+"    <td></td>"
nei=nei+"  </tr>"
nei=nei+"  <tr> "
nei=nei+"    <td height='20' colspan='4' valign='top'><table width='100%' border='0' cellpadding='0' cellspacing='0'>"
nei=nei+"        <tr> "
nei=nei+"          <td width='100%' height='20' valign='middle' id='tbl1' align='left'></td>"
nei=nei+"        </tr>"
nei=nei+"     </table></td>"
nei=nei+"  </tr>"
nei=nei+"</table>"
return (nei);
}
function showPopupText(){
var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.zzzpop=o.alt;o.alt=""};
        if(o.title!=null && o.title!=""){o.zzzpop=o.title;o.title=""};
	if(o.zzzpop!=sPop) {
			sPop=o.zzzpop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				zzzpopLayer.innerHTML="";
				zzzpopLayer.style.filter="Alpha()";
				zzzpopLayer.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
			
	}
}

function showIt(){
		zzzpopLayer.className=popStyle;
		zzzpopLayer.innerHTML=showtbale(sPop);
		popWidth=zzzpopLayer.clientWidth;
		popHeight=zzzpopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth){
		 popLeftAdjust=-popWidth-12;
		 document.all.tbl.align="right";
		 document.all.tbl1.align="right";
		 }
			else
		{
		popLeftAdjust=0;
		document.all.tbl.align="left";
		document.all.tbl1.align="left";
		}
		
		if(MouseY+12+popHeight>document.body.clientHeight)
		{
		popTopAdjust=-popHeight-12;
		tbl1.innerHTML="&nbsp;<img src='fimg/4.gif' width='16' height='11'>&nbsp;&nbsp;";
		tbl.innerHTML="";
		}
			else
	   {
	          tbl1.innerHTML="";
		popTopAdjust=0;
		}
		//alert(popLeftAdjust+"+"+popTopAdjust);
		zzzpopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		//alert(MouseY+","+document.body.scrollTop+","+popTopAdjust);
		zzzpopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		zzzpopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(zzzpopLayer.filters.Alpha.opacity<popOpacity) {
		zzzpopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
		}
		else {
			zzzpopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(zzzpopLayer.filters.Alpha.opacity>0) {
		zzzpopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
}
document.onmouseover=showPopupText;
