//***********默认设置定义.*********************
tPopWait=10;//停留tWait毫秒后显示提示。
tPopShow=30000;//显示tShow毫秒后关闭提示
showPopStep=20;
popOpacity=99;

//***************内部变量定义*****************
sPop = null;
curShow = null;
tFadeOut = null;
tFadeIn = null;
tFadeWaiting = null;

var MouseX = 0;
var MouseY =  0;

document.write("<style type='text/css' id='defaultPopStyle'>");
document.write(".cPopText {color: #000000;word-break: break-all;background-color: #FFFFE1;display:block;border: 1px #000000 solid; font-size: 12px; padding-right: 4px; padding-left: 4px; height: auto; padding-top: 5px; padding-bottom: 2px; filter: Alpha(Opacity=0);margin:-10px 5px 0px 0px\9;+margin:0px 5px 0px 0px;_margin:0px 5px 0px 0px}");
document.write("</style>");
document.write("<div id='PopMsg' style='position:absolute;z-index:10000;word-wrap:break-word;word-break:break-all;' class='cPopText'></div>");


function showPopupText(){
	var o=event.srcElement;
	MouseX=event.clientX;
	MouseY=event.clientY;
	if(o.alt!=null && o.alt!=""){o.MyPop=o.alt;o.alt=""};
	if(o.title!=null && o.title!=""){o.MyPop=o.title;o.title=""};
	if(o.MyPop!=sPop) {
			sPop=o.MyPop;
			clearTimeout(curShow);
			clearTimeout(tFadeOut);
			clearTimeout(tFadeIn);
			clearTimeout(tFadeWaiting);	
			if(sPop==null || sPop=="") {
				PopMsg.innerHTML="";
				PopMsg.style.filter="Alpha()";
				PopMsg.filters.Alpha.opacity=0;	
				}
			else {
				if(o.dyclass!=null) popStyle=o.dyclass 
					else popStyle="cPopText";
				curShow=setTimeout("showIt()",tPopWait);
			}
			
	}
}

function showIt(){
	var z; 
	if (typeof window.pageYOffset != 'undefined') { 
		z = window.pageYOffset; 
	}else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { 
		z = document.documentElement.scrollTop; 
	}else if (typeof document.body != 'undefined') { 
		z = document.body.scrollTop; 
	} 
	PopMsg.style.width='';
	PopMsg.className=popStyle;
	PopMsg.innerHTML=sPop;
	popWidth=PopMsg.clientWidth;
	popHeight=PopMsg.clientHeight;
	if(popWidth>=198){PopMsg.style.width='200px';popWidth=198;}
	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;
	PopMsg.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
	if (navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf('MSIE 8.0')!= -1){
		PopMsg.style.top=MouseY+12+z;
	}else{
		PopMsg.style.top=MouseY+12+z+popTopAdjust;
	}
	PopMsg.style.filter="Alpha(Opacity=0)";
	fadeOut();
}

function showIts(str){
	var z; 
	if (typeof window.pageYOffset != 'undefined') { 
		z = window.pageYOffset; 
	}else if (typeof document.compatMode != 'undefined' && 
		document.compatMode != 'BackCompat') { 
		z = document.documentElement.scrollTop; 
	}else if (typeof document.body != 'undefined') { 
		z = document.body.scrollTop; 
	} 
	PopMsg.style.width='';
	PopMsg.className="cPopText";
	PopMsg.innerHTML=str;
	popWidth=PopMsg.clientWidth;
	popHeight=PopMsg.clientHeight;
	if(popWidth>=198){PopMsg.style.width='200px';popWidth=198;}
	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;
	PopMsg.style.left=MouseX+document.body.scrollLeft+popLeftAdjust;
	if (navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf('MSIE 8.0')!= -1){
		PopMsg.style.top=MouseY+z;
	}else{
		PopMsg.style.top=MouseY+z+popTopAdjust;
	}
	PopMsg.style.filter="Alpha(Opacity=0)";
	fadeOut();
}


function fadeOut(){
	if(PopMsg.filters.Alpha.opacity<popOpacity) {
		PopMsg.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout("fadeOut()",1);
	}
	else {
		PopMsg.filters.Alpha.opacity=popOpacity;
		tFadeWaiting=setTimeout("fadeIn()",tPopShow);
	}
}

function fadeIn(){
	if(PopMsg.filters.Alpha.opacity>0) {
		PopMsg.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout("fadeIn()",1);
	}
}

function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
function openwindow(url, winName, width, height ,property){
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 )){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	theproperty= "width=" + width + "," 
	+ "height=" + height + "," 
	+ "screenx=" + xposition + "," //仅适用于Netscape
	+ "screeny=" + yposition + "," //仅适用于Netscape
	+ "left=" + xposition + "," //IE
	+ "top=" + yposition; //IE 
	if (property) theproperty += ","+property;
	window.open(url,winName,theproperty);
}
document.onmouseover=showPopupText;