var tPopWait=30;		//停留tWait毫秒后显示提示。
var tPopShow=120000;	//显示tShow毫秒后关闭提示。
			//若有视频或音频，请设置最长时间并考虑缓冲时间。
var showPopStep=20;		//透明递进。
var popOpacity=83;		//最大非透明度。
var mouseoutkeep = 800;	//鼠标移出区域mouseoutkeep毫秒后关闭提示。

/*　以下若不会，建议你不要修改 */
var sPop=null;
var curShow=null;
var tFadeOut=null;
var tFadeIn=null;
var tFadeWaiting=null;

document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='theText'></div>");
function showPopup(){
	var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
	if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
	if(o.dypop!=sPop) {
			sPop=o.dypop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);
			clearTimeout(mouseout);
			if(sPop==null || sPop=="") {
				var mouseout = setTimeout(fadeIn,mouseoutkeep)
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="theText";
				curShow=setTimeout("showIt()",tPopWait);
			}
			
	}
}

function showIt(){
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.documentElement.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.documentElement.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.documentElement.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.documentElement.scrollTop+popTopAdjust;
		dypopLayer.style.filter="Alpha(Opacity=0)";
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) {
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",150);
		}
		else {
			dypopLayer.filters.Alpha.opacity=popOpacity;
			tFadeWaiting=setTimeout("fadeIn()",tPopShow);
			}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0) {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
		}
	if(dypopLayer.filters.Alpha.opacity<=0){
		dypopLayer.innerHTML='';
	}
}
document.onmouseover=showPopup;
//-->

